/// <summary> /// Copies the fields from this variable into another previously created /// <see cref="SpssVariable"/>. /// </summary> protected virtual void CloneTo(SpssVariable other) { if (other == null) { throw new ArgumentNullException("other"); } other.Name = Name; other.Label = Label; other.ColumnWidth = ColumnWidth; }
/// <summary> /// Creates an instance of the <see cref="SpssVariableValueLabelsDictionary<TKey>"/> class. /// </summary> /// <param name="variable">The hosting variable</param> /// <param name="comparer">The comparer; may be <c>null</c>.</param> protected SpssVariableValueLabelsDictionary(SpssVariable variable, IEqualityComparer <TKey> comparer) { if (variable == null) { throw new ArgumentNullException("variable"); } this.Variable = variable; this.ValuesLabels = new Dictionary <TKey, string>(4, comparer); }
protected override void CloneTo(SpssVariable spssVar) { base.CloneTo(spssVar); SpssStringVariable other = spssVar as SpssStringVariable; if (other == null) { throw new ArgumentException("Must be of type " + GetType().Name + ".", "other"); } other.Length = Length; this.valueLabels.CopyTo(other.valueLabels); }
protected override void CloneTo(SpssVariable spssVar) { base.CloneTo(spssVar); SpssNumericVariable other = spssVar as SpssNumericVariable; if (other == null) { throw new ArgumentException("Must be of type " + GetType().Name + ".", "other"); } other.PrintDecimal = this.PrintDecimal; other.PrintFormat = this.PrintFormat; other.PrintWidth = this.PrintWidth; other.WriteDecimal = this.WriteDecimal; other.WriteFormat = this.WriteFormat; other.WriteWidth = this.WriteWidth; other.MissingValueFormat = this.MissingValueFormat; other.MissingValues = new List <double>(this.MissingValues); this.valueLabels.CopyTo(other.valueLabels); }
/// <summary> /// Initializes a new instance of the <see cref="SpssNumericVariableValueLabelsDictionary"/> class. /// </summary> /// <param name="variable">The variable containing this collection.</param> public SpssNumericVariableValueLabelsDictionary(SpssVariable variable) : base(variable, null) { }
/// <summary> /// Copies the fields from this variable into another previously created /// <see cref="SpssVariable"/>. /// </summary> protected virtual void CloneTo(SpssVariable other) { if (other == null) throw new ArgumentNullException("other"); other.Name = Name; other.Label = Label; other.ColumnWidth = ColumnWidth; }
protected override void CloneTo(SpssVariable spssVar) { base.CloneTo(spssVar); SpssNumericVariable other = spssVar as SpssNumericVariable; if (other == null) { throw new ArgumentException("Must be of type " + GetType().Name + ".", "other"); } other.PrintDecimal = this.PrintDecimal; other.PrintFormat = this.PrintFormat; other.PrintWidth = this.PrintWidth; other.WriteDecimal = this.WriteDecimal; other.WriteFormat = this.WriteFormat; other.WriteWidth = this.WriteWidth; other.MissingValueFormat = this.MissingValueFormat; other.MissingValues = new List<double>(this.MissingValues); this.valueLabels.CopyTo(other.valueLabels); }
/// <summary> /// Creates an instance of the <see cref="SpssStringVariableValueLabelsDictionary"/> class. /// </summary> public SpssStringVariableValueLabelsDictionary(SpssVariable variable) : base(variable, StringComparer.Ordinal) { }
protected override void CloneTo(SpssVariable spssVar) { base.CloneTo(spssVar); SpssStringVariable other = spssVar as SpssStringVariable; if (other == null) throw new ArgumentException("Must be of type " + GetType().Name + ".", "other"); other.Length = Length; this.valueLabels.CopyTo(other.valueLabels); }