internal DefaultConcreteTypeRepository() { this._defaultCollectionTypes = new TypeKeyRepository( new Dictionary<RuntimeTypeHandle, object>( #if NETFX_35 || WINDOWS_PHONE 8 #else 12 #endif ) { { typeof( IEnumerable<> ).TypeHandle, typeof( List<> ) }, { typeof( ICollection<> ).TypeHandle, typeof( List<> ) }, { typeof( IList<> ).TypeHandle, typeof( List<> ) }, { typeof( IDictionary<,> ).TypeHandle, typeof( Dictionary<,> ) }, { typeof( IEnumerable ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( ICollection ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( IList ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( IDictionary ).TypeHandle, typeof( MessagePackObjectDictionary ) }, #if !NETFX_35 && !UNITY { typeof( ISet<> ).TypeHandle, typeof( HashSet<> ) }, #if !NETFX_40 { typeof( IReadOnlyCollection<> ).TypeHandle, typeof( List<> ) }, { typeof( IReadOnlyList<> ).TypeHandle, typeof( List<> ) }, { typeof( IReadOnlyDictionary<,> ).TypeHandle, typeof( Dictionary<,> ) } #endif // !NETFX_40 #endif // !NETFX_35 && !UNITY } ); }
public SerializerRepository(SerializerRepository copiedFrom) { if (copiedFrom == null) { throw new ArgumentNullException("copiedFrom"); } this._repository = new TypeKeyRepository(copiedFrom._repository); }
internal DefaultConcreteTypeRepository() { this._defaultCollectionTypes = new TypeKeyRepository( new Dictionary <RuntimeTypeHandle, object>( #if !NETFX_35 && !WINDOWS_PHONE 9 #else 8 #endif ) { { typeof(IEnumerable <>).TypeHandle, typeof(List <>) },
public TypeKeyRepository(TypeKeyRepository copiedFrom) { this._lock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); if (copiedFrom == null) { this._table = new Dictionary <RuntimeTypeHandle, object>(); } else { this._table = copiedFrom.GetClonedTable(); } }
public TypeKeyRepository( TypeKeyRepository copiedFrom ) { this._lock = new ReaderWriterLockSlim( LockRecursionPolicy.NoRecursion ); if ( copiedFrom == null ) { this._table = new Dictionary<RuntimeTypeHandle, object>(); } else { this._table = copiedFrom.GetClonedTable(); } }
internal DefaultConcreteTypeRepository() { this._defaultCollectionTypes = new TypeKeyRepository( new Dictionary <RuntimeTypeHandle, object>( #if NET35 || (SILVERLIGHT && !WINDOWS_PHONE) 8 #elif NET40 9 #else 12 #endif ) { { typeof(IEnumerable <>).TypeHandle, typeof(List <>) },
internal DefaultConcreteTypeRepository() { this._defaultCollectionTypes = new TypeKeyRepository( new Dictionary<RuntimeTypeHandle, object>( 8 ) { { typeof( IEnumerable<> ).TypeHandle, typeof( List<> ) }, { typeof( ICollection<> ).TypeHandle, typeof( List<> ) }, { typeof( IList<> ).TypeHandle, typeof( List<> ) }, { typeof( IDictionary<,> ).TypeHandle, typeof( Dictionary<,> ) }, { typeof( IEnumerable ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( ICollection ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( IList ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( IDictionary ).TypeHandle, typeof( MessagePackObjectDictionary ) }, } ); }
internal DefaultConcreteTypeRepository() { this._defaultCollectionTypes = new TypeKeyRepository( new Dictionary <RuntimeTypeHandle, object>( 8 ) { { typeof(IEnumerable <>).TypeHandle, typeof(List <>) }, { typeof(ICollection <>).TypeHandle, typeof(List <>) }, { typeof(IList <>).TypeHandle, typeof(List <>) }, { typeof(IDictionary <,>).TypeHandle, typeof(Dictionary <,>) }, { typeof(IEnumerable).TypeHandle, typeof(List <MessagePackObject>) }, { typeof(ICollection).TypeHandle, typeof(List <MessagePackObject>) }, { typeof(IList).TypeHandle, typeof(List <MessagePackObject>) }, { typeof(IDictionary).TypeHandle, typeof(MessagePackObjectDictionary) }, }); }
internal DefaultConcreteTypeRepository() { this._defaultCollectionTypes = new TypeKeyRepository( new Dictionary<RuntimeTypeHandle, object>( #if !NETFX_35 && !WINDOWS_PHONE 9 #else 8 #endif ) { { typeof( IEnumerable<> ).TypeHandle, typeof( List<> ) }, { typeof( ICollection<> ).TypeHandle, typeof( List<> ) }, { typeof( IList<> ).TypeHandle, typeof( List<> ) }, { typeof( IDictionary<,> ).TypeHandle, typeof( Dictionary<,> ) }, { typeof( IEnumerable ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( ICollection ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( IList ).TypeHandle, typeof( List<MessagePackObject> ) }, { typeof( IDictionary ).TypeHandle, typeof( MessagePackObjectDictionary ) }, #if !NETFX_35 && !WINDOWS_PHONE { typeof( ISet<> ).TypeHandle, typeof( HashSet<> ) }, #endif } ); }
private SerializerRepository(Dictionary <RuntimeTypeHandle, object> table) { this._repository = new TypeKeyRepository(table); this._repository.Freeze(); }
/// <summary> /// Initializes a new empty instance of the <see cref="SerializerRepository"/> class. /// </summary> public SerializerRepository() { this._repository = new TypeKeyRepository(); }