コード例 #1
0
        public TBase Deserialize <TBase>(byte[] serializedProxy)
        {
            var baseType = typeof(TBase);

            proxyProvider.Declare(baseType);

            if (false)
            {
                return(default(TBase));
            }

            var mappingChain = proxyProvider.GetMappingChain(baseType);
            var proxyType    = mappingChain.Last().ProxyType;

            var proxy = serializer.Deserialize(serializedProxy, proxyType);

            return((TBase)mappingChain.Reverse().Aggregate(proxy, (current, t) => t.Deserialize(current)));
        }