Example #1
0
 private JsonSchemaGenerator.TypeSchema Pop()
 {
     JsonSchemaGenerator.TypeSchema typeSchema1 = this._stack[this._stack.Count - 1];
     this._stack.RemoveAt(this._stack.Count - 1);
     JsonSchemaGenerator.TypeSchema typeSchema2 = this._stack.LastOrDefault <JsonSchemaGenerator.TypeSchema>();
     if (typeSchema2 != null)
     {
         this._currentSchema = typeSchema2.Schema;
         return(typeSchema1);
     }
     this._currentSchema = (JsonSchema)null;
     return(typeSchema1);
 }
Example #2
0
 private void Push(JsonSchemaGenerator.TypeSchema typeSchema)
 {
     this._currentSchema = typeSchema.Schema;
     this._stack.Add(typeSchema);
     this._resolver.LoadedSchemas.Add(typeSchema.Schema);
 }