/// <summary>
        /// Connect the client to a RPC endpoint.
        /// </summary>
        /// <param name="protocol_seq">The protocol sequence for the transport.</param>
        /// <param name="endpoint">The endpoint for the protocol sequence.</param>
        /// <param name="security_quality_of_service">The security quality of service for the connection.</param>
        public void Connect(string protocol_seq, string endpoint, SecurityQualityOfService security_quality_of_service)
        {
            if (Connected)
            {
                throw new InvalidOperationException("RPC client is already connected.");
            }

            if (string.IsNullOrEmpty(protocol_seq))
            {
                throw new ArgumentException("Must specify a protocol sequence", nameof(protocol_seq));
            }

            Connect(string.IsNullOrEmpty(endpoint) ? LookupEndpoint(protocol_seq) :
                    new RpcEndpoint(InterfaceId, InterfaceVersion,
                                    SafeRpcBindingHandle.Compose(null, protocol_seq, null, endpoint, null), true),
                    security_quality_of_service);
        }
Beispiel #2
0
        /// <summary>
        /// Connect the client to a RPC endpoint.
        /// </summary>
        /// <param name="protocol_seq">The protocol sequence for the transport.</param>
        /// <param name="endpoint">The endpoint for the protocol sequence.</param>
        /// <param name="network_address">The network address for the protocol sequence.</param>
        /// <param name="transport_security">The transport security for the connection.</param>
        public void Connect(string protocol_seq, string endpoint, string network_address, RpcTransportSecurity transport_security)
        {
            if (Connected)
            {
                throw new InvalidOperationException("RPC client is already connected.");
            }

            if (string.IsNullOrEmpty(protocol_seq))
            {
                throw new ArgumentException("Must specify a protocol sequence", nameof(protocol_seq));
            }

            Connect(string.IsNullOrEmpty(endpoint) ? LookupEndpoint(protocol_seq, network_address) :
                    new RpcEndpoint(InterfaceId, InterfaceVersion,
                                    SafeRpcBindingHandle.Compose(null, protocol_seq,
                                                                 string.IsNullOrEmpty(network_address) ? null : network_address, endpoint, null), true),
                    transport_security);
        }
Beispiel #3
0
 /// <summary>
 /// Compose a string binding from its parts.
 /// </summary>
 /// <param name="objuuid">The object UUID.</param>
 /// <param name="protseq">The protocol sequence.</param>
 /// <param name="networkaddr">The network address.</param>
 /// <param name="endpoint">The endpoint.</param>
 /// <param name="options">The options.</param>
 /// <returns>The composed binding string.</returns>
 public static string ComposeStringBinding(string objuuid, string protseq, string networkaddr, string endpoint, string options)
 {
     return(SafeRpcBindingHandle.Compose(objuuid, protseq, networkaddr, endpoint, options));
 }