/// <summary> /// Parses the fields. /// </summary> /// <param name="jsonWorkItem">The json work item.</param> /// <returns>JsonFieldCollection.</returns> private static JsonFieldCollection ParseFields(JsonWorkItem jsonWorkItem) { JProperty property = ((JObject)jsonWorkItem.JsonValue).Properties().FirstOrDefault(p => p.Name == "fields"); JsonFieldCollection fields = JsonFieldCollection.FromToken(property.Value); return(fields); }
internal static JsonFieldCollection GetInstance([CallerMemberName] string callerName = "") { JsonFieldCollection instance = default(JsonFieldCollection); InstanceFactory(ref instance, callerName); return(instance); }
partial void TryGetField_PostValidate(JsonFieldCollection instance, String fieldName, JsonField field, Boolean _retVal) { switch (DataSequence) { case 1: MoreData = true; break; case 2: MoreData = false; break; } }
partial void TryGetField_PreCondition(JsonFieldCollection instance, ref String fieldName, ref JsonField field) { switch (DataSequence) { case 1: fieldName = "System.Id"; break; case 2: fieldName = "System.Title"; break; } }
public void Count_UnitTest() { ExecuteProperty( () => // Create Test Instance { JsonFieldCollection instance = GetInstance(); return(instance); }, null, null, null, // No Set Accessor // Invoke Getter instance => { return(instance.Count); }, // Validate Get Operation (instance, setValue, getValue) => { }); }
partial void ToString_PreCondition(JsonFieldCollection instance);
partial void ToString_PostValidate(JsonFieldCollection instance, String _retVal);
partial void CopyTo_PostValidate(JsonFieldCollection instance, Array array, Int32 index);
partial void CopyTo_PreCondition(JsonFieldCollection instance, ref Array array, ref Int32 index);
static partial void InstanceFactory(ref JsonFieldCollection instance, string callerName) { JToken json = JsonFactory(); instance = JsonFieldCollection.FromToken(json); }
partial void Equals_PostValidate(JsonFieldCollection instance, Object obj, Boolean _retVal);
partial void GetHashCode_PostValidate(JsonFieldCollection instance, Int32 _retVal);
partial void GetHashCode_PreCondition(JsonFieldCollection instance);
partial void GetEnumerator_PreCondition(JsonFieldCollection instance);
partial void GetEnumerator_PostValidate(JsonFieldCollection instance, IEnumerator <JsonField> _retVal);
partial void Equals_PreCondition(JsonFieldCollection instance, ref Object obj);
partial void TryGetField_PostValidate(JsonFieldCollection instance, String fieldName, JsonField field, Boolean _retVal);
partial void Contains_PreCondition(JsonFieldCollection instance, ref String fieldName) { fieldName = "System.Id"; }
partial void TryGetField_PreCondition(JsonFieldCollection instance, ref String fieldName, ref JsonField field);
partial void Count_SetCondition(ref JsonFieldCollection instance, ref Int32 setValue);
partial void CaptureJson_PreCondition(JsonFieldCollection instance, ref Int32 id, ref Int32 rev, ref JToken newFields) { id = 1234; rev = 1; newFields = JsonFactory(); }
partial void GetType_PostValidate(JsonFieldCollection instance, Type _retVal);
partial void CopyTo_PreCondition(JsonFieldCollection instance, ref Array array, ref Int32 index) { array = new JsonField[100]; index = 1; }
partial void GetType_PreCondition(JsonFieldCollection instance);
static partial void InstanceFactory(ref JsonFieldCollection instance, [CallerMemberName] string callerName = "");
partial void IsReadOnly_SetCondition(ref JsonFieldCollection instance, ref Boolean setValue);
/// <summary> /// Initializes a new instance of the <see cref="JsonBackedObjectBase" /> class. /// </summary> /// <param name="json">The json.</param> protected JsonWorkItemRevision(JToken json) : base(json) { var value = json["fields"].Value <JObject>(); r_Fields = JsonFieldCollection.FromToken(value); }
partial void JsonValue_SetCondition(ref JsonFieldCollection instance, ref JToken setValue);
partial void Fields_SetCondition(ref JsonWorkItemRevision instance, ref JsonFieldCollection setValue);
partial void Contains_PreCondition(JsonFieldCollection instance, ref String fieldName);