Esempio n. 1
0
 /// <summary>
 /// Constructs a variable with the given properties.
 /// </summary>
 internal Variable(string name, byte offset, byte minLength, byte length, VariableFormat format, byte padding, bool verifyEntry)
 {
     this.Name        = name;
     this.Offset      = offset;
     this.MinLength   = minLength;
     this.Length      = length;
     this.Format      = format;
     this.Padding     = padding;
     this.VerifyEntry = verifyEntry;
 }
Esempio n. 2
0
 /// <summary>
 /// Appends variable data with the given properties to the data currently set
 /// </summary>
 /// <param name="name">Name of the variable</param>
 /// <param name="minLength">Minimal length of the avriable</param>
 /// <param name="length">Length of the variable</param>
 /// <param name="format">Format of the variable</param>
 /// <param name="padding">Padding that is used, if minLength is less than length</param>
 /// <param name="verifyEntry">States, whether the input of the variable data (while resolving the variable) shall be validated by 'double input'</param>
 public void AppendVariableData(string name, byte minLength, byte length, VariableFormat format, byte padding, bool verifyEntry)
 {
     this.Variables.Add(new Variable(name, (byte)this.Data.Length, minLength, length, format, padding, verifyEntry));
     this.AppendData(new byte[length]);
 }