internal FileNamingTemplates(string jsonData)
 {
     affixes = JsonConvert.DeserializeObject <NamingAffixes>(jsonData);
     // validate
     if (string.IsNullOrWhiteSpace(affixes.ResourceGroupPrefix) &&
         string.IsNullOrWhiteSpace(affixes.ResourceGroupSuffix))
     {
         throw new ArgumentException("Must specify at least one affix for ResourceGroup");
     }
 }
예제 #2
0
            // keep unused parameter  for uniformity
#pragma warning disable S1172,IDE0060 // Unused method parameters should be removed
            internal InstanceCreateNamesImpl(string name, string resourceGroup, bool isCustom, string functionAppName, NamingAffixes affixes)
#pragma warning restore S1172,IDE0060 // Unused method parameters should be removed
                : base(name, resourceGroup, isCustom, functionAppName)
            {
                HostingPlanName    = $"{functionAppName}-plan";
                AppInsightName     = $"{functionAppName}-ai";
                StorageAccountName = $"aggregator{GetRandomString(8)}";
            }
 internal InstanceName_(string name, string resourceGroup, bool isCustom, string functionAppName, NamingAffixes affixes)
     : base(name, resourceGroup, isCustom, functionAppName)
 {
     HostingPlanName    = $"{affixes.HostingPlanPrefix}{name}{affixes.HostingPlanSuffix}";
     AppInsightName     = $"{affixes.AppInsightPrefix}{name}{affixes.AppInsightSuffix}";
     StorageAccountName = $"{affixes.StorageAccountPrefix}{name}{affixes.StorageAccountSuffix}";
 }
예제 #4
0
 internal FileNamingTemplates(string jsonData)
 {
     affixes = JsonConvert.DeserializeObject <NamingAffixes>(jsonData);
 }
 internal InstanceName_(string name, string resourceGroup, bool isCustom, string functionAppName, NamingAffixes affixes)
     : base(name, resourceGroup, isCustom, functionAppName)
 {
     HostingPlanName    = $"{functionAppName}-plan";
     AppInsightName     = $"{functionAppName}-ai";
     StorageAccountName = $"aggregator{GetRandomString(8)}";
 }