Beispiel #1
0
        public static PSCustomDomain ToPsCustomDomain(this SdkCustomDomain customDomain)
        {
            Debug.Assert(customDomain.ProvisioningState != null, "customDomain.ProvisioningState != null");
            Debug.Assert(customDomain.ResourceState != null, "customDomain.ResourceState != null");

            return(new PSCustomDomain
            {
                Id = customDomain.Id,
                Name = customDomain.Name,
                Type = customDomain.Type,
                ProvisioningState = customDomain.ProvisioningState.Value.CastEnum <SdkProvisioningState, PSProvisioningState>(),
                ResourceState = customDomain.ResourceState.Value.CastEnum <SdkCustomDomainResourceState, PSCustomDomainResourceState>(),

                HostName = customDomain.HostName,
            });
        }
        public static PSCustomDomain ToPsCustomDomain(this SdkCustomDomain customDomain)
        {
            Debug.Assert(customDomain.ProvisioningState != null, "customDomain.ProvisioningState != null");
            Debug.Assert(customDomain.ResourceState != null, "customDomain.ResourceState != null");

            return(new PSCustomDomain
            {
                Id = customDomain.Id,
                Name = customDomain.Name,
                Type = customDomain.Type,
                ProvisioningState = (PSProvisioningState)Enum.Parse(typeof(PSProvisioningState), customDomain.ProvisioningState),
                ResourceState = (PSCustomDomainResourceState)Enum.Parse(typeof(PSCustomDomainResourceState), customDomain.ResourceState),
                HostName = customDomain.HostName,
                ValidationData = customDomain.ValidationData
            });
        }