示例#1
0
        public void SetInt64(string keyName, long value)
        {
            DxBaseValue result;

            if (records.TryGetValue(keyName, out result))
            {
                switch (result.Type)
                {
                case ValueType.VT_Array:
                    ((DxArrayValue)result).Clear();
                    break;

                case ValueType.VT_Map:
                    ((DxRecordValue)result).Clear();
                    break;

                default:
                    result.AsInt64 = value;
                    return;
                }
                records[keyName] = new DxInt64Value(value);
                return;
            }
            records.Add(keyName, new DxInt64Value(value));
        }
示例#2
0
        public void SetInt64(int idx, long value)
        {
            idx = ifNilInitArr2idx(idx);
            DxBaseValue v = arrayList[idx];

            if (v != null && v.Type != ValueType.VT_Array && v.Type != ValueType.VT_Map)
            {
                arrayList[idx].AsInt64 = value;
                return;
            }
            arrayList[idx] = new DxInt64Value(value);
        }