protected static void AddChildInstanceAnnotations(ODataItem item, IList <object> childEntries) { var annotation = item.GetAnnotation <ChildInstanceAnnotation>(); if (annotation == null) { annotation = new ChildInstanceAnnotation { ChildInstances = childEntries }; item.SetAnnotation(annotation); } }
private void AddChildInstanceAnnotation(ODataItem item, object childEntry) { var annotation = item.GetAnnotation <ChildInstanceAnnotation>(); if (annotation == null) { annotation = new ChildInstanceAnnotation { ChildInstances = new List <object>() }; item.SetAnnotation(annotation); } annotation.ChildInstances.Add(childEntry); }
private void AddBoundNavigationPropertyAnnotation(ODataItem item, ODataNestedResourceInfo navigationLink, object boundValue) { var annotation = item.GetAnnotation <BoundNavigationPropertyAnnotation>(); if (annotation == null) { annotation = new BoundNavigationPropertyAnnotation { BoundProperties = new List <Tuple <ODataNestedResourceInfo, object> >() }; item.SetAnnotation(annotation); } annotation.BoundProperties.Add(new Tuple <ODataNestedResourceInfo, object>(navigationLink, boundValue)); }
private void AddChildInstanceAnnotation(ODataItem item, object childEntry) { var annotation = item.GetAnnotation<ChildInstanceAnnotation>(); if (annotation == null) { annotation = new ChildInstanceAnnotation { ChildInstances = new List<object>() }; item.SetAnnotation(annotation); } annotation.ChildInstances.Add(childEntry); }
private void AddBoundNavigationPropertyAnnotation(ODataItem item, ODataNavigationLink navigationLink, object boundValue) { var annotation = item.GetAnnotation<BoundNavigationPropertyAnnotation>(); if (annotation == null) { annotation = new BoundNavigationPropertyAnnotation { BoundProperties = new List<Tuple<ODataNavigationLink, object>>() }; item.SetAnnotation(annotation); } annotation.BoundProperties.Add(new Tuple<ODataNavigationLink, object>(navigationLink, boundValue)); }