コード例 #1
0
        public CollectionHandlerWrapper(CollectionHandler handler, Type collectionType, Type itemType)
        {
            if (handler == null)
                throw new ArgumentNullException("handler");

            _innerHandler = handler;
            _collectionType = collectionType;
            _itemType = itemType;
        }
コード例 #2
0
ファイル: SerializationContext.cs プロジェクト: vfioox/ENULib
 /// <summary>
 /// Registers a collection handler which provides support for a certain type
 /// or multiple types of collections.
 /// </summary>
 /// <param name="handler">the collection handler</param>
 public void RegisterCollectionHandler(CollectionHandler handler)
 {
     _collectionHandlers.Insert(0, handler);
 }
コード例 #3
0
 public CollectionHandlerWrapper(CollectionHandler handler)
 {
     _innerHandler = handler;
 }
コード例 #4
0
ファイル: TypeData.cs プロジェクト: vfioox/ENULib
 /// <summary>
 /// Returns true if this type is a collection type
 /// </summary>
 /// <param name="context">the serialization context</param>
 /// <returns>true if a collection</returns>
 public virtual bool IsCollection()
 {
     if (!collectionLookedUp)
     {
         collectionHandler = FindCollectionHandler();
         collectionLookedUp = true;
     }
     return collectionHandler != null;
 }