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; }
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); }; }
public GraphInputObject(IContainer container) { Container = container; Name = typeof(T).Name; FieldMapper.AddAllFields(Container, this, typeof(T), false); }