Class TypeRegistry
Provides a registry of types, types that do not need to be described in a serialization stream
Inheritance
System.Object
TypeRegistry
Implements
System.Collections.Generic.IEnumerable<System.Type>
System.Collections.IEnumerable
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NFX.dll
Syntax
[Serializable]
public sealed class TypeRegistry : IEnumerable<Type>, IEnumerable, ISerializable
Constructors
TypeRegistry(IEnumerable<Type>[])
Initializes TypeRegistry with types from other sources
Declaration
public TypeRegistry(params IEnumerable<Type>[] others)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Type>[] |
others |
|
Fields
NULL_HANDLE
Denotes a special type which is object==null
Declaration
public static readonly VarIntStr NULL_HANDLE
Field Value
Properties
BoxedCommonNullableTypes
Returns common nullable types - use when much boxing is expected
Declaration
public static IEnumerable<Type> BoxedCommonNullableTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
BoxedCommonTypes
Returns common primitive types - use when much boxing is expected
Declaration
public static IEnumerable<Type> BoxedCommonTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
CommonCollectionTypes
Returns frequently-used generic collections
Declaration
public static IEnumerable<Type> CommonCollectionTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
Count
How many items in the registry
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
CSum
Returns quick checksum of type registry contents.
It is updated when new types get added into the registry
Declaration
public ulong CSum { get; }
Property Value
Type |
Description |
System.UInt64 |
|
DataAccessCRUDTypes
Returns common types for DataAccess.CRUD
Declaration
public static IEnumerable<Type> DataAccessCRUDTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
GlueProtocolTypes
Returns Glue protocol specific types
Declaration
public static IEnumerable<Type> GlueProtocolTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
Item[VarIntStr]
Returns type by handle i.e. VarIntStr(1) or VarIntStr("full name"). Throws in case of error
Declaration
public Type this[VarIntStr handle] { get; }
Parameters
Property Value
Type |
Description |
System.Type |
|
Item[String]
Returns type by handle i.e. '$11' or full name. Throws in case of error
Declaration
public Type this[string handle] { get; }
Parameters
Type |
Name |
Description |
System.String |
handle |
|
Property Value
Type |
Description |
System.Type |
|
PODTypes
Returns PortableObjectDocument types
Declaration
public static IEnumerable<Type> PODTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
Methods
Add(Type)
Adds the type if it not already in registry and returns true
Declaration
public bool Add(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.Boolean |
|
GetEnumerator()
Declaration
public IEnumerator<Type> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Type> |
|
GetTypeHandle(Type)
Returns a VarIntStr with the type index formatted as handle if type exists in registry, or fully qualified type name otherwise
Declaration
public VarIntStr GetTypeHandle(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
GetTypeHandleAsString(Type)
Returns a string with the type index formatted as handle if type exists in registry, or fully qualified type name otherwise
Declaration
public string GetTypeHandleAsString(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.String |
|
IsNullHandle(VarIntStr)
Declaration
public static bool IsNullHandle(VarIntStr handle)
Parameters
Returns
Type |
Description |
System.Boolean |
|
IsNullHandle(String)
Declaration
public static bool IsNullHandle(string handle)
Parameters
Type |
Name |
Description |
System.String |
handle |
|
Returns
Type |
Description |
System.Boolean |
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type |
Name |
Description |
System.Runtime.Serialization.SerializationInfo |
info |
|
System.Runtime.Serialization.StreamingContext |
context |
|
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Runtime.Serialization.ISerializable
Extension Methods