Esempio n. 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();
        }
Esempio n. 2
0
        public GeneratedProxies(
            CommandProxies commandProxies,
            CommandSecurityProxies commandSecurityProxies,
            QueryProxies queryProxies,
            ReadModelProxies readModelProxies,
            ServiceProxies serviceProxies,
            NamespaceConfigurationProxies namespaceConfigurationProxies,
            ITypeDiscoverer typeDiscoverer,
            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());

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

            All = builder.ToString();
        }