public SchemaPropertyInfo(Dictionary <string, string> defaultConverters, Dictionary <string, string> propertyConverters, Dictionary <string, string> arrayHelpers, DAG <string, JToken> typesGraph) { _defaultConverters = defaultConverters; _propertyConverters = propertyConverters; _arrayHelpers = arrayHelpers; _typesGraph = typesGraph; }
public SchemaEnumInfo(string nameSpace, string enumName, DAG <string, JToken> typesGraph) : base(typesGraph) { Name = enumName; NameSpace = nameSpace; Schema.Add("type", "enum"); Schema.Add("name", Name); if (nameSpace != null) { Schema.Add("namespace", nameSpace); } Schema.Add("symbols", _symbols); }
public SchemaRecordInfo(string nameSpace, string recordName, DAG <string, JToken> typesGraph) : base(typesGraph) { Name = recordName; NameSpace = nameSpace; Schema.Add("type", "record"); Schema.Add("name", recordName); if (nameSpace != null) { Schema.Add("namespace", nameSpace); } _typesGraph.AddOrUpdateNode(recordName, Schema); Schema.Add("fields", _fields); }
private void Visit(DAG <I, T> .Node root, List <I> visited, Action <I, T> visit) { visited.Add(root.Id); foreach (var n in root.Edges) { if (!visited.Contains(n.Id)) { try { Visit(n, visited, visit); } catch { Console.Error.WriteLine($"node {root.Id} value {root.Value}"); throw; } } } if (visit != null) { visit(root.Id, root.Value); } }
public DAGDepthFirstTraverser(DAG <I, T> graph) { Graph = graph; }
public SchemaInfo(DAG <string, JToken> typesGraph) { _typesGraph = typesGraph; }