Пример #1
0
 /// <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;
 }
Пример #2
0
        /// <summary>
        /// Creates an instance of the <see cref="SpssVariableValueLabelsDictionary&lt;TKey&gt;"/> 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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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)
 {
 }
Пример #6
0
 /// <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;
 }
Пример #7
0
 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);
 }
Пример #8
0
 /// <summary>
 /// Creates an instance of the <see cref="SpssStringVariableValueLabelsDictionary"/> class.
 /// </summary>
 public SpssStringVariableValueLabelsDictionary(SpssVariable variable)
     : base(variable, StringComparer.Ordinal)
 {
 }
Пример #9
0
 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);
 }