/// <summary> /// Generate endpoint address by scheme from epr list /// </summary> /// <param name="eprList">indicating the epr list</param> /// <param name="scheme">indicating the scheme</param> /// <returns>endpoint address</returns> private static EndpointAddress GenerateEndpointAddress(string[] eprList, TransportScheme scheme, bool secure, bool internalChannel) { int index = (int)Math.Log((int)scheme, 2); string epr = eprList[index]; return(SoaHelper.CreateEndpointAddress(new Uri(epr), secure, internalChannel)); }
/// <summary> /// Create the endpoint of broker /// </summary> /// <param name="uri">Uri address</param> /// <returns>Endpoint Address</returns> private static EndpointAddress GetEndpoint(Uri uri, IConnectionInfo info) { #if API if (LocalSession.LocalBroker) { return(new EndpointAddress(uri)); } #endif // if (info.LocalUser) // { // string certThrumbprint = new NonHARegistry().GetValueAsync<string>(HpcConstants.HpcFullKeyName, HpcConstants.SslThumbprint, CancellationToken.None, null).GetAwaiter().GetResult(); // return SoaHelper.CreateInternalCertEndpointAddress(uri, certThrumbprint); // } return(SoaHelper.CreateEndpointAddress(uri, false, info.IsAadOrLocalUser)); }
/// <summary> /// Create the endpoint of broker /// </summary> /// <param name="uri">Uri address</param> /// <returns>Endpoint Address</returns> private static EndpointAddress GetEndpoint(Uri uri, bool useInternalChannel) { // This file is shared by SessionAPI and BrokerLauncher // If for SessionAPI, it is necessary to check localbroker property for debug purpose #if API if (LocalSession.LocalBroker) { return(new EndpointAddress(uri)); } #endif // if (isLocalUser) // { // string certThrumbprint = new NonHARegistry().GetSSLThumbprint().GetAwaiter().GetResult(); // return SoaHelper.CreateInternalCertEndpointAddress(uri, certThrumbprint); // } // return(SoaHelper.CreateEndpointAddress(uri, true, useInternalChannel)); }