C# Класс kOS.Safe.Utilities.KOSNomenclature

A class for the purpose of holding the mapping information that goes back and forth between C# type names and thier KOS type name equivalents. Any time you add a new class derived from kOS.Safe.Encapsulated.Structure, you should check to see if you should add a mapping to this class to go with it. This class is intended to be used "statically" without an actual instance of it being necessary. There should be only one copy of its data, globally, across the entire process.
Показать файл Открыть проект

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

Метод Описание
GetCSharpName ( string kosName ) : Type

Return the C# type corresponding to a kOS type name.

GetKOSName ( Type cSharpType ) : string

Return the kOS type name corresponding to a C# type. Never bombs out, instead returning the original type's name as-is if it wasn't found in the lookup. This is a case-sensitive lookup because C# type names are case sensitive and there could hypothetically be two different type names that differ by case only.

HasKOSName ( Type cSharpType ) : bool

RReturns true if the cSharp type has a mapping in the table.

PopulateType ( Type t ) : void

Populate the nomenclature dictionaries based on the given type, which inherits from Structure. This method is automatically called by the AssemblyWalkAttribute

Приватные методы

Метод Описание
KOSNomenclature ( ) : System
NagCheck ( Type t ) : void

Report nag message on terminal if there is a C# type derived from kOS.Safe.Encapsulated.Structure which was not given a KOSNomenclatureAttribute to work from. All Structure derivatives will need to be given at least one KOS name by being given such an attribute.

Описание методов

GetCSharpName() публичный статический Метод

Return the C# type corresponding to a kOS type name.
public static GetCSharpName ( string kosName ) : Type
kosName string
Результат System.Type

GetKOSName() публичный статический Метод

Return the kOS type name corresponding to a C# type. Never bombs out, instead returning the original type's name as-is if it wasn't found in the lookup. This is a case-sensitive lookup because C# type names are case sensitive and there could hypothetically be two different type names that differ by case only.
public static GetKOSName ( Type cSharpType ) : string
cSharpType System.Type
Результат string

HasKOSName() публичный статический Метод

RReturns true if the cSharp type has a mapping in the table.
public static HasKOSName ( Type cSharpType ) : bool
cSharpType System.Type
Результат bool

PopulateType() публичный статический Метод

Populate the nomenclature dictionaries based on the given type, which inherits from Structure. This method is automatically called by the AssemblyWalkAttribute
public static PopulateType ( Type t ) : void
t System.Type A type inheriting from Structure
Результат void