Пример #1
0
 public SqlExpr Clone()
 {
     if (_placedHolders == null)
     {
         return(new SqlExpr(_value.Clone()));
     }
     else
     {
         return(new SqlExpr(_value.Clone(), new Dictionary <string, INode>(_placedHolders)));
     }
 }
Пример #2
0
        //---------------------------------------------------------------------------------------------

        /*  Constructs a Matrix object representing a scalar value
         */
        public Matrix(IValue value) : this()
        {
            m_nRows          = 1;
            m_nCols          = 1;
            m_eStorageScheme = EMatrixStorageScheme.mssROWS_FIRST;
            m_vData          = new [] { (IValue)value.Clone() };
        }
Пример #3
0
        public static OperatorPart.Function CreateValueFunction(IValue value)
        {
            var valueFunction = new ValueFunction();

            valueFunction.Value = value.Clone();
            return(valueFunction);
        }
Пример #4
0
        public static DefaultValueFunction CreateDefaultValueFunction(IValue value)
        {
            var valueFunction = new DefaultValueFunction();

            valueFunction.Value = value.Clone();
            return(valueFunction);
        }
Пример #5
0
 //---------------------------------------------------------------------------------------------
 public Matrix(long nRows, long nCols, IValue value)
 {
     m_nRows          = nRows;
     m_nCols          = nCols;
     m_eStorageScheme = EMatrixStorageScheme.mssROWS_FIRST;
     m_vData          = new IValue[nRows * nCols];
     for (long l = 0; l < nRows * nCols; l++)
     {
         m_vData[l] = (IValue)value.Clone();
     }
 }
Пример #6
0
        /// <summary>
        /// <see cref="IElement.Clone" />
        /// </summary>
        public override object Clone()
        {
            var temp = new AssignTempInstruction {
                TempName = _tempName
            };

            if (_value != null)
            {
                temp.AddValue((IValue)_value.Clone());
            }
            return(temp);
        }
Пример #7
0
        /// <summary>
        /// <see cref="IElement.Clone" />
        /// </summary>
        public override object Clone()
        {
            var valueCondition = new ValueCondition();

            if (_leftValue != null)
            {
                valueCondition.LeftValue = (IValue)_leftValue.Clone();
            }
            if (_rightValue != null)
            {
                valueCondition.RightValue = (IValue)_rightValue.Clone();
            }
            valueCondition.Equationtype = _equationtype;
            return(valueCondition);
        }
Пример #8
0
        public IValue ImportValue(IValue value, bool overwrite)
        {
            using (Vault.ExposeReadWrite())
            {
                using (value.Vault.ExposeReadWrite())
                {
                    var existing = GetValue(value.Name);
                    if (existing != null)
                    {
                        overwrite.AssertTrue();
                        existing.Delete();
                    }

                    return(AttachValue(value.Clone()));
                }
            }
        }
Пример #9
0
 public Result(IValue value)
 {
     _result = value?.Clone();
 }
Пример #10
0
        public IValue ImportValue(IValue value, bool overwrite)
        {
            using (Vault.ExposeReadWrite())
            {
                using (value.Vault.ExposeReadWrite())
                {
                    var existing = GetValue(value.Name);
                    if (existing != null)
                    {
                        overwrite.AssertTrue();
                        existing.Delete();
                    }

                    return AttachValue(value.Clone());
                }
            }
        }