/// <summary> /// Initializes a new <see cref="BINFileValuePair"/> from a <see cref="BinaryReader"/> /// </summary> /// <param name="br">The <see cref="BinaryReader"/> to read from</param> /// <param name="parent">The parent of this <see cref="BINFileValuePair"/></param> /// <param name="keyType">The <see cref="BINFileValueType"/> of the Key of this <see cref="BINFileValuePair"/></param> /// <param name="valueType">The <see cref="BINFileValueType"/> of the Value of this <see cref="BINFileValuePair"/></param> public BINFileValuePair(BinaryReader br, object parent, BINFileValueType keyType, BINFileValueType valueType) { this.Parent = parent; this.KeyType = keyType; this.ValueType = valueType; this.Pair = new KeyValuePair <BINFileValue, BINFileValue>(new BINFileValue(br, this, keyType), new BINFileValue(br, this, valueType)); }
public BINFileMap(object parent, BINFileValueType keyType, BINFileValueType valueType, List <BINFileValuePair> entries) { this.Parent = parent; this.KeyType = keyType; this.ValueType = valueType; foreach (BINFileValuePair valuePair in entries) { //valuePair.Pair.Key.SetParent(this); //valuePair.Pair.Value.SetParent(this); if (valuePair.KeyType != this.KeyType || valuePair.ValueType != this.ValueType) { throw new Exception("keyType or valueType do not match with types in entries"); } } }
public BINFileValuePair(object parent, BINFileValueType keyType, BINFileValueType valueType) { this.Parent = parent; this.KeyType = keyType; this.ValueType = valueType; }