Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        internal static JsonFieldCollection GetInstance([CallerMemberName] string callerName = "")
        {
            JsonFieldCollection instance = default(JsonFieldCollection);

            InstanceFactory(ref instance, callerName);
            return(instance);
        }
Esempio n. 3
0
        partial void TryGetField_PostValidate(JsonFieldCollection instance, String fieldName, JsonField field, Boolean _retVal)
        {
            switch (DataSequence)
            {
            case 1:
                MoreData = true;
                break;

            case 2:
                MoreData = false;
                break;
            }
        }
Esempio n. 4
0
        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;
            }
        }
Esempio n. 5
0
 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) => { });
 }
Esempio n. 6
0
 partial void ToString_PreCondition(JsonFieldCollection instance);
Esempio n. 7
0
 partial void ToString_PostValidate(JsonFieldCollection instance, String _retVal);
Esempio n. 8
0
 partial void CopyTo_PostValidate(JsonFieldCollection instance, Array array, Int32 index);
Esempio n. 9
0
 partial void CopyTo_PreCondition(JsonFieldCollection instance, ref Array array, ref Int32 index);
Esempio n. 10
0
        static partial void InstanceFactory(ref JsonFieldCollection instance, string callerName)
        {
            JToken json = JsonFactory();

            instance = JsonFieldCollection.FromToken(json);
        }
Esempio n. 11
0
 partial void Equals_PostValidate(JsonFieldCollection instance, Object obj, Boolean _retVal);
Esempio n. 12
0
 partial void GetHashCode_PostValidate(JsonFieldCollection instance, Int32 _retVal);
Esempio n. 13
0
 partial void GetHashCode_PreCondition(JsonFieldCollection instance);
Esempio n. 14
0
 partial void GetEnumerator_PreCondition(JsonFieldCollection instance);
Esempio n. 15
0
 partial void GetEnumerator_PostValidate(JsonFieldCollection instance, IEnumerator <JsonField> _retVal);
Esempio n. 16
0
 partial void Equals_PreCondition(JsonFieldCollection instance, ref Object obj);
Esempio n. 17
0
 partial void TryGetField_PostValidate(JsonFieldCollection instance, String fieldName, JsonField field, Boolean _retVal);
Esempio n. 18
0
 partial void Contains_PreCondition(JsonFieldCollection instance, ref String fieldName)
 {
     fieldName = "System.Id";
 }
Esempio n. 19
0
 partial void TryGetField_PreCondition(JsonFieldCollection instance, ref String fieldName, ref JsonField field);
Esempio n. 20
0
 partial void Count_SetCondition(ref JsonFieldCollection instance, ref Int32 setValue);
Esempio n. 21
0
 partial void CaptureJson_PreCondition(JsonFieldCollection instance, ref Int32 id, ref Int32 rev, ref JToken newFields)
 {
     id        = 1234;
     rev       = 1;
     newFields = JsonFactory();
 }
Esempio n. 22
0
 partial void GetType_PostValidate(JsonFieldCollection instance, Type _retVal);
Esempio n. 23
0
 partial void CopyTo_PreCondition(JsonFieldCollection instance, ref Array array, ref Int32 index)
 {
     array = new JsonField[100];
     index = 1;
 }
Esempio n. 24
0
 partial void GetType_PreCondition(JsonFieldCollection instance);
Esempio n. 25
0
 static partial void InstanceFactory(ref JsonFieldCollection instance, [CallerMemberName] string callerName = "");
Esempio n. 26
0
 partial void IsReadOnly_SetCondition(ref JsonFieldCollection instance, ref Boolean setValue);
Esempio n. 27
0
        /// <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);
        }
Esempio n. 28
0
 partial void JsonValue_SetCondition(ref JsonFieldCollection instance, ref JToken setValue);
Esempio n. 29
0
 partial void Fields_SetCondition(ref JsonWorkItemRevision instance, ref JsonFieldCollection setValue);
Esempio n. 30
0
 partial void Contains_PreCondition(JsonFieldCollection instance, ref String fieldName);