public static void RecordType(Type t, FactoryTypeIdentifier tid) { _constructors[tid.TypeCode] = t.GetConstructor(new[] { typeof(IntPtr) }); if (_constructors[tid.TypeCode] == null) { throw new Exception("Byte* constructor not found."); } _delegates[tid.TypeCode] = GetConstructorDelegate <IntPtr>(t); }
public TypeDescriptor(TypeDescriptor baseDescriptor, int fixedTSize, FactoryTypeIdentifier tid, Type realType) { _base = baseDescriptor; if (_base != null) { _arrays.AddRange(_base.Arrays); } _fixedPartLenght = fixedTSize; _classIndex = ClassNumber - 1; _tid = tid; VirtualObjectFactory.RecordType(realType, _tid); }