Beispiel #1
0
 /// <summary>Copy constructor.</summary>
 /// <param name="source">The source to copy.</param>
 public AnnotatedBase(AnnotatedBase source)
 {
     if (source != null)
     {
         this.annotations = new Dictionary <string, object>(source.annotations);
     }
 }
Beispiel #2
0
 /// <summary>Combines annotations on this class with the ones on the source. This class always wins.</summary>
 /// <param name="source">The annotations to combine.</param>
 public void CombineAnnotations(AnnotatedBase source)
 {
     if (source.annotations == null)
     {
         return;
     }
     EnsureAnnotations();
     foreach (var kv in source.annotations)
     {
         if (!this.annotations.ContainsKey(kv.Key))
         {
             this.annotations[kv.Key] = kv.Value;
         }
     }
 }
Beispiel #3
0
 /// <summary>Constructor</summary>
 /// <param name="source">Another request description to copy annotations from.</param>
 public ResourceContainerDescription(AnnotatedBase source) : base(source)
 {
 }
Beispiel #4
0
 /// <summary>Copy constructor.</summary>
 /// <param name="source">The source to copy.</param>
 public RequestDescription(AnnotatedBase source) : base(source)
 {
 }