public CollectionGraphTraveller(IGraphTraveller <TElement> elementTraveller, SerializationInstanceFactory instanceFactory)
 {
     _elementTraveller = elementTraveller;
     if (elementTraveller == null)
     {
         _valueVisitor = ValueVisitor.Create <TElement>();
     }
     else
     {
         _instanceFactory = instanceFactory;
         _elementType     = typeof(TElement);
     }
 }
Esempio n. 2
0
 public DictionaryGraphTraveller(IGraphTraveller <TKey> keyTraveller, IGraphTraveller <TValue> valueTraveller, SerializationInstanceFactory instanceFactory)
 {
     _keyTraveller    = keyTraveller;
     _valueTraveller  = valueTraveller;
     _instanceFactory = instanceFactory;
     if (keyTraveller == null)
     {
         _keyVisitor = ValueVisitor.Create <TKey>();
     }
     else
     {
         _keyType = typeof(TKey);
     }
     if (valueTraveller == null)
     {
         _valueVisitor = ValueVisitor.Create <TValue>();
     }
     else
     {
         _valueType = typeof(TValue);
     }
 }