public LongDepotDictionaryField(string[] includedKeys = null, ConstraintDescriptorFlags[] cdFlags = null, long[] cdValues = null) { if (includedKeys != null) { this.IncludedKeys = includedKeys; } if (cdFlags != null && cdValues != null) { if (cdFlags.Length != cdValues.Length) { throw new Exception("ConstraintDescriptor flags and values arrays must be of same length"); } Constraints = new LongConstraintDescriptor(cdFlags, cdValues); if (includedKeys != null) { priority = 1; } else { priority = -1; } } else { Constraints = new LongConstraintDescriptor(new ConstraintDescriptorFlags[0], new long[0]); if (includedKeys != null) { priority = 0; } else { priority = -1; } } }
public LongBackedField(string fieldName, FieldDescriptorFlags flags = FieldDescriptorFlags.NONE, long defaultValue = 0, ConstraintDescriptorFlags[] cdFlags = null, long[] cdValues = null) { FieldName = fieldName; Flags = flags; DefaultValue = defaultValue; if (cdFlags != null && cdValues != null) { if (cdFlags.Length != cdValues.Length) { throw new Exception("ConstraintDescriptor flags and values arrays must be of same length"); } Constraints = new LongConstraintDescriptor(cdFlags, cdValues); } else { Constraints = new LongConstraintDescriptor(new ConstraintDescriptorFlags[0], new long[0]); } }