예제 #1
0
        public DataBlockHardCodedTraveller(IVisitArgsFactory factory)
        {
            _travellerRelation0   = new RelationHardCodedTraveller(factory.ConstructWith(typeof(Relation)));
            _travellerIdentifier1 = new IdentifierHardCodedTraveller(factory.ConstructWith(typeof(Identifier)));
            _travellerCategory2   = new CategoryHardCodedTraveller(factory.ConstructWith(typeof(Category)));

            _argsId                 = factory.Construct("Id");
            _argsString             = factory.Construct("String");
            _argsInt16              = factory.Construct("Int16");
            _argsInt32              = factory.Construct("Int32");
            _argsInt64              = factory.Construct("Int64");
            _argsUInt16             = factory.Construct("UInt16");
            _argsUInt32             = factory.Construct("UInt32");
            _argsUInt64             = factory.Construct("UInt64");
            _argsSingle             = factory.Construct("Single");
            _argsDouble             = factory.Construct("Double");
            _argsTimeSpan           = factory.Construct("TimeSpan");
            _argsDecimal            = factory.Construct("Decimal");
            _argsDateTime           = factory.Construct("DateTime");
            _argsByte               = factory.Construct("Byte");
            _argsBoolean            = factory.Construct("Boolean");
            _argsBlob               = factory.Construct("Blob");
            _argsMessages           = factory.Construct("Messages");
            _argsStamps             = factory.Construct("Stamps");
            _argsRelation           = factory.Construct("Relation");
            _argsDummyRelation      = factory.Construct("DummyRelation");
            _argsSecondaryRelations = factory.Construct("SecondaryRelations");
            _argsIndexedValues      = factory.Construct("IndexedValues");
            _argsCategories         = factory.Construct("Categories");
        }
예제 #2
0
 public CollectionGraphTraveller(IGraphTraveller <TElement> elementTraveller, SerializationInstanceFactory instanceFactory)
 {
     _elementTraveller = elementTraveller;
     if (elementTraveller == null)
     {
         _valueVisitor = ValueVisitor.Create <TElement>();
     }
     else
     {
         _instanceFactory = instanceFactory;
         _elementType     = typeof(TElement);
     }
 }
예제 #3
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);
     }
 }
예제 #4
0
 public RootTraveller(IGraphTraveller traveller, LevelType level)
 {
     Traveller = traveller;
     Level     = level;
 }