Beispiel #1
0
        ///GENMHASH:C48A746F5694508AB09E61AAF0F90782:5F8FA9E8CC1C70C9CDDD00BC8211E388
        public EventHubNamespaceImpl WithSku(EventHubNamespaceSkuType namespaceSku)
        {
            Sku newSkuInner = new Sku
            {
                Name     = namespaceSku.Name(),
                Tier     = namespaceSku.Tier(),
                Capacity = null
            };
            Sku  currentSkuInner = this.Inner.Sku;
            bool isDifferent     = currentSkuInner == null || !currentSkuInner.Name.Equals(newSkuInner.Name);

            if (isDifferent)
            {
                this.Inner.Sku = newSkuInner;
                if (newSkuInner.Name.Equals(SkuName.Standard))
                {
                    newSkuInner.Capacity = 1;
                }
            }
            return(this);
        }
        ///GENMHASH:C48A746F5694508AB09E61AAF0F90782:5F8FA9E8CC1C70C9CDDD00BC8211E388
        public EventHubNamespaceImpl WithSku(EventHubNamespaceSkuType namespaceSku)
        {
            Sku newSkuInner = new Sku
            {
                Name     = namespaceSku.Name().ToString(),
                Tier     = namespaceSku.Tier().ToString(),
                Capacity = null
            };
            Sku  currentSkuInner = this.Inner.Sku;
            bool isDifferent     = currentSkuInner == null || !currentSkuInner.Name.Equals(newSkuInner.Name, StringComparison.OrdinalIgnoreCase);

            if (isDifferent)
            {
                this.Inner.Sku = newSkuInner;
                if (newSkuInner.Name.Equals(SkuName.Standard.ToString(), StringComparison.OrdinalIgnoreCase))
                {
                    newSkuInner.Capacity = 1;
                }
            }
            return(this);
        }