Пример #1
0
        public GeneratedProxies(
            CommandProxies commandProxies,
            CommandSecurityProxies commandSecurityProxies,
            QueryProxies queryProxies,
            ReadModelProxies readModelProxies,
            ServiceProxies serviceProxies,
            NamespaceConfigurationProxies namespaceConfigurationProxies,
#if (NET461)
            HubProxies hubProxies,
#endif
            ITypeFinder typeFinder,
            IContainer container)
        {
            var builder = new StringBuilder();

            builder.Append(commandProxies.Generate());
            builder.Append(commandSecurityProxies.Generate());
            builder.Append(readModelProxies.Generate());
            builder.Append(queryProxies.Generate());
            builder.Append(serviceProxies.Generate());
            builder.Append(namespaceConfigurationProxies.Generate());
#if (NET461)
            builder.Append(hubProxies.Generate());
#endif

            var generatorTypes = typeFinder.FindMultiple <IProxyGenerator>().Where(t => !t.Namespace.StartsWith("Dolittle"));
            foreach (var generatorType in generatorTypes)
            {
                var generator = container.Get(generatorType) as IProxyGenerator;
                builder.Append(generator.Generate());
            }

            All = builder.ToString();
        }
Пример #2
0
 protected ApiHubController()
 {
     _proxies = HubProxies.Instance;
 }