Example #1
0
 public PwEntryBuffer()
 {
     mEntry = new PwEntry(false, false);
     mEntryStandardStrings = new ProtectedStandardFieldDictionaryBuffer(mEntry.Strings);
     mEntryCustomStrings   = new ProtectedCustomFieldDictionaryBuffer(mEntry.Strings);
     mEntryBinaries        = new NamedProtectedBinaryListBuffer(mEntry.Binaries);
 }
Example #2
0
            private void BeforeSerialization(SerializationContext context)
            {
                var bufferContext = (BufferContext)context.Context;

                // ProtectedStringDictionaryBuffer nver gets its own ProtoBeforeSerialization called as it's a list of objects rather than an object itself
                List <KeyValuePair <String, ProtectedString> > customFields;

                mEntryStandardStrings = new ProtectedStandardFieldDictionaryBuffer(mEntry.Strings, (int)mEntry.Strings.UCount, bufferContext, out customFields);
                mEntryCustomStrings   = new ProtectedCustomFieldDictionaryBuffer(customFields);
                mEntryBinaries        = new NamedProtectedBinaryListBuffer(mEntry.Binaries, (int)mEntry.Binaries.UCount, bufferContext);
            }