/// <summary> /// Initialize the service quota groups for /// </summary> /// <param name="rootResourceCount">Optional. Default = 10. The maximum allowed root resource count for the subscription.</param> /// <param name="nestedResourceCount">Optional. Default = 10. The maximum allowed nested resource count for the subscription.</param> private static ServiceQuotaGroup[] InitializeDefaultServiceQuotaGroups( int rootResourceCount = 10, int nestedResourceCount = 10) { var quota = new ServiceQuota { RootResourceCountLimit = rootResourceCount, NestedResourceCountLimit = nestedResourceCount, }; return(new[] { new ServiceQuotaGroup { InstanceCount = 1, QuotaSettings = new Dictionary <string, JToken>() { { "JWTestExtensionResourceProviderQuota", JToken.FromObject(quota) } } } }); }
public override ServiceQuota GetByLevel(int id) { if (HID.CacheClient.ContainsKey(id) == true) { return((ServiceQuota)HID.CacheClient[id]); } ServiceQuota result = base.Get(id); HID.Add(id, result); return(result); }