public TrwSerializationReadContext(ITrwReader reader, ITrwSerializationHandlerContainer handlers, IReadOnlyDictionary <string, Type> typeAliases, TrwSerializationOptions options) { Reader = reader; this.handlers = handlers; this.typeAliases = typeAliases; this.options = options; Bag = new Dictionary <string, object>(); reader.MoveNext(); }
public TrwSerializationWriteContext(ITrwWriter stream, ITrwSerializationHandlerContainer handlers, IReadOnlyList <ITrwSerializationTypeRedirect> typeRedirects, TrwSerializationOptions options) { Writer = stream; TypeAliases = new Dictionary <Type, string>(); this.handlers = handlers; this.typeRedirects = typeRedirects; this.options = options; Bag = new Dictionary <string, object>(); }
public TrwSerializationDiffApplier(ITrwSerializationHandlerContainer handlers, IReadOnlyList <ITrwSerializationTypeRedirect> typeRedirects, Action <IDictionary <string, object> > fillWriteBag, Action <IDictionary <string, object> > fillReadBag) { this.handlers = handlers; this.typeRedirects = typeRedirects; this.fillWriteBag = fillWriteBag; this.fillReadBag = fillReadBag; serializationOptions = new TrwSerializationOptions { ExplicitTypes = TrwSerializationExplicitTypes.WhenObject, ValuePropertyName = ValuePropertyName, TypePropertyName = TypePropertyName, AliasTypes = false }; }