public InfrastructureToResourcesRenderer(
     IResourceGroupTargetingStrategy resourceGroupTargetingStrategy,
     IResourceLocationTargetingStrategy resourceLocationTargetingStrategy,
     IAzureConnector azureConnector,
     IAzureInfrastructureEnvironment environment,
     TinyIoCContainer ioc) : base(resourceGroupTargetingStrategy, resourceLocationTargetingStrategy, environment, ioc)
 {
     _azureConnector = azureConnector;
 }
Example #2
0
 public InfrastructureToTemplateJsonRenderer(
     IAzureDeploymentTemplateWriter templateWriter,
     IResourceGroupTargetingStrategy resourceGroupTargetingStrategy,
     IResourceLocationTargetingStrategy resourceLocationTargetingStrategy,
     IAzureInfrastructureEnvironment environment,
     TinyIoCContainer ioc) : base(resourceGroupTargetingStrategy, resourceLocationTargetingStrategy, environment, ioc)
 {
     _templateWriter = templateWriter;
 }
 protected AzureInfrastructureRenderer(
     IResourceGroupTargetingStrategy resourceGroupTargetingStrategy,
     IResourceLocationTargetingStrategy resourceLocationTargetingStrategy,
     IAzureInfrastructureEnvironment environment,
     TinyIoCContainer ioc)
 {
     _resourceGroupTargetingStrategy    = resourceGroupTargetingStrategy;
     _resourceLocationTargetingStrategy = resourceLocationTargetingStrategy;
     _environment = environment;
     Ioc          = ioc;
 }
Example #4
0
        private InfrastructureToResourcesRenderer GivenARenderer(
            IAzure azure,
            IResourceGroupTargetingStrategy resourceGroupTargetingStrategy       = null,
            IResourceLocationTargetingStrategy resourceLocationTargetingStrategy = null,
            TinyIoCContainer ioc = null
            )
        {
            resourceGroupTargetingStrategy = resourceGroupTargetingStrategy ??
                                             new ResourceGroupPerEnvironmentStrategy(e => "test");

            resourceLocationTargetingStrategy = resourceLocationTargetingStrategy ??
                                                new FixedResourceLocationTargetingStrategy("westeurope");

            ioc = ioc ?? WithRenderers(new TinyIoCContainer());

            var renderer = new InfrastructureToResourcesRenderer(
                resourceGroupTargetingStrategy,
                resourceLocationTargetingStrategy,
                GetAzureConnector(azure),
                Environment,
                ioc);

            return(renderer);
        }
 public InfrastructureRendererBuilder <TInfrastructureRenderer> UsingLocations(IResourceLocationTargetingStrategy locations)
 {
     Ioc.Register(locations);
     return(this);
 }