public StoredDataSpecifier(List<ArrayRange> indices, UInt32 kindId,
UInt64 generation, UsageManager manager) {
if (kindId == 0)
throw new ArgumentNullException(
"StoredDataSpecifier does not support null or 0 values");
if (manager.GetDataModelfromKindId(kindId) != ReloadGlobals.DataModel.ARRAY)
throw new ArgumentException(
"Use this contructor only for array data Fetch requests");
if (indices == null)
throw new ArgumentNullException(
"StoredDataSpecifier for array needs at least one ArrayRange!");
//While multiple ranges MAY be specified, they MUST NOT overlap.
indices.Sort();
myManager = manager;
this.kindId = kindId;
this.generation = generation;
this.indices = new List<ArrayRange>();
this.indices.AddRange(indices);
foreach (ArrayRange arrayRange in indices) {
length += (UInt16)8; // 2 times an UInt32
}
}