protected override ProxyGeneratorBuildResult BuildProxyGenerator(Type interfaceType) { // get all event interfaces supported by this actorInterface and build method dispatchers for those var actorEventInterfaces = interfaceType.GetActorEventInterfaces(); var actorEventDispatchers = actorEventInterfaces.Select( t => this.eventCodeBuilder.GetOrBuilderMethodDispatcher(t).MethodDispatcher); IEnumerable <ActorMethodDispatcherBase> actorMethodDispatcherBases = actorEventDispatchers.Cast <ActorMethodDispatcherBase>(); // register them with the event subscriber manager ActorEventSubscriberManager.Singleton.RegisterEventDispatchers(actorMethodDispatcherBases); // create all actor interfaces that this interface derives from var actorInterfaces = new List <Type>() { interfaceType }; actorInterfaces.AddRange(interfaceType.GetActorInterfaces()); // create interface descriptions for all interfaces var actorInterfaceDescriptions = actorInterfaces.Select <Type, InterfaceDescription>( t => ActorInterfaceDescription.CreateUsingCRCId(t)); var res = this.proxyGeneratorBuilder.Build(interfaceType, actorInterfaceDescriptions); InterfaceDetailsStore.UpdateKnownTypesDetails(actorInterfaceDescriptions); return(res); }
protected MethodDispatcherBuildResult BuildMethodDispatcher(Type interfaceType) { var actorInterfaceDescription = ActorInterfaceDescription.CreateUsingCRCId(interfaceType); var res = this.methodDispatcherBuilder.Build(actorInterfaceDescription); return(res); }
protected override MethodDispatcherBuildResult BuildMethodDispatcher(Type interfaceType) { var actorInterfaceDescription = ActorInterfaceDescription.CreateUsingCRCId(interfaceType); var res = this.methodDispatcherBuilder.Build(actorInterfaceDescription); InterfaceDetailsStore.UpdateKnownTypeDetail(actorInterfaceDescription); return(res); }
protected MethodBodyTypesBuildResult BuildMethodBodyTypes(Type interfaceType) { var actorInterfaceDescriptions = ActorInterfaceDescription.CreateUsingCRCId(interfaceType); var result = this.methodBodyTypesBuilder.Build(actorInterfaceDescriptions); InterfaceDetailsStore.UpdateKnownTypeDetail(actorInterfaceDescriptions, result); return(result); }
internal ActorMethodFriendlyNameBuilder(ActorTypeInformation actorTypeInformation) { this.actorMethodDescriptions = new Dictionary <Type, ActorInterfaceDescription>(); this.actorMethodDescriptionsV2 = new Dictionary <Type, ActorInterfaceDescription>(); foreach (var actorInterfaceType in actorTypeInformation.InterfaceTypes) { var actorInterfaceDescription = ActorInterfaceDescription.Create(actorInterfaceType); this.actorMethodDescriptions[actorInterfaceType] = actorInterfaceDescription; var actorInterfaceDescriptionV2 = ActorInterfaceDescription.CreateUsingCRCId(actorInterfaceType); this.actorMethodDescriptionsV2[actorInterfaceType] = actorInterfaceDescriptionV2; } }
protected ActorProxyGeneratorBuildResult BuildProxyGenerator(Type interfaceType) { // create all actor interfaces that this interface derives from var actorInterfaces = new List <Type>() { interfaceType }; actorInterfaces.AddRange(interfaceType.GetActorInterfaces()); // create interface descriptions for all interfaces var actorInterfaceDescriptions = actorInterfaces.Select <Type, InterfaceDescription>( t => ActorInterfaceDescription.CreateUsingCRCId(t)); var res = this.proxyGeneratorBuilder.Build(interfaceType, actorInterfaceDescriptions); return(res); }