Beispiel #1
0
        bool TryGetTransportManagerRegistration(out ITransportManagerRegistration registration)
        {
            if (!InheritBaseAddressSettings)
            {
                return(TryGetTransportManagerRegistration(hostNameComparisonMode, out registration));
            }

            if (TryGetTransportManagerRegistration(HostNameComparisonMode.StrongWildcard, out registration))
            {
                return(true);
            }

            if (TryGetTransportManagerRegistration(HostNameComparisonMode.Exact, out registration))
            {
                return(true);
            }

            if (TryGetTransportManagerRegistration(HostNameComparisonMode.WeakWildcard, out registration))
            {
                return(true);
            }

            registration = null;
            return(false);
        }
Beispiel #2
0
 protected virtual bool TryGetTransportManagerRegistration(HostNameComparisonMode hostNameComparisonMode, out ITransportManagerRegistration registration)
 {
     return(this.TransportManagerTable.TryLookupUri(this.Uri, hostNameComparisonMode, out registration));
 }
 protected override bool TryGetTransportManagerRegistration(System.ServiceModel.HostNameComparisonMode hostNameComparisonMode, out ITransportManagerRegistration registration)
 {
     if (this.TransportManagerTable.TryLookupUri(this.Uri, hostNameComparisonMode, out registration))
     {
         HttpTransportManager manager = registration as HttpTransportManager;
         if ((manager != null) && manager.IsHosted)
         {
             return(true);
         }
         if (registration.ListenUri.Segments.Length >= base.BaseUri.Segments.Length)
         {
             return(true);
         }
     }
     return(false);
 }