UaClient/ServiceModel/Ua/UaTcpDiscoveryService.cs
/// <summary>
/// This Service returns the Endpoints supported by a Server and all of the configuration information required to establish a SecureChannel and a Session.
/// </summary>
/// <param name="request">a request.</param>
/// <param name="loggerFactory">The logger factory.</param>
/// <param name="options">The secure channel options.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
This Service returns the Endpoints supported by a Server and all of the configuration information required to establish a SecureChannel and a Session.
This Service returns the Endpoints supported by a Server and all of the configuration information required to establish a SecureChannel and a Session .
public static async Task<GetEndpointsResponse> GetEndpointsAsync(GetEndpointsRequest request, ILoggerFactory loggerFactory = null, UaApplicationOptions options = null)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }
            var client = new UaTcpDiscoveryService(
                new EndpointDescription
                {
                    EndpointUrl = request.EndpointUrl,
                    SecurityMode = MessageSecurityMode.None,
                    SecurityPolicyUri = SecurityPolicyUris.None
                },
                loggerFactory,
                options);
            try
            {
                await client.OpenAsync().ConfigureAwait(false);
                var response = await client.innerChannel.RequestAsync(request).ConfigureAwait(false);
                await client.CloseAsync().ConfigureAwait(false);
                return (GetEndpointsResponse)response;
            }
            catch (Exception)
            {
                await client.AbortAsync().ConfigureAwait(false);
                throw;
            }
        }
public static async Task < GetEndpointsResponse > GetEndpointsAsync ( GetEndpointsRequest request , ILoggerFactory loggerFactory = null , UaApplicationOptions options = null ) { if ( request == null ) { throw new ArgumentNullException ( nameof ( request ) ) ; } var client = new UaTcpDiscoveryService ( new EndpointDescription { EndpointUrl = request . EndpointUrl , SecurityMode = MessageSecurityMode . None , SecurityPolicyUri = SecurityPolicyUris . None } , loggerFactory , options ) ; try { await client . OpenAsync ( ) . ConfigureAwait ( false ) ; var response = await client . innerChannel . RequestAsync ( request ) . ConfigureAwait ( false ) ; await client . CloseAsync ( ) . ConfigureAwait ( false ) ; return ( GetEndpointsResponse ) response ; } catch ( Exception ) { await client . AbortAsync ( ) . ConfigureAwait ( false ) ; throw ; } }
This Service returns the Endpoints supported by a Server and all of the configuration information required to establish a SecureChannel and a Session.
This Service returns the Endpoints supported by a Server and all of the configuration information required to establish a SecureChannel and a Session .
A  representing the asynchronous operation.
A representing the asynchronous operation .
request
GetEndpointsRequest
None
loggerFactory
ILoggerFactory
The logger factory.
The logger factory .
options
UaApplicationOptions
The secure channel options.
The secure channel options .