Exemple #1
0
        public ShadowProperty(GraphContextBase context, PropertyInfo property, IProxyTargetAccessor proxyAccessor)
        {
            Context       = context ?? throw new ArgumentNullException(nameof(context));
            Property      = property ?? throw new ArgumentNullException(nameof(property));
            ProxyAccessor = proxyAccessor ?? throw new ArgumentNullException(nameof(proxyAccessor));

            Attach();
        }
        public async Task Eager(bool doEagerLoad)
        {
            var eagerTasks = new List <Task>();

            if (_eagerLodedProperties.TryGetValue(GetType().FullName, out var propsToLoad))
            {
                foreach (var prop in propsToLoad)
                {
                    var loader = GraphContextBase.TransferData(this, prop);
                    eagerTasks.Add(loader.LoadAsync());
                }
            }
            await Task.WhenAll(eagerTasks);
        }
Exemple #3
0
        public VertexTree(JToken iValue, IGraphContext context) : base(context)
        {
            _graphContext = context as GraphContextBase;
            var key = iValue.First.First.ToObject <object>();

            Key = _graphContext.MakeInstance <T>(key as dynamic);
            foreach (var item in iValue.Last)
            {
                foreach (JProperty i in item)
                {
                    _children.Add(new VertexTree <T>(i.Value, _context));
                }
            }
        }
Exemple #4
0
 private void Tc_Disposing(GraphContextBase sender)
 {
     _output.WriteLine($"Total RU Consumption {sender.ConsumedRU}");
 }
Exemple #5
0
 public ShadowSingle(GraphContextBase context, PropertyInfo property, IProxyTargetAccessor proxyAccessor) : base(context, property, proxyAccessor)
 {
 }
 internal void SetContext(GraphContextBase graphContextBase)
 {
     _context = graphContextBase;
 }
Exemple #7
0
 internal VertexTree(JObject items, IGraphContext context) : base((IEnumerable <dynamic>)items, context)
 {
     _graphContext = context as GraphContextBase;
 }
Exemple #8
0
 public OgmCoreProxyPrimitiveInterceptor(GraphContextBase context)
 {
     Context = context ?? throw new ArgumentNullException(nameof(context));
 }
Exemple #9
0
 public OgmCoreProxyEntityCollectionGetterInterceptor(GraphContextBase context)
 {
     Context = context ?? throw new ArgumentNullException(nameof(context));
 }
Exemple #10
0
 internal VertexTree(JObject items, IGraphContext context) : base(items, context)
 {
     _graphContext = context as GraphContextBase;
 }