コード例 #1
0
 public static PSHealthProbeSetting ToPSHealthProbeSetting(this SdkHealthProbeSetting sdkHealthProbeSetting)
 {
     return(new PSHealthProbeSetting
     {
         Id = sdkHealthProbeSetting.Id,
         Name = sdkHealthProbeSetting.Name,
         Type = sdkHealthProbeSetting.Type,
         Path = sdkHealthProbeSetting.Path,
         Protocol = sdkHealthProbeSetting.Protocol == null ? (PSProtocol?)null : (PSProtocol)Enum.Parse(typeof(PSProtocol), sdkHealthProbeSetting.Protocol),
         IntervalInSeconds = sdkHealthProbeSetting.IntervalInSeconds,
         ResourceState = sdkHealthProbeSetting.ResourceState
     });
 }
コード例 #2
0
 public static PSHealthProbeSetting ToPSHealthProbeSetting(this SdkHealthProbeSetting sdkHealthProbeSetting)
 {
     return(new PSHealthProbeSetting
     {
         Id = sdkHealthProbeSetting.Id,
         Name = sdkHealthProbeSetting.Name,
         Type = sdkHealthProbeSetting.Type,
         Path = sdkHealthProbeSetting.Path,
         Protocol = sdkHealthProbeSetting.Protocol == null ? (PSProtocol?)null : (PSProtocol)Enum.Parse(typeof(PSProtocol), sdkHealthProbeSetting.Protocol),
         IntervalInSeconds = sdkHealthProbeSetting.IntervalInSeconds,
         ResourceState = sdkHealthProbeSetting.ResourceState,
         HealthProbeMethod = sdkHealthProbeSetting.HealthProbeMethod,
         EnabledState = string.IsNullOrEmpty(sdkHealthProbeSetting.EnabledState) ? (PSEnabledState?)null : (PSEnabledState)Enum.Parse(typeof(PSEnabledState), sdkHealthProbeSetting.EnabledState)
     });
 }