internal void CopyFrom(ODataEntryAnnotations src)
 {
     if (src != null)
     {
         this.Id                  = src.Id;
         this.TypeName            = src.TypeName;
         this.ReadLink            = src.ReadLink;
         this.EditLink            = src.EditLink;
         this.ETag                = src.ETag;
         this.AssociationLinks    = src.AssociationLinks;
         this.MediaResource       = src.MediaResource;
         this.InstanceAnnotations = src.InstanceAnnotations;
     }
     else
     {
         this.Id                  = null;
         this.TypeName            = null;
         this.ReadLink            = null;
         this.EditLink            = null;
         this.ETag                = null;
         this.AssociationLinks    = null;
         this.MediaResource       = null;
         this.InstanceAnnotations = null;
     }
 }
        private IDictionary <string, object> DataWithAnnotations(
            IDictionary <string, object> data, ODataEntryAnnotations annotations)
        {
            var dataWithAnnotations = new Dictionary <string, object>(data);

            dataWithAnnotations.Add(FluentCommand.AnnotationsLiteral, annotations);
            return(dataWithAnnotations);
        }
示例#3
0
 public void SetAnnotations(ODataEntryAnnotations annotations)
 {
     if (this.Annotations == null)
     {
         this.Annotations = annotations;
     }
     else
     {
         this.Annotations.Merge(annotations);
     }
 }
 internal void Merge(ODataEntryAnnotations src)
 {
     if (src != null)
     {
         this.Id                  = this.Id ?? src.Id;
         this.TypeName            = this.TypeName ?? src.TypeName;
         this.ReadLink            = this.ReadLink ?? src.ReadLink;
         this.EditLink            = this.EditLink ?? src.EditLink;
         this.ETag                = this.ETag ?? src.ETag;
         this.AssociationLinks    = this.AssociationLinks ?? src.AssociationLinks;
         this.MediaResource       = this.MediaResource ?? src.MediaResource;
         this.InstanceAnnotations = this.InstanceAnnotations ?? src.InstanceAnnotations;
     }
 }
示例#5
0
 public AnnotatedEntry(IDictionary <string, object> data, ODataEntryAnnotations annotations = null)
 {
     this.Data        = data;
     this.Annotations = annotations;
 }