C# 클래스 SenseNet.ContentRepository.ContentNamingHelper

파일 보기 프로젝트 열기: maxpavlov/FlexNet 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CharIsAllowed bool
EnsureContentName string
GetNewPath string
IsUriClean bool
NonStrippingChar bool
Strip string
TailClean string
UriCleanup string

공개 메소드들

메소드 설명
EnforceRequiredExtension ( string nameBase, ContentType type ) : string
EnsureExtension ( string nameBase, string reqext ) : string
GetFileExtension ( string fileName ) : string

Gets the extension from a provided filename. Return string contains the '.' character.

GetFileNameWithoutExtension ( string fileName, string extension ) : string

Gets the filename without the provided extension.

GetNameFromDisplayName ( string displayName ) : string

Removes invalid characters from the provided displayname, without enforcing original extension.

GetNameFromDisplayName ( string originalName, string displayName ) : string

Removes invalid characters from the provided displayname, leaving original extension intact.

GetNewName ( string nameBase, ContentType type, Node parent ) : string
GetNoAccents ( string r ) : string

Removes accents from input string.

IncrementNameSuffix ( string name, string &nameBase ) : string
IncrementNameSuffixToLastName ( string currentName, int parentNodeId ) : string
ParseSuffix ( string name, string &nameBase, bool &inValidNumber ) : int

Parses name from format 'name(x)'

RemoveInvalidCharacters ( string s ) : string

Removes invalid characters from the provided displayname.

비공개 메소드들

메소드 설명
CharIsAllowed ( char c ) : bool
EnsureContentName ( string nameBase, Node container ) : string
GetNewPath ( Node container, string defaultName, int index, string &newName ) : string
IsUriClean ( string s ) : bool
NonStrippingChar ( char c ) : bool
Strip ( string name ) : string
TailClean ( string s ) : string
UriCleanup ( string s ) : string

메소드 상세

EnforceRequiredExtension() 공개 정적인 메소드

public static EnforceRequiredExtension ( string nameBase, ContentType type ) : string
nameBase string
type SenseNet.ContentRepository.Schema.ContentType
리턴 string

EnsureExtension() 공개 정적인 메소드

public static EnsureExtension ( string nameBase, string reqext ) : string
nameBase string
reqext string
리턴 string

GetFileExtension() 공개 정적인 메소드

Gets the extension from a provided filename. Return string contains the '.' character.
public static GetFileExtension ( string fileName ) : string
fileName string
리턴 string

GetFileNameWithoutExtension() 공개 정적인 메소드

Gets the filename without the provided extension.
public static GetFileNameWithoutExtension ( string fileName, string extension ) : string
fileName string
extension string
리턴 string

GetNameFromDisplayName() 공개 정적인 메소드

Removes invalid characters from the provided displayname, without enforcing original extension.
public static GetNameFromDisplayName ( string displayName ) : string
displayName string The input displayname that will be converted to a valid url name.
리턴 string

GetNameFromDisplayName() 공개 정적인 메소드

Removes invalid characters from the provided displayname, leaving original extension intact.
public static GetNameFromDisplayName ( string originalName, string displayName ) : string
originalName string The original name of the Content, to keep its original extension. If unknown, provide extension only in the form of '.ext'. If original extension is not to be kept, provide null.
displayName string The input displayname that will be converted to a valid url name.
리턴 string

GetNewName() 공개 정적인 메소드

public static GetNewName ( string nameBase, ContentType type, Node parent ) : string
nameBase string
type SenseNet.ContentRepository.Schema.ContentType
parent Node
리턴 string

GetNoAccents() 공개 정적인 메소드

Removes accents from input string.
public static GetNoAccents ( string r ) : string
r string
리턴 string

IncrementNameSuffix() 공개 정적인 메소드

public static IncrementNameSuffix ( string name, string &nameBase ) : string
name string
nameBase string
리턴 string

IncrementNameSuffixToLastName() 공개 정적인 메소드

public static IncrementNameSuffixToLastName ( string currentName, int parentNodeId ) : string
currentName string
parentNodeId int
리턴 string

ParseSuffix() 공개 정적인 메소드

Parses name from format 'name(x)'
public static ParseSuffix ( string name, string &nameBase, bool &inValidNumber ) : int
name string name to parse
nameBase string parsed namebase
inValidNumber bool true if correct format is detected but (x) is not a valid number
리턴 int

RemoveInvalidCharacters() 공개 정적인 메소드

Removes invalid characters from the provided displayname.
public static RemoveInvalidCharacters ( string s ) : string
s string
리턴 string