/// <summary>Creates an <code>DelegationTokenAuthenticatedURL</code>.</summary>
 /// <param name="authenticator">
 /// the
 /// <see cref="DelegationTokenAuthenticator"/>
 /// instance to
 /// use, if <code>null</code> the default one will be used.
 /// </param>
 public DelegationTokenAuthenticatedURL(DelegationTokenAuthenticator authenticator
                                        )
     : this(authenticator, null)
 {
 }
 /// <summary>Creates an <code>DelegationTokenAuthenticatedURL</code>.</summary>
 /// <param name="authenticator">
 /// the
 /// <see cref="DelegationTokenAuthenticator"/>
 /// instance to
 /// use, if <code>null</code> the default one will be used.
 /// </param>
 /// <param name="connConfigurator">a connection configurator.</param>
 public DelegationTokenAuthenticatedURL(DelegationTokenAuthenticator authenticator
                                        , ConnectionConfigurator connConfigurator)
     : base(ObtainDelegationTokenAuthenticator(authenticator, connConfigurator), connConfigurator
            )
 {
 }
 private static DelegationTokenAuthenticator ObtainDelegationTokenAuthenticator(DelegationTokenAuthenticator
                                                                                dta, ConnectionConfigurator connConfigurator)
 {
     try
     {
         if (dta == null)
         {
             dta = System.Activator.CreateInstance(DefaultAuthenticator);
             dta.SetConnectionConfigurator(connConfigurator);
         }
         return(dta);
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex);
     }
 }