internal static Uri GetStsUri(Uri stsUri, string appliesTo) { if (stsUri != null) { return(new Uri(stsUri, "WRAPv0.9/")); } string str = TokenProviderHelper.ExtractSolutionFromHostname((new Uri(appliesTo)).Host); return(ServiceBusEnvironment.CreateAccessControlUri(str)); }
private static void ValidateSchemeAndNamespace(string scheme, string serviceNamespace) { if (!ServiceBusEnvironment.ValidateScheme(scheme)) { throw new ArgumentException(SRClient.InvalidSchemeValue("sb"), "scheme"); } if (!ServiceBusEnvironment.ValidateServiceNamespace(serviceNamespace)) { throw new ArgumentException(SRClient.InvalidServiceNameSpace(serviceNamespace), "serviceNamespace"); } }
private static Uri CreateServiceUri(string scheme, string serviceNamespace, string servicePath, bool suppressRelayPathPrefix, string hostName) { string str = serviceNamespace.Trim(); ServiceBusEnvironment.ValidateSchemeAndNamespace(scheme, str); if (!servicePath.EndsWith("/", StringComparison.Ordinal)) { servicePath = string.Concat(servicePath, "/"); } Uri uri = ServiceBusUriHelper.CreateServiceUri(scheme, str, hostName, servicePath, suppressRelayPathPrefix); if (!ServiceBusUriHelper.IsSafeBasicLatinUriPath(uri)) { throw new ArgumentException(SRClient.PathSegmentASCIICharacters, servicePath); } return(uri); }
public static Uri CreateServiceUri(string scheme, string serviceNamespace, string servicePath, bool suppressRelayPathPrefix) { return(ServiceBusEnvironment.CreateServiceUri(scheme, serviceNamespace, servicePath, suppressRelayPathPrefix, RelayEnvironment.RelayHostRootName)); }
public static Uri CreateServiceUri(string scheme, string serviceNamespace, string servicePath) { return(ServiceBusEnvironment.CreateServiceUri(scheme, serviceNamespace, servicePath, false, RelayEnvironment.RelayHostRootName)); }