internal static void SetClientAuthenticationMethod(object value, IPropertyBag propertyBag, ADPropertyDefinition adPropertyDefinition)
        {
            AuthenticationMethod      authMethod = (AuthenticationMethod)value;
            AuthenticationMethodFlags authenticationMethodFlags = ADRpcHttpVirtualDirectory.ClientAuthenticationMethodToFlags(authMethod);

            propertyBag[adPropertyDefinition] = authenticationMethodFlags;
        }
        internal static object GetClientAuthenticationMethod(IPropertyBag propertyBag, ADPropertyDefinition adPropertyDefinition)
        {
            AuthenticationMethodFlags authenticationMethodFlags = (AuthenticationMethodFlags)propertyBag[adPropertyDefinition];
            AuthenticationMethod      authenticationMethod      = ADRpcHttpVirtualDirectory.ClientAuthenticationMethodFromFlags(authenticationMethodFlags);

            return(authenticationMethod);
        }
 internal static void SetHostname(object value, IPropertyBag propertyBag, ADPropertyDefinition adPropertyDefinition)
 {
     if (value != null)
     {
         propertyBag[adPropertyDefinition] = ADRpcHttpVirtualDirectory.CreateRpcUri(((bool)ADRpcHttpVirtualDirectory.GetClientsRequireSsl(propertyBag, adPropertyDefinition)) ? Uri.UriSchemeHttps : Uri.UriSchemeHttp, value.ToString());
         return;
     }
     propertyBag[adPropertyDefinition] = null;
 }
        internal static void SetClientsRequireSsl(object value, IPropertyBag propertyBag, ADPropertyDefinition adPropertyDefinition)
        {
            Uri uri = (Uri)propertyBag[adPropertyDefinition];

            if (uri == null)
            {
                return;
            }
            Hostname hostname = null;

            if (Hostname.TryParse(uri.DnsSafeHost, out hostname))
            {
                propertyBag[adPropertyDefinition] = ADRpcHttpVirtualDirectory.CreateRpcUri(((bool)value) ? Uri.UriSchemeHttps : Uri.UriSchemeHttp, hostname.ToString());
            }
        }
 internal static object GetExternalClientAuthenticationMethod(IPropertyBag propertyBag)
 {
     return(ADRpcHttpVirtualDirectory.GetClientAuthenticationMethod(propertyBag, ADVirtualDirectorySchema.ExternalAuthenticationMethodFlags));
 }
 internal static void SetExternalClientAuthenticationMethod(object value, IPropertyBag propertyBag)
 {
     ADRpcHttpVirtualDirectory.SetClientAuthenticationMethod(value, propertyBag, ADVirtualDirectorySchema.ExternalAuthenticationMethodFlags);
 }
 internal static object GetInternalHostname(IPropertyBag propertyBag)
 {
     return(ADRpcHttpVirtualDirectory.GetHostname(propertyBag, ADVirtualDirectorySchema.InternalUrl));
 }
 internal static void SetInternalHostname(object value, IPropertyBag propertyBag)
 {
     ADRpcHttpVirtualDirectory.SetHostname(value, propertyBag, ADVirtualDirectorySchema.InternalUrl);
 }
 internal static void SetInternalClientsRequireSsl(object value, IPropertyBag propertyBag)
 {
     ADRpcHttpVirtualDirectory.SetClientsRequireSsl(value, propertyBag, ADVirtualDirectorySchema.InternalUrl);
 }
 internal static object GetInternalClientsRequireSsl(IPropertyBag propertyBag)
 {
     return(ADRpcHttpVirtualDirectory.GetClientsRequireSsl(propertyBag, ADVirtualDirectorySchema.InternalUrl));
 }