diff --git a/Source/Client.cs b/Source/Client.cs index d466c4d..c46658a 100644 --- a/Source/Client.cs +++ b/Source/Client.cs @@ -13,12 +13,12 @@ namespace RaaLabs.Edge.Connectors.OPCUA; public class Client : ICreateSessions { - private readonly ApplicationConfiguration _application; - private readonly ConfiguredEndpoint _endpoint; - private readonly UserIdentity _identity; - private readonly ISessionFactory _factory; - private readonly IMetricsHandler _metrics; - private readonly ILogger _logger; + readonly ApplicationConfiguration _application; + readonly ConfiguredEndpoint _endpoint; + readonly UserIdentity _identity; + readonly ISessionFactory _factory; + readonly IMetricsHandler _metrics; + readonly ILogger _logger; public Client(ConnectorConfiguration config, ISessionFactory factory, IMetricsHandler metrics, ILogger logger) { @@ -66,7 +66,7 @@ public async Task ConnectToServer(CancellationToken cancellationToken) } } - private static (ConfiguredEndpoint, UserIdentity) ConnectAnonymouslyToAnyServerOn(string url) + static (ConfiguredEndpoint, UserIdentity) ConnectAnonymouslyToAnyServerOn(string url) { var descriptor = new EndpointDescription(url); descriptor.UserIdentityTokens.Add(new UserTokenPolicy(UserTokenType.Anonymous)); @@ -77,7 +77,7 @@ private static (ConfiguredEndpoint, UserIdentity) ConnectAnonymouslyToAnyServerO return (endpoint, identity); } - private static ApplicationConfiguration ConnectorDescription() => new() + static ApplicationConfiguration ConnectorDescription() => new() { ApplicationType = ApplicationType.Client, diff --git a/Source/Connector.cs b/Source/Connector.cs index 8302b12..497a3a8 100644 --- a/Source/Connector.cs +++ b/Source/Connector.cs @@ -12,11 +12,11 @@ namespace RaaLabs.Edge.Connectors.OPCUA; public class Connector : IRunAsync, IProduceEvent { - private readonly ICreateSessions _sessions; - private readonly IRetrieveData _retriever; - private readonly ICreateDatapointsFromDataValues _datapoints; - private readonly ILogger _logger; - private readonly IMetricsHandler _metrics; + readonly ICreateSessions _sessions; + readonly IRetrieveData _retriever; + readonly ICreateDatapointsFromDataValues _datapoints; + readonly ILogger _logger; + readonly IMetricsHandler _metrics; public Connector(ICreateSessions sessions, IRetrieveData retriever, ICreateDatapointsFromDataValues datapoints, ILogger logger, IMetricsHandler metrics) { @@ -51,7 +51,7 @@ public async Task Run() } } - private Task ConvertAndSendDataValue(NodeValue value) + Task ConvertAndSendDataValue(NodeValue value) { _metrics.NumberOfMessagesSent(1); return SendDatapoint!(_datapoints.CreateDatapointFrom(value)); diff --git a/Source/OPCUA.csproj b/Source/OPCUA.csproj index 024378d..e816e8d 100644 --- a/Source/OPCUA.csproj +++ b/Source/OPCUA.csproj @@ -20,9 +20,9 @@ - - - - + + + +