Exemplo n.º 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");
        }
Exemplo n.º 2
0
 public RelationHardCodedTraveller(IVisitArgsFactory factory)
 {
     _argsId0          = factory.Construct("Id");
     _argsName1        = factory.Construct("Name");
     _argsDescription2 = factory.Construct("Description");
     _argsValue3       = factory.Construct("Value");
 }
Exemplo n.º 3
0
        public IGraphTraveller <T> GetInstance <T>(IVisitArgsFactory visitArgsFactory = null)
        {
            var graphType = typeof(T);
            var dyn       = Get(graphType);
            var instance  = (IGraphTraveller <T>)dyn.GetInstance(visitArgsFactory ?? new VisitArgsFactory(_typeProvider, graphType));

            return(instance);
        }
 public NullableValuesEntityHardCodedTraveller(IVisitArgsFactory factory)
 {
     _argsId0          = factory.Construct("Id");
     _argsMayBool1     = factory.Construct("MayBool");
     _argsMayInt2      = factory.Construct("MayInt");
     _argsMayDateTime3 = factory.Construct("MayDateTime");
     _argsMayTimeSpan4 = factory.Construct("MayTimeSpan");
 }
Exemplo n.º 5
0
        public IGraphTraveller GetInstance(IVisitArgsFactory factory)
        {
            if (_isConstructing)
            {
                throw new InvalidOperationException("The type is still being constructed");
            }

            return((IGraphTraveller)_activator.Activate(factory));
        }
Exemplo n.º 6
0
 public DynamicTraveller(Type travellerType, IVisitArgsFactory factory, ConstructorInfo constructor, MethodInfo travelWriteMethod, MethodInfo travelReadMethod, DynamicTravellerMembers members)
 {
     _travellerType = travellerType;
     _factory = factory;
     _constructor = constructor;
     _travelWriteMethod = travelWriteMethod;
     _travelReadMethod = travelReadMethod;
     _members = members;
     _isConstructing = true;
 }
Exemplo n.º 7
0
 public MultidimensionalArrayGraphHardCodedTraveller(IVisitArgsFactory factory)
 {
     _argsValue = factory.Construct("Value");
 }
Exemplo n.º 8
0
 public CategoryHardCodedTraveller(IVisitArgsFactory factory)
 {
     _argsName0        = factory.Construct("Name");
     _argsDescription1 = factory.Construct("Description");
     _argsImage2       = factory.Construct("Image");
 }
Exemplo n.º 9
0
        public IGraphTraveller GetInstance(Type graphType, IVisitArgsFactory visitArgsFactory = null)
        {
            var dyn = Get(graphType);

            return(dyn.GetInstance(visitArgsFactory ?? new VisitArgsFactory(_typeProvider, graphType)));
        }
Exemplo n.º 10
0
 public IdentifierHardCodedTraveller(IVisitArgsFactory factory)
 {
     _argsId0   = factory.Construct("Id");
     _argsType1 = factory.Construct("Type");
 }
Exemplo n.º 11
0
 public GraphTravellerCollection(DynamicTravellerContext context, IVisitArgsFactory visitArgsFactory)
     : this(t => context.GetInstance(t, visitArgsFactory))
 {
 }