// TODO ImportFromPot etc.
 private ResourceSyncStatistics ImportResourcesWithCollector(IResourceCollector collector)
 {
     collector.CollectResourceAssembly();
     collector.CollectResourceBundles();
     collector.DeleteBundles();
     return collector.Statistics;
 }
示例#2
0
 public CustomConnectorGenerator(string customConnectorName, string subscriptionId, string resourceGroup, IResourceCollector resourceCollector)
 {
     this.customConnectorName = customConnectorName;
     this.subscriptionId      = subscriptionId;
     this.resourceGroup       = resourceGroup;
     this.resourceCollector   = resourceCollector;
 }
 public TemplateGenerator(string LogicApp, string SubscriptionId, string ResourceGroup, IResourceCollector resourceCollector)
 {
     this.SubscriptionId    = SubscriptionId;
     this.ResourceGroup     = ResourceGroup;
     this.LogicApp          = LogicApp;
     this.resourceCollector = resourceCollector;
     template = JsonConvert.DeserializeObject <DeploymentTemplate>(GetResourceContent("LogicAppTemplate.Templates.starterTemplate.json"));
 }
 public IntegrationAccountGenerator(string artifactName, ARtifactType type, string integrationAccount, string subscriptionId, string resourceGroup, IResourceCollector resourceCollector)
 {
     this.integrationAccount = integrationAccount;
     this.subscriptionId     = subscriptionId;
     this.resourceGroup      = resourceGroup;
     this.resourceCollector  = resourceCollector;
     this.type         = type;
     this.artifactName = artifactName;
 }
示例#5
0
 public TemplateGenerator(string servicename, string subscriptionId, string resourceGroup, string apiFilters, bool exportGroups, bool exportProducts, bool exportPIManagementInstance, bool parametrizePropertiesOnly, IResourceCollector resourceCollector)
 {
     this.servicename                = servicename;
     this.subscriptionId             = subscriptionId;
     this.resourceGroup              = resourceGroup;
     this.apiFilters                 = apiFilters;
     this.exportGroups               = exportGroups;
     this.exportProducts             = exportProducts;
     this.exportPIManagementInstance = exportPIManagementInstance;
     this.parametrizePropertiesOnly  = parametrizePropertiesOnly;
     this.resourceCollector          = resourceCollector;
 }
        public TemplateGenerator(string LogicApp, string SubscriptionId, string ResourceGroup, IResourceCollector resourceCollector)
        {
            this.SubscriptionId    = SubscriptionId;
            this.ResourceGroup     = ResourceGroup;
            this.LogicApp          = LogicApp;
            this.resourceCollector = resourceCollector;
            var assembly     = System.Reflection.Assembly.GetExecutingAssembly();
            var resourceName = "LogicAppTemplate.Templates.starterTemplate.json";

            using (Stream stream = assembly.GetManifestResourceStream(resourceName))
                using (StreamReader reader = new StreamReader(stream))
                {
                    template = JsonConvert.DeserializeObject <DeploymentTemplate>(reader.ReadToEnd());
                }
        }
 public TemplateGenerator(string servicename, string subscriptionId, string resourceGroup, string apiFilters, bool exportGroups, bool exportProducts, bool exportPIManagementInstance, bool parametrizePropertiesOnly, IResourceCollector resourceCollector, bool replaceSetBackendServiceBaseUrlAsProperty = false, bool fixedServiceNameParameter = false, bool createApplicationInsightsInstance = false, string apiVersion = null)
 {
     this.servicename                = servicename;
     this.subscriptionId             = subscriptionId;
     this.resourceGroup              = resourceGroup;
     this.apiFilters                 = apiFilters;
     this.exportGroups               = exportGroups;
     this.exportProducts             = exportProducts;
     this.exportPIManagementInstance = exportPIManagementInstance;
     this.parametrizePropertiesOnly  = parametrizePropertiesOnly;
     this.replaceSetBackendServiceBaseUrlAsProperty = replaceSetBackendServiceBaseUrlAsProperty;
     this.resourceCollector                 = resourceCollector;
     this.fixedServiceNameParameter         = fixedServiceNameParameter;
     this.createApplicationInsightsInstance = createApplicationInsightsInstance;
     this.apiVersion = apiVersion;
 }
 public TemplateGenerator(string servicename, string subscriptionId, string resourceGroup, string apiFilters, bool exportGroups, bool exportProducts, bool exportPIManagementInstance, bool parametrizePropertiesOnly, IResourceCollector resourceCollector, bool replaceSetBackendServiceBaseUrlAsProperty = false, bool fixedServiceNameParameter = false, bool createApplicationInsightsInstance = false, string apiVersion = null, bool parameterizeBackendFunctionKey = false, bool exportSwaggerDefinition = false, bool exportCertificates = true, bool exportTags = false, string separatePolicyOutputFolder = "")
 {
     this.servicename                = servicename;
     this.subscriptionId             = subscriptionId;
     this.resourceGroup              = resourceGroup;
     this.apiFilters                 = apiFilters ?? "";
     this.exportCertificates         = exportCertificates;
     this.exportGroups               = exportGroups;
     this.exportProducts             = exportProducts;
     this.exportTags                 = exportTags;
     this.exportPIManagementInstance = exportPIManagementInstance;
     this.parametrizePropertiesOnly  = parametrizePropertiesOnly;
     this.replaceSetBackendServiceBaseUrlAsProperty = replaceSetBackendServiceBaseUrlAsProperty;
     this.resourceCollector                 = resourceCollector;
     this.fixedServiceNameParameter         = fixedServiceNameParameter;
     this.createApplicationInsightsInstance = createApplicationInsightsInstance;
     this.apiVersion = apiVersion;
     this.parameterizeBackendFunctionKey = parameterizeBackendFunctionKey;
     this.exportSwaggerDefinition        = exportSwaggerDefinition;
     this.separatePolicyOutputFolder     = separatePolicyOutputFolder;
 }
示例#9
0
 public void Initialize()
 {
     this.collector = new MockResourceCollector("LogicAppRequest");
 }
示例#10
0
 public void Initialize()
 {
     this.collector = new MockResourceCollector("WithoutApiVersionSetId");
 }
 public void Initialize()
 {
     this.collector = new MockResourceCollector("LogicAppCustomTriggerName");
 }
 public void Initialize()
 {
     this.collector = new MockResourceCollector("LogicAppManual");
 }
 public void Initialize()
 {
     this.collector = new MockResourceCollector("LogicAppAddedAsOperation");
 }
 public void Initialize()
 {
     this.collector = new MockResourceCollector("FunctionAppMixedWithLogicApp");
 }
示例#15
0
        /// <summary>
        /// 控件呈现
        /// </summary>
        /// <param name="writer"></param>
        protected override void Render(HtmlTextWriter writer)
        {
            IResourceCollector collector = GenerateResources();

            writer.Write(collector.BuildHtmlTag());
        }
 public void Initialize()
 {
     this.collector = new MockResourceCollector("FunctionAppUnedited");
 }
 public void Initialize()
 {
     this.collector = new MockResourceCollector("UrlHandling");
 }
 public void Initialize()
 {
     this._collector     = new MockResourceCollector("WithoutApiVersionSetId");
     _generatedTemplates = GetGeneratedTemplates().GetAwaiter().GetResult();
 }