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.
파일 보기 프로젝트 열기: KSP-KOS/KOS

공개 메소드들

메소드 설명
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