Esempio n. 1
0
        public void MethodWithContext()
        {
            var context = new MethodTestContext {
                Value = 3
            };
            var x = new MethodTestWithContext {
                InnerValue = 3, CachedValue = 3
            };

            _setupSerializer      = s => (s as IBinary).SetCustomHookContext(context);
            _setupSerializerGraph = s => (s as IBinary).SetCustomHookContext(context);

            RoundTrip(x);
        }
Esempio n. 2
0
 private void AfterDeserializationMethod(MethodTestContext context)
 {
     CachedValue = (context?.Value) ?? 255;
 }