Пример #1
0
        static partial void JsonSource(ref JToken json)
        {
            JsonRelationType_UnitTests.PopulateLinkTypes();
            var retVal = new JObject();

            retVal.Add("rel", "ExternalLinkImpl.Rel");
            json = retVal;
        }
        static partial void JsonSource(ref JArray json)
        {
            JsonRelationType_UnitTests.PopulateLinkTypes();

            JObject   o         = CannedMessages.SampleWorkItemsWithRelations;
            var       firstItem = (JObject)o["value"].Value <JArray>()[0];
            JProperty property  = firstItem.Properties().FirstOrDefault(p => p.Name == "relations");
            var       array     = (JArray)property.Value;

            json = array;
        }