C# Класс Castle.Sharp2Js.Helpers

Helper functions for Js Generator
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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