示例#1
0
 public GraphNode GetEntityGraph <T>()
 {
     return(_cache.GetOrAdd <GraphNode>(typeof(AggregateRegister).FullName, GenerateCacheKey <T>(), () =>
     {
         // no cached mapping lets look for attributes
         if (_attributeGraphBuilder.CanBuild <T>())
         {
             return _attributeGraphBuilder.BuildGraph <T>();
         }
         else
         {
             // no mapping by default
             return new GraphNode();
         }
     }));
 }
示例#2
0
 public GraphNode GetEntityGraph <T>()
 {
     return(_cache.GetOrAdd(typeof(AggregateRegister).FullName, GenerateCacheKey <T>(),
                            () => _attributeGraphBuilder.CanBuild <T>() ? _attributeGraphBuilder.BuildGraph <T>() : new GraphNode()));
 }
示例#3
0
        public GraphNode GetEntityGraph <T>()
        {
            var node = _attributeGraphBuilder.CanBuild <T>() ? _attributeGraphBuilder.BuildGraph <T>() : new GraphNode();

            return(_cache.GetOrAdd(GenerateCacheKey <T>(), node));
        }