Пример #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);
        }
Пример #2
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);
        }
Пример #3
0
        static partial void InstanceFactory(ref JsonFieldCollection instance, string callerName)
        {
            JToken json = JsonFactory();

            instance = JsonFieldCollection.FromToken(json);
        }