/* ========================================================================
* Copyright (c) 2005-2022 The OPC Foundation, Inc. All rights reserved.
*
* OPC Foundation MIT License 1.00
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* The complete license agreement can be found here:
* http://opcfoundation.org/License/MIT/1.00/
* ======================================================================*/
using System;
#if (!NET_STANDARD)
using System.Collections.Generic;
using System.Xml;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Runtime.Serialization;
#endif
#if (NET_STANDARD_ASYNC)
using System.Threading.Tasks;
#endif
namespace Opc.Ua
{
#region SessionChannel Class
///
/// A channel object used by clients to access a UA service.
///
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.ModelCompiler", "1.0.0.0")]
#if (!NET_STANDARD)
public partial class SessionChannel : WcfChannelBase, ISessionChannel
#else
public partial class SessionChannel : UaChannelBase, ISessionChannel
#endif
{
///
/// Initializes the object with the endpoint address.
///
internal SessionChannel()
{
}
#if (!OPCUA_EXCLUDE_CreateSession)
#if (!NET_STANDARD)
///
/// The client side implementation of the CreateSession service contract.
///
public CreateSessionResponseMessage CreateSession(CreateSessionMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCreateSession(request, null, null);
}
return this.Channel.EndCreateSession(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginCreateSession service contract.
///
public IAsyncResult BeginCreateSession(CreateSessionMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCreateSession(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCreateSession service contract.
///
public CreateSessionResponseMessage EndCreateSession(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCreateSession(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the CreateSession service contract.
///
public CreateSessionResponseMessage CreateSession(CreateSessionMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCreateSession(request, null, null);
}
return this.Channel.EndCreateSession(result);
}
///
/// The client side implementation of the BeginCreateSession service contract.
///
public IAsyncResult BeginCreateSession(CreateSessionMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCreateSession(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCreateSession service contract.
///
public CreateSessionResponseMessage EndCreateSession(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCreateSession(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the CreateSession service contract.
///
public Task CreateSessionAsync(CreateSessionMessage request)
{
return this.Channel.CreateSessionAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_ActivateSession)
#if (!NET_STANDARD)
///
/// The client side implementation of the ActivateSession service contract.
///
public ActivateSessionResponseMessage ActivateSession(ActivateSessionMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginActivateSession(request, null, null);
}
return this.Channel.EndActivateSession(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginActivateSession service contract.
///
public IAsyncResult BeginActivateSession(ActivateSessionMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginActivateSession(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndActivateSession service contract.
///
public ActivateSessionResponseMessage EndActivateSession(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndActivateSession(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the ActivateSession service contract.
///
public ActivateSessionResponseMessage ActivateSession(ActivateSessionMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginActivateSession(request, null, null);
}
return this.Channel.EndActivateSession(result);
}
///
/// The client side implementation of the BeginActivateSession service contract.
///
public IAsyncResult BeginActivateSession(ActivateSessionMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginActivateSession(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndActivateSession service contract.
///
public ActivateSessionResponseMessage EndActivateSession(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndActivateSession(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the ActivateSession service contract.
///
public Task ActivateSessionAsync(ActivateSessionMessage request)
{
return this.Channel.ActivateSessionAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_CloseSession)
#if (!NET_STANDARD)
///
/// The client side implementation of the CloseSession service contract.
///
public CloseSessionResponseMessage CloseSession(CloseSessionMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCloseSession(request, null, null);
}
return this.Channel.EndCloseSession(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginCloseSession service contract.
///
public IAsyncResult BeginCloseSession(CloseSessionMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCloseSession(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCloseSession service contract.
///
public CloseSessionResponseMessage EndCloseSession(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCloseSession(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the CloseSession service contract.
///
public CloseSessionResponseMessage CloseSession(CloseSessionMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCloseSession(request, null, null);
}
return this.Channel.EndCloseSession(result);
}
///
/// The client side implementation of the BeginCloseSession service contract.
///
public IAsyncResult BeginCloseSession(CloseSessionMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCloseSession(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCloseSession service contract.
///
public CloseSessionResponseMessage EndCloseSession(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCloseSession(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the CloseSession service contract.
///
public Task CloseSessionAsync(CloseSessionMessage request)
{
return this.Channel.CloseSessionAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_Cancel)
#if (!NET_STANDARD)
///
/// The client side implementation of the Cancel service contract.
///
public CancelResponseMessage Cancel(CancelMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCancel(request, null, null);
}
return this.Channel.EndCancel(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginCancel service contract.
///
public IAsyncResult BeginCancel(CancelMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCancel(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCancel service contract.
///
public CancelResponseMessage EndCancel(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCancel(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the Cancel service contract.
///
public CancelResponseMessage Cancel(CancelMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCancel(request, null, null);
}
return this.Channel.EndCancel(result);
}
///
/// The client side implementation of the BeginCancel service contract.
///
public IAsyncResult BeginCancel(CancelMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCancel(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCancel service contract.
///
public CancelResponseMessage EndCancel(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCancel(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the Cancel service contract.
///
public Task CancelAsync(CancelMessage request)
{
return this.Channel.CancelAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_AddNodes)
#if (!NET_STANDARD)
///
/// The client side implementation of the AddNodes service contract.
///
public AddNodesResponseMessage AddNodes(AddNodesMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginAddNodes(request, null, null);
}
return this.Channel.EndAddNodes(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginAddNodes service contract.
///
public IAsyncResult BeginAddNodes(AddNodesMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginAddNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndAddNodes service contract.
///
public AddNodesResponseMessage EndAddNodes(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndAddNodes(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the AddNodes service contract.
///
public AddNodesResponseMessage AddNodes(AddNodesMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginAddNodes(request, null, null);
}
return this.Channel.EndAddNodes(result);
}
///
/// The client side implementation of the BeginAddNodes service contract.
///
public IAsyncResult BeginAddNodes(AddNodesMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginAddNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndAddNodes service contract.
///
public AddNodesResponseMessage EndAddNodes(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndAddNodes(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the AddNodes service contract.
///
public Task AddNodesAsync(AddNodesMessage request)
{
return this.Channel.AddNodesAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_AddReferences)
#if (!NET_STANDARD)
///
/// The client side implementation of the AddReferences service contract.
///
public AddReferencesResponseMessage AddReferences(AddReferencesMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginAddReferences(request, null, null);
}
return this.Channel.EndAddReferences(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginAddReferences service contract.
///
public IAsyncResult BeginAddReferences(AddReferencesMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginAddReferences(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndAddReferences service contract.
///
public AddReferencesResponseMessage EndAddReferences(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndAddReferences(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the AddReferences service contract.
///
public AddReferencesResponseMessage AddReferences(AddReferencesMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginAddReferences(request, null, null);
}
return this.Channel.EndAddReferences(result);
}
///
/// The client side implementation of the BeginAddReferences service contract.
///
public IAsyncResult BeginAddReferences(AddReferencesMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginAddReferences(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndAddReferences service contract.
///
public AddReferencesResponseMessage EndAddReferences(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndAddReferences(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the AddReferences service contract.
///
public Task AddReferencesAsync(AddReferencesMessage request)
{
return this.Channel.AddReferencesAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_DeleteNodes)
#if (!NET_STANDARD)
///
/// The client side implementation of the DeleteNodes service contract.
///
public DeleteNodesResponseMessage DeleteNodes(DeleteNodesMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteNodes(request, null, null);
}
return this.Channel.EndDeleteNodes(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginDeleteNodes service contract.
///
public IAsyncResult BeginDeleteNodes(DeleteNodesMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteNodes service contract.
///
public DeleteNodesResponseMessage EndDeleteNodes(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteNodes(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the DeleteNodes service contract.
///
public DeleteNodesResponseMessage DeleteNodes(DeleteNodesMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteNodes(request, null, null);
}
return this.Channel.EndDeleteNodes(result);
}
///
/// The client side implementation of the BeginDeleteNodes service contract.
///
public IAsyncResult BeginDeleteNodes(DeleteNodesMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteNodes service contract.
///
public DeleteNodesResponseMessage EndDeleteNodes(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteNodes(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the DeleteNodes service contract.
///
public Task DeleteNodesAsync(DeleteNodesMessage request)
{
return this.Channel.DeleteNodesAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_DeleteReferences)
#if (!NET_STANDARD)
///
/// The client side implementation of the DeleteReferences service contract.
///
public DeleteReferencesResponseMessage DeleteReferences(DeleteReferencesMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteReferences(request, null, null);
}
return this.Channel.EndDeleteReferences(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginDeleteReferences service contract.
///
public IAsyncResult BeginDeleteReferences(DeleteReferencesMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteReferences(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteReferences service contract.
///
public DeleteReferencesResponseMessage EndDeleteReferences(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteReferences(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the DeleteReferences service contract.
///
public DeleteReferencesResponseMessage DeleteReferences(DeleteReferencesMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteReferences(request, null, null);
}
return this.Channel.EndDeleteReferences(result);
}
///
/// The client side implementation of the BeginDeleteReferences service contract.
///
public IAsyncResult BeginDeleteReferences(DeleteReferencesMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteReferences(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteReferences service contract.
///
public DeleteReferencesResponseMessage EndDeleteReferences(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteReferences(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the DeleteReferences service contract.
///
public Task DeleteReferencesAsync(DeleteReferencesMessage request)
{
return this.Channel.DeleteReferencesAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_Browse)
#if (!NET_STANDARD)
///
/// The client side implementation of the Browse service contract.
///
public BrowseResponseMessage Browse(BrowseMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginBrowse(request, null, null);
}
return this.Channel.EndBrowse(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginBrowse service contract.
///
public IAsyncResult BeginBrowse(BrowseMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginBrowse(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndBrowse service contract.
///
public BrowseResponseMessage EndBrowse(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndBrowse(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the Browse service contract.
///
public BrowseResponseMessage Browse(BrowseMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginBrowse(request, null, null);
}
return this.Channel.EndBrowse(result);
}
///
/// The client side implementation of the BeginBrowse service contract.
///
public IAsyncResult BeginBrowse(BrowseMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginBrowse(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndBrowse service contract.
///
public BrowseResponseMessage EndBrowse(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndBrowse(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the Browse service contract.
///
public Task BrowseAsync(BrowseMessage request)
{
return this.Channel.BrowseAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_BrowseNext)
#if (!NET_STANDARD)
///
/// The client side implementation of the BrowseNext service contract.
///
public BrowseNextResponseMessage BrowseNext(BrowseNextMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginBrowseNext(request, null, null);
}
return this.Channel.EndBrowseNext(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginBrowseNext service contract.
///
public IAsyncResult BeginBrowseNext(BrowseNextMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginBrowseNext(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndBrowseNext service contract.
///
public BrowseNextResponseMessage EndBrowseNext(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndBrowseNext(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the BrowseNext service contract.
///
public BrowseNextResponseMessage BrowseNext(BrowseNextMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginBrowseNext(request, null, null);
}
return this.Channel.EndBrowseNext(result);
}
///
/// The client side implementation of the BeginBrowseNext service contract.
///
public IAsyncResult BeginBrowseNext(BrowseNextMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginBrowseNext(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndBrowseNext service contract.
///
public BrowseNextResponseMessage EndBrowseNext(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndBrowseNext(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the BrowseNext service contract.
///
public Task BrowseNextAsync(BrowseNextMessage request)
{
return this.Channel.BrowseNextAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_TranslateBrowsePathsToNodeIds)
#if (!NET_STANDARD)
///
/// The client side implementation of the TranslateBrowsePathsToNodeIds service contract.
///
public TranslateBrowsePathsToNodeIdsResponseMessage TranslateBrowsePathsToNodeIds(TranslateBrowsePathsToNodeIdsMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginTranslateBrowsePathsToNodeIds(request, null, null);
}
return this.Channel.EndTranslateBrowsePathsToNodeIds(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginTranslateBrowsePathsToNodeIds service contract.
///
public IAsyncResult BeginTranslateBrowsePathsToNodeIds(TranslateBrowsePathsToNodeIdsMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginTranslateBrowsePathsToNodeIds(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndTranslateBrowsePathsToNodeIds service contract.
///
public TranslateBrowsePathsToNodeIdsResponseMessage EndTranslateBrowsePathsToNodeIds(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndTranslateBrowsePathsToNodeIds(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the TranslateBrowsePathsToNodeIds service contract.
///
public TranslateBrowsePathsToNodeIdsResponseMessage TranslateBrowsePathsToNodeIds(TranslateBrowsePathsToNodeIdsMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginTranslateBrowsePathsToNodeIds(request, null, null);
}
return this.Channel.EndTranslateBrowsePathsToNodeIds(result);
}
///
/// The client side implementation of the BeginTranslateBrowsePathsToNodeIds service contract.
///
public IAsyncResult BeginTranslateBrowsePathsToNodeIds(TranslateBrowsePathsToNodeIdsMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginTranslateBrowsePathsToNodeIds(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndTranslateBrowsePathsToNodeIds service contract.
///
public TranslateBrowsePathsToNodeIdsResponseMessage EndTranslateBrowsePathsToNodeIds(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndTranslateBrowsePathsToNodeIds(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the TranslateBrowsePathsToNodeIds service contract.
///
public Task TranslateBrowsePathsToNodeIdsAsync(TranslateBrowsePathsToNodeIdsMessage request)
{
return this.Channel.TranslateBrowsePathsToNodeIdsAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_RegisterNodes)
#if (!NET_STANDARD)
///
/// The client side implementation of the RegisterNodes service contract.
///
public RegisterNodesResponseMessage RegisterNodes(RegisterNodesMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRegisterNodes(request, null, null);
}
return this.Channel.EndRegisterNodes(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginRegisterNodes service contract.
///
public IAsyncResult BeginRegisterNodes(RegisterNodesMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRegisterNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRegisterNodes service contract.
///
public RegisterNodesResponseMessage EndRegisterNodes(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRegisterNodes(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the RegisterNodes service contract.
///
public RegisterNodesResponseMessage RegisterNodes(RegisterNodesMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRegisterNodes(request, null, null);
}
return this.Channel.EndRegisterNodes(result);
}
///
/// The client side implementation of the BeginRegisterNodes service contract.
///
public IAsyncResult BeginRegisterNodes(RegisterNodesMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRegisterNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRegisterNodes service contract.
///
public RegisterNodesResponseMessage EndRegisterNodes(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRegisterNodes(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the RegisterNodes service contract.
///
public Task RegisterNodesAsync(RegisterNodesMessage request)
{
return this.Channel.RegisterNodesAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_UnregisterNodes)
#if (!NET_STANDARD)
///
/// The client side implementation of the UnregisterNodes service contract.
///
public UnregisterNodesResponseMessage UnregisterNodes(UnregisterNodesMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginUnregisterNodes(request, null, null);
}
return this.Channel.EndUnregisterNodes(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginUnregisterNodes service contract.
///
public IAsyncResult BeginUnregisterNodes(UnregisterNodesMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginUnregisterNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndUnregisterNodes service contract.
///
public UnregisterNodesResponseMessage EndUnregisterNodes(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndUnregisterNodes(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the UnregisterNodes service contract.
///
public UnregisterNodesResponseMessage UnregisterNodes(UnregisterNodesMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginUnregisterNodes(request, null, null);
}
return this.Channel.EndUnregisterNodes(result);
}
///
/// The client side implementation of the BeginUnregisterNodes service contract.
///
public IAsyncResult BeginUnregisterNodes(UnregisterNodesMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginUnregisterNodes(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndUnregisterNodes service contract.
///
public UnregisterNodesResponseMessage EndUnregisterNodes(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndUnregisterNodes(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the UnregisterNodes service contract.
///
public Task UnregisterNodesAsync(UnregisterNodesMessage request)
{
return this.Channel.UnregisterNodesAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_QueryFirst)
#if (!NET_STANDARD)
///
/// The client side implementation of the QueryFirst service contract.
///
public QueryFirstResponseMessage QueryFirst(QueryFirstMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginQueryFirst(request, null, null);
}
return this.Channel.EndQueryFirst(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginQueryFirst service contract.
///
public IAsyncResult BeginQueryFirst(QueryFirstMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginQueryFirst(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndQueryFirst service contract.
///
public QueryFirstResponseMessage EndQueryFirst(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndQueryFirst(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the QueryFirst service contract.
///
public QueryFirstResponseMessage QueryFirst(QueryFirstMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginQueryFirst(request, null, null);
}
return this.Channel.EndQueryFirst(result);
}
///
/// The client side implementation of the BeginQueryFirst service contract.
///
public IAsyncResult BeginQueryFirst(QueryFirstMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginQueryFirst(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndQueryFirst service contract.
///
public QueryFirstResponseMessage EndQueryFirst(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndQueryFirst(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the QueryFirst service contract.
///
public Task QueryFirstAsync(QueryFirstMessage request)
{
return this.Channel.QueryFirstAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_QueryNext)
#if (!NET_STANDARD)
///
/// The client side implementation of the QueryNext service contract.
///
public QueryNextResponseMessage QueryNext(QueryNextMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginQueryNext(request, null, null);
}
return this.Channel.EndQueryNext(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginQueryNext service contract.
///
public IAsyncResult BeginQueryNext(QueryNextMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginQueryNext(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndQueryNext service contract.
///
public QueryNextResponseMessage EndQueryNext(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndQueryNext(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the QueryNext service contract.
///
public QueryNextResponseMessage QueryNext(QueryNextMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginQueryNext(request, null, null);
}
return this.Channel.EndQueryNext(result);
}
///
/// The client side implementation of the BeginQueryNext service contract.
///
public IAsyncResult BeginQueryNext(QueryNextMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginQueryNext(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndQueryNext service contract.
///
public QueryNextResponseMessage EndQueryNext(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndQueryNext(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the QueryNext service contract.
///
public Task QueryNextAsync(QueryNextMessage request)
{
return this.Channel.QueryNextAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_Read)
#if (!NET_STANDARD)
///
/// The client side implementation of the Read service contract.
///
public ReadResponseMessage Read(ReadMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRead(request, null, null);
}
return this.Channel.EndRead(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginRead service contract.
///
public IAsyncResult BeginRead(ReadMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRead(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRead service contract.
///
public ReadResponseMessage EndRead(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRead(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the Read service contract.
///
public ReadResponseMessage Read(ReadMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRead(request, null, null);
}
return this.Channel.EndRead(result);
}
///
/// The client side implementation of the BeginRead service contract.
///
public IAsyncResult BeginRead(ReadMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRead(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRead service contract.
///
public ReadResponseMessage EndRead(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRead(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the Read service contract.
///
public Task ReadAsync(ReadMessage request)
{
return this.Channel.ReadAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_HistoryRead)
#if (!NET_STANDARD)
///
/// The client side implementation of the HistoryRead service contract.
///
public HistoryReadResponseMessage HistoryRead(HistoryReadMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginHistoryRead(request, null, null);
}
return this.Channel.EndHistoryRead(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginHistoryRead service contract.
///
public IAsyncResult BeginHistoryRead(HistoryReadMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginHistoryRead(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndHistoryRead service contract.
///
public HistoryReadResponseMessage EndHistoryRead(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndHistoryRead(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the HistoryRead service contract.
///
public HistoryReadResponseMessage HistoryRead(HistoryReadMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginHistoryRead(request, null, null);
}
return this.Channel.EndHistoryRead(result);
}
///
/// The client side implementation of the BeginHistoryRead service contract.
///
public IAsyncResult BeginHistoryRead(HistoryReadMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginHistoryRead(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndHistoryRead service contract.
///
public HistoryReadResponseMessage EndHistoryRead(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndHistoryRead(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the HistoryRead service contract.
///
public Task HistoryReadAsync(HistoryReadMessage request)
{
return this.Channel.HistoryReadAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_Write)
#if (!NET_STANDARD)
///
/// The client side implementation of the Write service contract.
///
public WriteResponseMessage Write(WriteMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginWrite(request, null, null);
}
return this.Channel.EndWrite(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginWrite service contract.
///
public IAsyncResult BeginWrite(WriteMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginWrite(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndWrite service contract.
///
public WriteResponseMessage EndWrite(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndWrite(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the Write service contract.
///
public WriteResponseMessage Write(WriteMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginWrite(request, null, null);
}
return this.Channel.EndWrite(result);
}
///
/// The client side implementation of the BeginWrite service contract.
///
public IAsyncResult BeginWrite(WriteMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginWrite(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndWrite service contract.
///
public WriteResponseMessage EndWrite(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndWrite(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the Write service contract.
///
public Task WriteAsync(WriteMessage request)
{
return this.Channel.WriteAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_HistoryUpdate)
#if (!NET_STANDARD)
///
/// The client side implementation of the HistoryUpdate service contract.
///
public HistoryUpdateResponseMessage HistoryUpdate(HistoryUpdateMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginHistoryUpdate(request, null, null);
}
return this.Channel.EndHistoryUpdate(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginHistoryUpdate service contract.
///
public IAsyncResult BeginHistoryUpdate(HistoryUpdateMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginHistoryUpdate(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndHistoryUpdate service contract.
///
public HistoryUpdateResponseMessage EndHistoryUpdate(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndHistoryUpdate(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the HistoryUpdate service contract.
///
public HistoryUpdateResponseMessage HistoryUpdate(HistoryUpdateMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginHistoryUpdate(request, null, null);
}
return this.Channel.EndHistoryUpdate(result);
}
///
/// The client side implementation of the BeginHistoryUpdate service contract.
///
public IAsyncResult BeginHistoryUpdate(HistoryUpdateMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginHistoryUpdate(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndHistoryUpdate service contract.
///
public HistoryUpdateResponseMessage EndHistoryUpdate(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndHistoryUpdate(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the HistoryUpdate service contract.
///
public Task HistoryUpdateAsync(HistoryUpdateMessage request)
{
return this.Channel.HistoryUpdateAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_Call)
#if (!NET_STANDARD)
///
/// The client side implementation of the Call service contract.
///
public CallResponseMessage Call(CallMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCall(request, null, null);
}
return this.Channel.EndCall(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginCall service contract.
///
public IAsyncResult BeginCall(CallMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCall(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCall service contract.
///
public CallResponseMessage EndCall(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCall(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the Call service contract.
///
public CallResponseMessage Call(CallMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCall(request, null, null);
}
return this.Channel.EndCall(result);
}
///
/// The client side implementation of the BeginCall service contract.
///
public IAsyncResult BeginCall(CallMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCall(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCall service contract.
///
public CallResponseMessage EndCall(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCall(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the Call service contract.
///
public Task CallAsync(CallMessage request)
{
return this.Channel.CallAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_CreateMonitoredItems)
#if (!NET_STANDARD)
///
/// The client side implementation of the CreateMonitoredItems service contract.
///
public CreateMonitoredItemsResponseMessage CreateMonitoredItems(CreateMonitoredItemsMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCreateMonitoredItems(request, null, null);
}
return this.Channel.EndCreateMonitoredItems(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginCreateMonitoredItems service contract.
///
public IAsyncResult BeginCreateMonitoredItems(CreateMonitoredItemsMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCreateMonitoredItems(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCreateMonitoredItems service contract.
///
public CreateMonitoredItemsResponseMessage EndCreateMonitoredItems(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCreateMonitoredItems(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the CreateMonitoredItems service contract.
///
public CreateMonitoredItemsResponseMessage CreateMonitoredItems(CreateMonitoredItemsMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCreateMonitoredItems(request, null, null);
}
return this.Channel.EndCreateMonitoredItems(result);
}
///
/// The client side implementation of the BeginCreateMonitoredItems service contract.
///
public IAsyncResult BeginCreateMonitoredItems(CreateMonitoredItemsMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCreateMonitoredItems(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCreateMonitoredItems service contract.
///
public CreateMonitoredItemsResponseMessage EndCreateMonitoredItems(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCreateMonitoredItems(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the CreateMonitoredItems service contract.
///
public Task CreateMonitoredItemsAsync(CreateMonitoredItemsMessage request)
{
return this.Channel.CreateMonitoredItemsAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_ModifyMonitoredItems)
#if (!NET_STANDARD)
///
/// The client side implementation of the ModifyMonitoredItems service contract.
///
public ModifyMonitoredItemsResponseMessage ModifyMonitoredItems(ModifyMonitoredItemsMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginModifyMonitoredItems(request, null, null);
}
return this.Channel.EndModifyMonitoredItems(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginModifyMonitoredItems service contract.
///
public IAsyncResult BeginModifyMonitoredItems(ModifyMonitoredItemsMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginModifyMonitoredItems(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndModifyMonitoredItems service contract.
///
public ModifyMonitoredItemsResponseMessage EndModifyMonitoredItems(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndModifyMonitoredItems(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the ModifyMonitoredItems service contract.
///
public ModifyMonitoredItemsResponseMessage ModifyMonitoredItems(ModifyMonitoredItemsMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginModifyMonitoredItems(request, null, null);
}
return this.Channel.EndModifyMonitoredItems(result);
}
///
/// The client side implementation of the BeginModifyMonitoredItems service contract.
///
public IAsyncResult BeginModifyMonitoredItems(ModifyMonitoredItemsMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginModifyMonitoredItems(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndModifyMonitoredItems service contract.
///
public ModifyMonitoredItemsResponseMessage EndModifyMonitoredItems(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndModifyMonitoredItems(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the ModifyMonitoredItems service contract.
///
public Task ModifyMonitoredItemsAsync(ModifyMonitoredItemsMessage request)
{
return this.Channel.ModifyMonitoredItemsAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_SetMonitoringMode)
#if (!NET_STANDARD)
///
/// The client side implementation of the SetMonitoringMode service contract.
///
public SetMonitoringModeResponseMessage SetMonitoringMode(SetMonitoringModeMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginSetMonitoringMode(request, null, null);
}
return this.Channel.EndSetMonitoringMode(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginSetMonitoringMode service contract.
///
public IAsyncResult BeginSetMonitoringMode(SetMonitoringModeMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginSetMonitoringMode(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndSetMonitoringMode service contract.
///
public SetMonitoringModeResponseMessage EndSetMonitoringMode(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndSetMonitoringMode(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the SetMonitoringMode service contract.
///
public SetMonitoringModeResponseMessage SetMonitoringMode(SetMonitoringModeMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginSetMonitoringMode(request, null, null);
}
return this.Channel.EndSetMonitoringMode(result);
}
///
/// The client side implementation of the BeginSetMonitoringMode service contract.
///
public IAsyncResult BeginSetMonitoringMode(SetMonitoringModeMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginSetMonitoringMode(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndSetMonitoringMode service contract.
///
public SetMonitoringModeResponseMessage EndSetMonitoringMode(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndSetMonitoringMode(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the SetMonitoringMode service contract.
///
public Task SetMonitoringModeAsync(SetMonitoringModeMessage request)
{
return this.Channel.SetMonitoringModeAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_SetTriggering)
#if (!NET_STANDARD)
///
/// The client side implementation of the SetTriggering service contract.
///
public SetTriggeringResponseMessage SetTriggering(SetTriggeringMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginSetTriggering(request, null, null);
}
return this.Channel.EndSetTriggering(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginSetTriggering service contract.
///
public IAsyncResult BeginSetTriggering(SetTriggeringMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginSetTriggering(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndSetTriggering service contract.
///
public SetTriggeringResponseMessage EndSetTriggering(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndSetTriggering(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the SetTriggering service contract.
///
public SetTriggeringResponseMessage SetTriggering(SetTriggeringMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginSetTriggering(request, null, null);
}
return this.Channel.EndSetTriggering(result);
}
///
/// The client side implementation of the BeginSetTriggering service contract.
///
public IAsyncResult BeginSetTriggering(SetTriggeringMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginSetTriggering(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndSetTriggering service contract.
///
public SetTriggeringResponseMessage EndSetTriggering(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndSetTriggering(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the SetTriggering service contract.
///
public Task SetTriggeringAsync(SetTriggeringMessage request)
{
return this.Channel.SetTriggeringAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_DeleteMonitoredItems)
#if (!NET_STANDARD)
///
/// The client side implementation of the DeleteMonitoredItems service contract.
///
public DeleteMonitoredItemsResponseMessage DeleteMonitoredItems(DeleteMonitoredItemsMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteMonitoredItems(request, null, null);
}
return this.Channel.EndDeleteMonitoredItems(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginDeleteMonitoredItems service contract.
///
public IAsyncResult BeginDeleteMonitoredItems(DeleteMonitoredItemsMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteMonitoredItems(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteMonitoredItems service contract.
///
public DeleteMonitoredItemsResponseMessage EndDeleteMonitoredItems(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteMonitoredItems(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the DeleteMonitoredItems service contract.
///
public DeleteMonitoredItemsResponseMessage DeleteMonitoredItems(DeleteMonitoredItemsMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteMonitoredItems(request, null, null);
}
return this.Channel.EndDeleteMonitoredItems(result);
}
///
/// The client side implementation of the BeginDeleteMonitoredItems service contract.
///
public IAsyncResult BeginDeleteMonitoredItems(DeleteMonitoredItemsMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteMonitoredItems(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteMonitoredItems service contract.
///
public DeleteMonitoredItemsResponseMessage EndDeleteMonitoredItems(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteMonitoredItems(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the DeleteMonitoredItems service contract.
///
public Task DeleteMonitoredItemsAsync(DeleteMonitoredItemsMessage request)
{
return this.Channel.DeleteMonitoredItemsAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_CreateSubscription)
#if (!NET_STANDARD)
///
/// The client side implementation of the CreateSubscription service contract.
///
public CreateSubscriptionResponseMessage CreateSubscription(CreateSubscriptionMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCreateSubscription(request, null, null);
}
return this.Channel.EndCreateSubscription(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginCreateSubscription service contract.
///
public IAsyncResult BeginCreateSubscription(CreateSubscriptionMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCreateSubscription(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCreateSubscription service contract.
///
public CreateSubscriptionResponseMessage EndCreateSubscription(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCreateSubscription(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the CreateSubscription service contract.
///
public CreateSubscriptionResponseMessage CreateSubscription(CreateSubscriptionMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginCreateSubscription(request, null, null);
}
return this.Channel.EndCreateSubscription(result);
}
///
/// The client side implementation of the BeginCreateSubscription service contract.
///
public IAsyncResult BeginCreateSubscription(CreateSubscriptionMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginCreateSubscription(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndCreateSubscription service contract.
///
public CreateSubscriptionResponseMessage EndCreateSubscription(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndCreateSubscription(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the CreateSubscription service contract.
///
public Task CreateSubscriptionAsync(CreateSubscriptionMessage request)
{
return this.Channel.CreateSubscriptionAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_ModifySubscription)
#if (!NET_STANDARD)
///
/// The client side implementation of the ModifySubscription service contract.
///
public ModifySubscriptionResponseMessage ModifySubscription(ModifySubscriptionMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginModifySubscription(request, null, null);
}
return this.Channel.EndModifySubscription(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginModifySubscription service contract.
///
public IAsyncResult BeginModifySubscription(ModifySubscriptionMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginModifySubscription(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndModifySubscription service contract.
///
public ModifySubscriptionResponseMessage EndModifySubscription(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndModifySubscription(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the ModifySubscription service contract.
///
public ModifySubscriptionResponseMessage ModifySubscription(ModifySubscriptionMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginModifySubscription(request, null, null);
}
return this.Channel.EndModifySubscription(result);
}
///
/// The client side implementation of the BeginModifySubscription service contract.
///
public IAsyncResult BeginModifySubscription(ModifySubscriptionMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginModifySubscription(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndModifySubscription service contract.
///
public ModifySubscriptionResponseMessage EndModifySubscription(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndModifySubscription(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the ModifySubscription service contract.
///
public Task ModifySubscriptionAsync(ModifySubscriptionMessage request)
{
return this.Channel.ModifySubscriptionAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_SetPublishingMode)
#if (!NET_STANDARD)
///
/// The client side implementation of the SetPublishingMode service contract.
///
public SetPublishingModeResponseMessage SetPublishingMode(SetPublishingModeMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginSetPublishingMode(request, null, null);
}
return this.Channel.EndSetPublishingMode(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginSetPublishingMode service contract.
///
public IAsyncResult BeginSetPublishingMode(SetPublishingModeMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginSetPublishingMode(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndSetPublishingMode service contract.
///
public SetPublishingModeResponseMessage EndSetPublishingMode(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndSetPublishingMode(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the SetPublishingMode service contract.
///
public SetPublishingModeResponseMessage SetPublishingMode(SetPublishingModeMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginSetPublishingMode(request, null, null);
}
return this.Channel.EndSetPublishingMode(result);
}
///
/// The client side implementation of the BeginSetPublishingMode service contract.
///
public IAsyncResult BeginSetPublishingMode(SetPublishingModeMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginSetPublishingMode(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndSetPublishingMode service contract.
///
public SetPublishingModeResponseMessage EndSetPublishingMode(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndSetPublishingMode(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the SetPublishingMode service contract.
///
public Task SetPublishingModeAsync(SetPublishingModeMessage request)
{
return this.Channel.SetPublishingModeAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_Publish)
#if (!NET_STANDARD)
///
/// The client side implementation of the Publish service contract.
///
public PublishResponseMessage Publish(PublishMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginPublish(request, null, null);
}
return this.Channel.EndPublish(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginPublish service contract.
///
public IAsyncResult BeginPublish(PublishMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginPublish(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndPublish service contract.
///
public PublishResponseMessage EndPublish(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndPublish(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the Publish service contract.
///
public PublishResponseMessage Publish(PublishMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginPublish(request, null, null);
}
return this.Channel.EndPublish(result);
}
///
/// The client side implementation of the BeginPublish service contract.
///
public IAsyncResult BeginPublish(PublishMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginPublish(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndPublish service contract.
///
public PublishResponseMessage EndPublish(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndPublish(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the Publish service contract.
///
public Task PublishAsync(PublishMessage request)
{
return this.Channel.PublishAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_Republish)
#if (!NET_STANDARD)
///
/// The client side implementation of the Republish service contract.
///
public RepublishResponseMessage Republish(RepublishMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRepublish(request, null, null);
}
return this.Channel.EndRepublish(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginRepublish service contract.
///
public IAsyncResult BeginRepublish(RepublishMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRepublish(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRepublish service contract.
///
public RepublishResponseMessage EndRepublish(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRepublish(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the Republish service contract.
///
public RepublishResponseMessage Republish(RepublishMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRepublish(request, null, null);
}
return this.Channel.EndRepublish(result);
}
///
/// The client side implementation of the BeginRepublish service contract.
///
public IAsyncResult BeginRepublish(RepublishMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRepublish(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRepublish service contract.
///
public RepublishResponseMessage EndRepublish(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRepublish(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the Republish service contract.
///
public Task RepublishAsync(RepublishMessage request)
{
return this.Channel.RepublishAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_TransferSubscriptions)
#if (!NET_STANDARD)
///
/// The client side implementation of the TransferSubscriptions service contract.
///
public TransferSubscriptionsResponseMessage TransferSubscriptions(TransferSubscriptionsMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginTransferSubscriptions(request, null, null);
}
return this.Channel.EndTransferSubscriptions(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginTransferSubscriptions service contract.
///
public IAsyncResult BeginTransferSubscriptions(TransferSubscriptionsMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginTransferSubscriptions(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndTransferSubscriptions service contract.
///
public TransferSubscriptionsResponseMessage EndTransferSubscriptions(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndTransferSubscriptions(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the TransferSubscriptions service contract.
///
public TransferSubscriptionsResponseMessage TransferSubscriptions(TransferSubscriptionsMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginTransferSubscriptions(request, null, null);
}
return this.Channel.EndTransferSubscriptions(result);
}
///
/// The client side implementation of the BeginTransferSubscriptions service contract.
///
public IAsyncResult BeginTransferSubscriptions(TransferSubscriptionsMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginTransferSubscriptions(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndTransferSubscriptions service contract.
///
public TransferSubscriptionsResponseMessage EndTransferSubscriptions(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndTransferSubscriptions(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the TransferSubscriptions service contract.
///
public Task TransferSubscriptionsAsync(TransferSubscriptionsMessage request)
{
return this.Channel.TransferSubscriptionsAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_DeleteSubscriptions)
#if (!NET_STANDARD)
///
/// The client side implementation of the DeleteSubscriptions service contract.
///
public DeleteSubscriptionsResponseMessage DeleteSubscriptions(DeleteSubscriptionsMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteSubscriptions(request, null, null);
}
return this.Channel.EndDeleteSubscriptions(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginDeleteSubscriptions service contract.
///
public IAsyncResult BeginDeleteSubscriptions(DeleteSubscriptionsMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteSubscriptions(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteSubscriptions service contract.
///
public DeleteSubscriptionsResponseMessage EndDeleteSubscriptions(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteSubscriptions(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the DeleteSubscriptions service contract.
///
public DeleteSubscriptionsResponseMessage DeleteSubscriptions(DeleteSubscriptionsMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginDeleteSubscriptions(request, null, null);
}
return this.Channel.EndDeleteSubscriptions(result);
}
///
/// The client side implementation of the BeginDeleteSubscriptions service contract.
///
public IAsyncResult BeginDeleteSubscriptions(DeleteSubscriptionsMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginDeleteSubscriptions(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndDeleteSubscriptions service contract.
///
public DeleteSubscriptionsResponseMessage EndDeleteSubscriptions(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndDeleteSubscriptions(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the DeleteSubscriptions service contract.
///
public Task DeleteSubscriptionsAsync(DeleteSubscriptionsMessage request)
{
return this.Channel.DeleteSubscriptionsAsync(request);
}
#endif
#endif
}
#endregion
#region DiscoveryChannel Class
///
/// A channel object used by clients to access a UA service.
///
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.ModelCompiler", "1.0.0.0")]
#if (!NET_STANDARD)
public partial class DiscoveryChannel : WcfChannelBase, IDiscoveryChannel
#else
public partial class DiscoveryChannel : UaChannelBase, IDiscoveryChannel
#endif
{
///
/// Initializes the object with the endpoint address.
///
internal DiscoveryChannel()
{
}
#if (!OPCUA_EXCLUDE_FindServers)
#if (!NET_STANDARD)
///
/// The client side implementation of the FindServers service contract.
///
public FindServersResponseMessage FindServers(FindServersMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginFindServers(request, null, null);
}
return this.Channel.EndFindServers(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginFindServers service contract.
///
public IAsyncResult BeginFindServers(FindServersMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginFindServers(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndFindServers service contract.
///
public FindServersResponseMessage EndFindServers(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndFindServers(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the FindServers service contract.
///
public FindServersResponseMessage FindServers(FindServersMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginFindServers(request, null, null);
}
return this.Channel.EndFindServers(result);
}
///
/// The client side implementation of the BeginFindServers service contract.
///
public IAsyncResult BeginFindServers(FindServersMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginFindServers(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndFindServers service contract.
///
public FindServersResponseMessage EndFindServers(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndFindServers(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the FindServers service contract.
///
public Task FindServersAsync(FindServersMessage request)
{
return this.Channel.FindServersAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_FindServersOnNetwork)
#if (!NET_STANDARD)
///
/// The client side implementation of the FindServersOnNetwork service contract.
///
public FindServersOnNetworkResponseMessage FindServersOnNetwork(FindServersOnNetworkMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginFindServersOnNetwork(request, null, null);
}
return this.Channel.EndFindServersOnNetwork(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginFindServersOnNetwork service contract.
///
public IAsyncResult BeginFindServersOnNetwork(FindServersOnNetworkMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginFindServersOnNetwork(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndFindServersOnNetwork service contract.
///
public FindServersOnNetworkResponseMessage EndFindServersOnNetwork(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndFindServersOnNetwork(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the FindServersOnNetwork service contract.
///
public FindServersOnNetworkResponseMessage FindServersOnNetwork(FindServersOnNetworkMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginFindServersOnNetwork(request, null, null);
}
return this.Channel.EndFindServersOnNetwork(result);
}
///
/// The client side implementation of the BeginFindServersOnNetwork service contract.
///
public IAsyncResult BeginFindServersOnNetwork(FindServersOnNetworkMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginFindServersOnNetwork(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndFindServersOnNetwork service contract.
///
public FindServersOnNetworkResponseMessage EndFindServersOnNetwork(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndFindServersOnNetwork(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the FindServersOnNetwork service contract.
///
public Task FindServersOnNetworkAsync(FindServersOnNetworkMessage request)
{
return this.Channel.FindServersOnNetworkAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_GetEndpoints)
#if (!NET_STANDARD)
///
/// The client side implementation of the GetEndpoints service contract.
///
public GetEndpointsResponseMessage GetEndpoints(GetEndpointsMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginGetEndpoints(request, null, null);
}
return this.Channel.EndGetEndpoints(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginGetEndpoints service contract.
///
public IAsyncResult BeginGetEndpoints(GetEndpointsMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginGetEndpoints(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndGetEndpoints service contract.
///
public GetEndpointsResponseMessage EndGetEndpoints(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndGetEndpoints(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the GetEndpoints service contract.
///
public GetEndpointsResponseMessage GetEndpoints(GetEndpointsMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginGetEndpoints(request, null, null);
}
return this.Channel.EndGetEndpoints(result);
}
///
/// The client side implementation of the BeginGetEndpoints service contract.
///
public IAsyncResult BeginGetEndpoints(GetEndpointsMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginGetEndpoints(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndGetEndpoints service contract.
///
public GetEndpointsResponseMessage EndGetEndpoints(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndGetEndpoints(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the GetEndpoints service contract.
///
public Task GetEndpointsAsync(GetEndpointsMessage request)
{
return this.Channel.GetEndpointsAsync(request);
}
#endif
#endif
}
#endregion
#region RegistrationChannel Class
///
/// A channel object used by clients to access a UA service.
///
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.ModelCompiler", "1.0.0.0")]
#if (!NET_STANDARD)
public partial class RegistrationChannel : WcfChannelBase, IRegistrationChannel
#else
public partial class RegistrationChannel : UaChannelBase, IRegistrationChannel
#endif
{
///
/// Initializes the object with the endpoint address.
///
internal RegistrationChannel()
{
}
#if (!OPCUA_EXCLUDE_RegisterServer)
#if (!NET_STANDARD)
///
/// The client side implementation of the RegisterServer service contract.
///
public RegisterServerResponseMessage RegisterServer(RegisterServerMessage request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRegisterServer(request, null, null);
}
return this.Channel.EndRegisterServer(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginRegisterServer service contract.
///
public IAsyncResult BeginRegisterServer(RegisterServerMessage request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRegisterServer(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRegisterServer service contract.
///
public RegisterServerResponseMessage EndRegisterServer(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRegisterServer(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the RegisterServer service contract.
///
public RegisterServerResponseMessage RegisterServer(RegisterServerMessage request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRegisterServer(request, null, null);
}
return this.Channel.EndRegisterServer(result);
}
///
/// The client side implementation of the BeginRegisterServer service contract.
///
public IAsyncResult BeginRegisterServer(RegisterServerMessage request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRegisterServer(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRegisterServer service contract.
///
public RegisterServerResponseMessage EndRegisterServer(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRegisterServer(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the RegisterServer service contract.
///
public Task RegisterServerAsync(RegisterServerMessage request)
{
return this.Channel.RegisterServerAsync(request);
}
#endif
#endif
#if (!OPCUA_EXCLUDE_RegisterServer2)
#if (!NET_STANDARD)
///
/// The client side implementation of the RegisterServer2 service contract.
///
public RegisterServer2ResponseMessage RegisterServer2(RegisterServer2Message request)
{
try
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRegisterServer2(request, null, null);
}
return this.Channel.EndRegisterServer2(result);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
///
/// The client side implementation of the BeginRegisterServer2 service contract.
///
public IAsyncResult BeginRegisterServer2(RegisterServer2Message request, AsyncCallback callback, object asyncState)
{
WcfChannelAsyncResult asyncResult = new WcfChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRegisterServer2(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRegisterServer2 service contract.
///
public RegisterServer2ResponseMessage EndRegisterServer2(IAsyncResult result)
{
try
{
WcfChannelAsyncResult asyncResult = WcfChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRegisterServer2(asyncResult.InnerResult);
}
catch (FaultException e)
{
throw HandleSoapFault(e);
}
}
#else // NET_STANDARD
///
/// The client side implementation of the RegisterServer2 service contract.
///
public RegisterServer2ResponseMessage RegisterServer2(RegisterServer2Message request)
{
IAsyncResult result = null;
lock (this.Channel)
{
result = this.Channel.BeginRegisterServer2(request, null, null);
}
return this.Channel.EndRegisterServer2(result);
}
///
/// The client side implementation of the BeginRegisterServer2 service contract.
///
public IAsyncResult BeginRegisterServer2(RegisterServer2Message request, AsyncCallback callback, object asyncState)
{
UaChannelAsyncResult asyncResult = new UaChannelAsyncResult(Channel, callback, asyncState);
lock (asyncResult.Lock)
{
asyncResult.InnerResult = asyncResult.Channel.BeginRegisterServer2(request, asyncResult.OnOperationCompleted, null);
}
return asyncResult;
}
///
/// The client side implementation of the EndRegisterServer2 service contract.
///
public RegisterServer2ResponseMessage EndRegisterServer2(IAsyncResult result)
{
UaChannelAsyncResult asyncResult = UaChannelAsyncResult.WaitForComplete(result);
return asyncResult.Channel.EndRegisterServer2(asyncResult.InnerResult);
}
#endif
#if (NET_STANDARD_ASYNC)
///
/// The async client side implementation of the RegisterServer2 service contract.
///
public Task RegisterServer2Async(RegisterServer2Message request)
{
return this.Channel.RegisterServer2Async(request);
}
#endif
#endif
}
#endregion
}