C# 클래스 CK.Core.SimpleTypeFinder

Very simple default implementation of the ISimpleTypeFinder: it can be used as a base class. Static Default and WeakDefault are available.
상속: ISimpleTypeFinder
파일 보기 프로젝트 열기: Invenietis/ck-core 1 사용 예제들

공개 메소드들

메소드 설명
SplitAssemblyFullName ( string assemblyFullName, string &assemblyName, string &versionCultureAndPublicKeyToken ) : bool

Helper method to split an assembly full name in two parts: "CK.Core, version=1.0.0, culture='fr-FR'" gives "CK.Core" and "version=1.0.0, culture='fr-FR'".

SplitAssemblyQualifiedName ( string assemblyQualifiedName, string &fullTypeName, string &assemblyFullName ) : bool

Helper method to split the assembly qualified name into its assembly name and full type name. "CK.Core.SimpleTypeFinder, CK.Core, version=1.0.0, culture='fr-FR'" gives "CK.Core.SimpleTypeFinder" and "CK.Core, version=1.0.0, culture='fr-FR'".

StandardResolver ( string assemblyQualifiedName, bool throwOnError ) : Type

Direct implementation that checks that the assembly qualified name set as parameter is valid, then calls Type.GetType(string,bool) and converts any exception that may be raised to TypeLoadException.

WeakResolver ( string assemblyQualifiedName, bool throwOnError ) : Type

An implementation of Resolver that can be used to load types regardless of the version, culture, architecture and public key token (strongly-named assemblies) of the type names. (See WeakenAssemblyQualifiedName.)

The type name used is: "NamespaceOfTheType.TypeName, AssemblyName".

WeakenAssemblyQualifiedName ( string assemblyQualifiedName, string &weakTypeName ) : bool

Helper method to remove version, architecture, publicTokenKey and culture from the assembly qualified name into its assembly name passed as parameter. "CK.Core.SimpleTypeFinder, CK.Core, version=1.0.0, culture='fr-FR'" gives "CK.Core.SimpleTypeFinder, CK.Core". Used to remove strong name from an strongly-named assembly qualified name

비공개 메소드들

메소드 설명
CheckAssemblyQualifiedNameValid ( string assemblyQualifiedName ) : void

메소드 상세

SplitAssemblyFullName() 정적인 공개 메소드

Helper method to split an assembly full name in two parts: "CK.Core, version=1.0.0, culture='fr-FR'" gives "CK.Core" and "version=1.0.0, culture='fr-FR'".
static public SplitAssemblyFullName ( string assemblyFullName, string &assemblyName, string &versionCultureAndPublicKeyToken ) : bool
assemblyFullName string The assembly full name.
assemblyName string Set to assembly name only.
versionCultureAndPublicKeyToken string Set to extra information.
리턴 bool

SplitAssemblyQualifiedName() 정적인 공개 메소드

Helper method to split the assembly qualified name into its assembly name and full type name. "CK.Core.SimpleTypeFinder, CK.Core, version=1.0.0, culture='fr-FR'" gives "CK.Core.SimpleTypeFinder" and "CK.Core, version=1.0.0, culture='fr-FR'".
static public SplitAssemblyQualifiedName ( string assemblyQualifiedName, string &fullTypeName, string &assemblyFullName ) : bool
assemblyQualifiedName string The assembly qualified name to split.
fullTypeName string Full type name on output or an empty string.
assemblyFullName string Weaken type name on output or an empty string.
리턴 bool

StandardResolver() 공개 정적인 메소드

Direct implementation that checks that the assembly qualified name set as parameter is valid, then calls Type.GetType(string,bool) and converts any exception that may be raised to TypeLoadException.
/// When is true, always throws a type load exception. /// The original error (not a ) is available in the . ///
public static StandardResolver ( string assemblyQualifiedName, bool throwOnError ) : Type
assemblyQualifiedName string The assembly qualified name of a type.
throwOnError bool /// True to ALWAYS throw a if the type is not found. /// It may also throw and when the assembly qualified name is not valid /// False prevents any exception from being thrown and simply returns null. ///
리턴 System.Type

WeakResolver() 공개 정적인 메소드

An implementation of Resolver that can be used to load types regardless of the version, culture, architecture and public key token (strongly-named assemblies) of the type names. (See WeakenAssemblyQualifiedName.)
The type name used is: "NamespaceOfTheType.TypeName, AssemblyName".
/// When is true, always throws a type load exception. /// The original error (not a ) is available in the . ///
public static WeakResolver ( string assemblyQualifiedName, bool throwOnError ) : Type
assemblyQualifiedName string
throwOnError bool
리턴 System.Type

WeakenAssemblyQualifiedName() 정적인 공개 메소드

Helper method to remove version, architecture, publicTokenKey and culture from the assembly qualified name into its assembly name passed as parameter. "CK.Core.SimpleTypeFinder, CK.Core, version=1.0.0, culture='fr-FR'" gives "CK.Core.SimpleTypeFinder, CK.Core". Used to remove strong name from an strongly-named assembly qualified name
static public WeakenAssemblyQualifiedName ( string assemblyQualifiedName, string &weakTypeName ) : bool
assemblyQualifiedName string The assembly qualified name to weaken.
weakTypeName string The weakened assembly qualified name on output or an empty string.
리턴 bool