예제 #1
0
 public GraphObject(IContainer container)
 {
     Container = container;
     Name      = typeof(T).Name;
     if (container != null)
     {
         FieldMapper.AddAllFields(Container, this, GetType(), true);
     }
     IsTypeOf = o => o is T;
 }
 public GraphObjectMap(IContainer container)
 {
     Container = container;
     Name      = typeof(TInput).Name;
     if (container != null)
     {
         FieldMapper.AddFields <TOutput>(container, this);
     }
     IsTypeOf = o => o is TInput;
 }
예제 #3
0
 public GraphInterface(IContainer container)
 {
     Container = container;
     Name      = typeof(T).Name;
     if (container != null)
     {
         FieldMapper.AddAllFields(Container, this, GetType(), true);
     }
     ResolveType = o =>
     {
         if (o is T)
         {
             return((ObjectGraphType)Activator.CreateInstance(TypeLoader.GetGraphType(o.GetType()), Container));
         }
         return(null);
     };
 }
예제 #4
0
 public GraphInputObject(IContainer container)
 {
     Container = container;
     Name      = typeof(T).Name;
     FieldMapper.AddAllFields(Container, this, typeof(T), false);
 }