public Field(string name, int nthOfType, FieldType type, bool isSigningField = true, bool isSerialised = true) : base(name, (type.Ordinal << 16 | nthOfType)) { // catch auxiliary fields var valid = (nthOfType > 0) && nthOfType < 256 && type.Ordinal > 0 && type.Ordinal < 256; Type = type; IsSigningField = valid && isSigningField; IsSerialised = valid && isSerialised; NthOfType = nthOfType; IsVlEncoded = IsVlEncodedType(); Header = CalculateHeader(); Values.AddEnum(this); }
public FieldType(string name, int ordinal) : base(name, ordinal) { Values.AddEnum(this); }
private static LedgerEntryType Add(string reference, int ordinal) { return(Values.AddEnum(new LedgerEntryType(reference, ordinal))); }
private static TransactionType Add(string name, int ordinal) { return(Values.AddEnum(new TransactionType(name, ordinal))); }