public IGraphType GetOrCreate(Type type) { var serType = _provider.GetOrCreate(type); var graphProperties = new List<IGraphProperty>(); var properties = serType.Properties; foreach (var property in properties) { var graphProperty = Create(property); graphProperties.Add(graphProperty); } var graphType = new ComplexGraphType(graphProperties); _graphTypes.Add(type, graphType); return graphType; }
public IGraphType GetOrCreate(Type type) { var serType = _provider.GetOrCreate(type); var visitArgsFactory = new VisitArgsFactory(_provider, type); var graphProperties = new List <IGraphProperty>(); var properties = serType.Properties; foreach (var property in properties) { var args = visitArgsFactory.Construct(property.Ref.Name); var graphProperty = Create(property, args); graphProperties.Add(graphProperty); } var graphType = new ComplexGraphType(graphProperties); _graphTypes.Add(type, graphType); return(graphType); }