public IndexSub(Schema schema, string type) { // Record Details this.Schema = schema; this.type = type; // Load subschema subschema = Schema.Types[type]; // Reset Reset(); }
public static Schema FromJson(string v) { Schema output = new Schema(); Dictionary<string, SchemaType> types; // Deserialise try { types = Util.JsonDeserialize<Dictionary<string, SchemaType>>(v); } catch (Exception e) { throw new DeserialisationException("Failed to deserialise Schema", e); } output.Types = types; output.Hash = Util.Hash(v); return output; }
public Index(Schema schema) { foreach (var type in schema.Types) { Subindexes[type.Key] = new IndexSub(schema, type.Key); } }