Ejemplo n.º 1
0
 public static JsonObjectType CreateTypeWithName(string name, ObjectValue objectValue)
 {
     var jsonObjectType = new JsonObjectType(name, true )
         {
             OriginalObject = objectValue
         };
     foreach (var field in objectValue.Fields)
     {
         jsonObjectType.Fields.Add(field.Name, new JsonObjectField(field.Value.TypeName));
     }
     _types.Add(jsonObjectType);
     return jsonObjectType;
 }
Ejemplo n.º 2
0
 public static JsonObjectType CreateType(ObjectValue objectValue)
 {
     var jsonObjectType = new JsonObjectType(CreateTmpolaryName(), false)
         {
             OriginalObject = objectValue
         };
     foreach (var field in objectValue.Fields)
     {
         jsonObjectType.Fields.Add(field.Name, new JsonObjectField( field.Value.TypeName ) );
     }
     _types.Add(jsonObjectType);
     return jsonObjectType;
 }