/// <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(); } }
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); } }
internal void SetNameAndExtrasFrom(Schema2.LogicalChildOfRoot source) { this.Name = source.Name; this.Extras = source.Extras.DeepClone(); }
public static void MustShareLogicalParent(Schema2.LogicalChildOfRoot a, Schema2.LogicalChildOfRoot b, string parameterName) { MustShareLogicalParent(a?.LogicalParent, nameof(a.LogicalParent), b, parameterName); }