コード例 #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);
        }
コード例 #5
0
 /// <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
ファイル: SpssVariable.cs プロジェクト: WMichta/SPSS.NET
 /// <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);
 }