Esempio n. 1
0
        public override ProxyGeneratorBuildResult Build(
            Type proxyInterfaceType,
            IEnumerable <InterfaceDescription> interfaceDescriptions)
        {
            var result = base.Build(proxyInterfaceType, interfaceDescriptions);

            #if !DotNetCoreClr
            // This code is to support V1 stack serialization logic


            var methodBodyTypesResultsMap = interfaceDescriptions.ToDictionary(
                d => d,
                d => this.CodeBuilder.GetOrBuildMethodBodyTypes(d.InterfaceType));


            var requestBodyTypes = methodBodyTypesResultsMap.ToDictionary(
                item => item.Key.V1Id,
                item => item.Value.GetRequestBodyTypes());

            var responseBodyTypes = methodBodyTypesResultsMap.ToDictionary(
                item => item.Key.V1Id,
                item => item.Value.GetResponseBodyTypes());

            var v1ProxyGenerator = new Remoting.V1.Builder.ActorEventProxyGeneratorWith(
                proxyInterfaceType,
                null,
                requestBodyTypes,
                responseBodyTypes);

            ((ActorEventProxyGenerator)result.ProxyGenerator).InitializeV1ProxyGenerator(v1ProxyGenerator);
        #endif
            return(result);
        }
Esempio n. 2
0
 internal void Initialize(Remoting.V1.Builder.ActorEventProxyGeneratorWith actorEventProxyGeneratorWith)
 {
     this.proxyGeneratorWith = actorEventProxyGeneratorWith;
 }
Esempio n. 3
0
 internal void InitializeV1ProxyGenerator(Remoting.V1.Builder.ActorEventProxyGeneratorWith actorEventProxyGeneratorWith)
 {
     this.actorV1EventProxyGeneratorW = actorEventProxyGeneratorWith;
 }