public void WriteBinary(BinaryWriter w) { ConvertToImmutable(); if (_existingValues == null) { _existingValues = new ImmutableStringStore(new String8Set(String8.Empty, 1, new PartialArray <int>())); } _existingValues.WriteBinary(w); }
public void ReadBinary(BinaryReader r) { // All values are serialized in immutable form, so only an ImmutableStringStore is created on load ImmutableStringStore store = new ImmutableStringStore(); store.ReadBinary(r); _addedValues = null; _existingValues = store; }
public bool ConvertToImmutable() { // If there are added values, we need to convert for serialization if (_addedValues != null) { if (_existingValues != null) { // Need to implement index merging for this throw new NotImplementedException(); } else { // Convert AddedValues to immutable form _existingValues = _addedValues.ConvertToImmutable(out _addedIdentifierToExistingIdentifier); _addedValues = null; return(true); } } return(false); }
public void Clear() { _existingValues = null; _addedValues = null; _addedIdentifierToExistingIdentifier = null; }