Ejemplo n.º 1
0
 /// <summary>
 /// Copies the Name and Extras values to <paramref name="target"/> only if the values are defined.
 /// </summary>
 /// <param name="target">The target object</param>
 internal void TryCopyNameAndExtrasTo(Schema2.LogicalChildOfRoot target)
 {
     if (this.Name != null)
     {
         target.Name = this.Name;
     }
     if (this.Extras.Content != null)
     {
         target.Extras = this.Extras.DeepClone();
     }
 }
Ejemplo n.º 2
0
        public static void MustShareLogicalParent(Schema2.ModelRoot a, string aName, Schema2.LogicalChildOfRoot b, string bName)
        {
            if (a is null)
            {
                throw new ArgumentNullException(aName);
            }
            if (b is null)
            {
                throw new ArgumentNullException(bName);
            }

            if (a != b.LogicalParent)
            {
                throw new ArgumentException("LogicalParent mismatch", bName);
            }
        }
Ejemplo n.º 3
0
 internal void SetNameAndExtrasFrom(Schema2.LogicalChildOfRoot source)
 {
     this.Name   = source.Name;
     this.Extras = source.Extras.DeepClone();
 }
Ejemplo n.º 4
0
 public static void MustShareLogicalParent(Schema2.LogicalChildOfRoot a, Schema2.LogicalChildOfRoot b, string parameterName)
 {
     MustShareLogicalParent(a?.LogicalParent, nameof(a.LogicalParent), b, parameterName);
 }