C# 클래스 Castle.Sharp2Js.Helpers

Helper functions for Js Generator
파일 보기 프로젝트 열기: castle-it/sharp2Js 1 사용 예제들

공개 메소드들

메소드 설명
GetName ( string input, List nameFilters ) : string

Gets the name, filtering out the strings provided.

GetPropertyName ( PropertyInfo propertyInfo, Castle.Sharp2Js.JsGeneratorOptions generatorOptions ) : string

Gets the name of the property.

HasDefaultValue ( PropertyInfo propertyInfo, Castle.Sharp2Js.JsGeneratorOptions generatorOptions ) : bool

Determines whether the property has a default value specified by the DefaultValue attribute.

IsCollectionType ( Type propertyType ) : bool

Determines whether the specified property type is a collection.

IsDictionaryType ( Type propertyType ) : bool

Determines whether the specified property type is a dictionary.

IsPrimitive ( Type propertyType ) : bool

Determines whether the specified property type is primitive.

ReadDefaultValueFromAttribute ( PropertyInfo propertyInfo ) : object

Reads the default value from the attribute.

ShouldGenerateMember ( PropertyInfo propertyInfo, Castle.Sharp2Js.JsGeneratorOptions generatorOptions ) : bool

Determines whether the property should be generated in the Js model.

ToCamelCase ( string input, bool camelCase ) : string

Camel cases an input string.

메소드 상세

GetName() 공개 정적인 메소드

Gets the name, filtering out the strings provided.
public static GetName ( string input, List nameFilters ) : string
input string The input.
nameFilters List The name filters.
리턴 string

GetPropertyName() 공개 정적인 메소드

Gets the name of the property.
public static GetPropertyName ( PropertyInfo propertyInfo, Castle.Sharp2Js.JsGeneratorOptions generatorOptions ) : string
propertyInfo System.Reflection.PropertyInfo The property information.
generatorOptions Castle.Sharp2Js.JsGeneratorOptions The generator options.
리턴 string

HasDefaultValue() 공개 정적인 메소드

Determines whether the property has a default value specified by the DefaultValue attribute.
public static HasDefaultValue ( PropertyInfo propertyInfo, Castle.Sharp2Js.JsGeneratorOptions generatorOptions ) : bool
propertyInfo System.Reflection.PropertyInfo The property information.
generatorOptions Castle.Sharp2Js.JsGeneratorOptions The generator options.
리턴 bool

IsCollectionType() 공개 정적인 메소드

Determines whether the specified property type is a collection.
public static IsCollectionType ( Type propertyType ) : bool
propertyType System.Type Type of the property.
리턴 bool

IsDictionaryType() 공개 정적인 메소드

Determines whether the specified property type is a dictionary.
public static IsDictionaryType ( Type propertyType ) : bool
propertyType System.Type Type of the property.
리턴 bool

IsPrimitive() 공개 정적인 메소드

Determines whether the specified property type is primitive.
public static IsPrimitive ( Type propertyType ) : bool
propertyType System.Type Type of the property.
리턴 bool

ReadDefaultValueFromAttribute() 공개 정적인 메소드

Reads the default value from the attribute.
public static ReadDefaultValueFromAttribute ( PropertyInfo propertyInfo ) : object
propertyInfo System.Reflection.PropertyInfo The property information.
리턴 object

ShouldGenerateMember() 공개 정적인 메소드

Determines whether the property should be generated in the Js model.
public static ShouldGenerateMember ( PropertyInfo propertyInfo, Castle.Sharp2Js.JsGeneratorOptions generatorOptions ) : bool
propertyInfo System.Reflection.PropertyInfo The property information.
generatorOptions Castle.Sharp2Js.JsGeneratorOptions The generator options.
리턴 bool

ToCamelCase() 공개 정적인 메소드

Camel cases an input string.
public static ToCamelCase ( string input, bool camelCase ) : string
input string The string.
camelCase bool if set to true [camel case].
리턴 string