Пример #1
0
 public static PSAfdProfile ToPSAfdProfile(this SdkAfdProfile sdkAfdProfile)
 {
     return(new PSAfdProfile
     {
         Id = sdkAfdProfile.Id,
         Name = sdkAfdProfile.Name,
         Type = sdkAfdProfile.Type,
         ProvisioningState = sdkAfdProfile.ProvisioningState,
         Location = sdkAfdProfile.Location,
         Tags = TagsConversionHelper.CreateTagHashtable(sdkAfdProfile.Tags),
         ResourceState = sdkAfdProfile.ResourceState,
         Sku = sdkAfdProfile.Sku.Name
     });
 }
Пример #2
0
        public static PSProfile ToPsProfile(this SdkProfile sdkProfile)
        {
            Debug.Assert(sdkProfile.ProvisioningState != null, "sdkProfile.ProvisioningState != null");
            Debug.Assert(sdkProfile.ResourceState != null, "sdkProfile.ResourceState != null");

            return(new PSProfile
            {
                Id = sdkProfile.Id,
                Name = sdkProfile.Name,
                Type = sdkProfile.Type,
                ProvisioningState = sdkProfile.ProvisioningState.Value.CastEnum <SdkProvisioningState, PSProvisioningState>(),
                Tags = sdkProfile.Tags.ToHashTableTags(),
                Location = sdkProfile.Location,
                ResourceState = sdkProfile.ResourceState.Value.CastEnum <SdkProfileResourceState, PSProfileResourceState>(),

                // Entity specific properties
                Sku = sdkProfile.Sku.ToPsSku()
            });
        }