Ejemplo n.º 1
0
 public JOperateNum(string fieldName, JFieldType valueType)
     : this()
 {
     this.FieldName = fieldName;
     this.ValueType = valueType;
     this.Values    = new List <object>();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Read a single field from JMP.
 /// </summary>
 /// <param name="br">Binary Reader to use.</param>
 public JField(DhBinaryReader br)
 {
     Hash    = br.ReadU32();
     Bitmask = br.ReadU32();
     Offset  = br.ReadU16();
     Shift   = br.ReadS8();
     Type    = (JFieldType)br.ReadU8();
     Name    = JMPUtils.HashToName(Hash);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initialize a new empty field.
 /// </summary>
 public JField()
 {
     Hash    = 0;
     Bitmask = 0;
     Offset  = 0;
     Shift   = 0;
     Type    = JFieldType.INTEGER;
     Name    = "";
 }
Ejemplo n.º 4
0
        private string GetFileValueFormat(JFieldType valueType)
        {
            switch (valueType)
            {
            case JFieldType.Numeric: return(NumericFieldValueFormat + ",");

            case JFieldType.String: return(StringFieldValueFormat + ",");

            case JFieldType.DateTime: return(DateTimeFieldValueFormat + ",");

            default: return(StringFieldValueFormat);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Read a single field from JMP.
        /// </summary>
        /// <param name="br">Binary Reader to use.</param>
        public JField(DhBinaryReader br)
        {
            // Read field's hash.
            Hash = br.ReadU32();

            // Read field's bitmask.
            Bitmask = br.ReadU32();

            // Read field's offset.
            Offset = br.ReadU16();

            // Read field's shift.
            Shift = br.ReadS8();

            // Read field's type.
            Type = (JFieldType)br.ReadU8();

            // Resolve field's hash to get field name.
            Name = JMPUtils.HashToName(Hash);
        }
Ejemplo n.º 6
0
 public FieldValueTypeNotSupportOperatorException(string filedName, JFieldType valueType, string operate)
     : base(string.Format("{0}不支持{1},Filed:{2}", valueType.ToString(), operate, filedName))
 {
 }
Ejemplo n.º 7
0
 public FieldValueTypeNotSupportValueCategroyException(string filedName, JFieldType valueType, JValueCategroy sourceValueCategroy)
     : base(string.Format("{0}不支持{1},Filed:{2}", valueType.ToString(), sourceValueCategroy.ToString(), filedName))
 {
 }
Ejemplo n.º 8
0
 private NotSupportedException GetException(string filedName, JFieldType valueType, JValueCategroy sourceValueCategroy)
 {
     throw new NotSupportedException(string.Format("{0}不支持{1},Filed:{2}", valueType.ToString(), sourceValueCategroy.ToString(), filedName));
 }
Ejemplo n.º 9
0
 public FieldValueTypeNotSupportValueCategroyException(string filedName, JFieldType valueType, JValueCategroy sourceValueCategroy)
     : base(string.Format("{0}不支持{1},Filed:{2}", valueType.ToString(), sourceValueCategroy.ToString(), filedName))
 {
 }
Ejemplo n.º 10
0
 private string GetFileValueFormat(JFieldType valueType)
 {
     switch (valueType)
     {
         case JFieldType.Numeric: return NumericFieldValueFormat + ",";
         case JFieldType.String: return StringFieldValueFormat + ",";
         case JFieldType.DateTime: return DateTimeFieldValueFormat + ",";
         default: return StringFieldValueFormat;
     }
 }
Ejemplo n.º 11
0
 private NotSupportedException GetException(string filedName, JFieldType valueType, JValueCategroy sourceValueCategroy)
 {
     throw new NotSupportedException(string.Format("{0}不支持{1},Filed:{2}", valueType.ToString(), sourceValueCategroy.ToString(), filedName));
 }
Ejemplo n.º 12
0
 public FieldValueTypeNotSupportOperatorException(string filedName, JFieldType valueType, string operate)
     : base(string.Format("{0}不支持{1},Filed:{2}", valueType.ToString(), operate, filedName))
 {
 }
Ejemplo n.º 13
0
 public JOperateNum(string fieldName, JFieldType valueType)
     : this()
 {
     this.FieldName = fieldName;
     this.ValueType = valueType;
     this.Values = new List<object>();
 }