Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Applications/ConsoleReferenceClient/ClientSamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public async Task BrowseAsync(ISession session, CancellationToken ct = default)
try
{
// Create a Browser object
var browser = new Browser(session, m_telemetry)
var browser = new Browser(session)
{
// Set browse parameters
BrowseDirection = BrowseDirection.Forward,
Expand Down Expand Up @@ -1192,7 +1192,7 @@ private static Task FetchReferenceIdTypesAsync(
/// <summary>
/// Output all values as JSON.
/// </summary>
public async Task<(DataValueCollection, IList<ServiceResult>)> ReadAllValuesAsync(
public async Task<ResultSet<DataValue>> ReadAllValuesAsync(
IUAClient uaClient,
NodeIdCollection variableIds,
CancellationToken ct = default)
Expand Down Expand Up @@ -1278,7 +1278,7 @@ private static Task FetchReferenceIdTypesAsync(
}
} while (retrySingleRead);

return (values, errors);
return ResultSet.From(values, errors);
}

/// <summary>
Expand Down
6 changes: 4 additions & 2 deletions Applications/ConsoleReferenceClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,10 @@ r is VariableNode v &&

if (jsonvalues && variableIds != null)
{
(DataValueCollection allValues, IList<ServiceResult> results)
= await samples
(
IReadOnlyList<DataValue> allValues,
IReadOnlyList<ServiceResult> results
) = await samples
.ReadAllValuesAsync(uaClient, variableIds, ct)
.ConfigureAwait(false);
}
Expand Down
2 changes: 1 addition & 1 deletion Applications/ConsoleReferenceClient/UAClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public async Task<bool> ConnectAsync(
endpointConfiguration);

// Create the session factory. - we could take it as parameter or as member
var sessionFactory = new TraceableSessionFactory(m_telemetry);
var sessionFactory = new DefaultSessionFactory(m_telemetry);

// Create the session
ISession session = await sessionFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public class NodeCacheResolver : IComplexTypeResolver
/// Initializes the type resolver with a session to load the custom type information.
/// </summary>
public NodeCacheResolver(ISession session, ITelemetryContext telemetry)
: this(new LruNodeCache(session, telemetry), telemetry)
: this(session, new LruNodeCache(
new NodeCacheContext(session),
telemetry), telemetry)
{
}

Expand All @@ -64,7 +66,10 @@ public NodeCacheResolver(
ISession session,
TimeSpan cacheExpiry,
ITelemetryContext telemetry)
: this(new LruNodeCache(session, telemetry, cacheExpiry), telemetry)
: this(session, new LruNodeCache(
new NodeCacheContext(session),
telemetry,
cacheExpiry), telemetry)
{
}

Expand All @@ -76,17 +81,24 @@ public NodeCacheResolver(
TimeSpan cacheExpiry,
int capacity,
ITelemetryContext telemetry)
: this(new LruNodeCache(session, telemetry, cacheExpiry, capacity), telemetry)
: this(session, new LruNodeCache(
new NodeCacheContext(session),
telemetry,
cacheExpiry,
capacity), telemetry)
{
}

/// <summary>
/// Initializes the type resolver with a session and lru cache to load the
/// custom type information with the specified expiry and cache size.
/// </summary>
public NodeCacheResolver(ILruNodeCache lruNodeCache, ITelemetryContext telemetry)
public NodeCacheResolver(
ISession session,
ILruNodeCache lruNodeCache,
ITelemetryContext telemetry)
{
m_session = lruNodeCache.Session;
m_session = session;
m_lruNodeCache = lruNodeCache;
m_logger = telemetry.CreateLogger<NodeCacheResolver>();
FactoryBuilder = m_session.Factory.Builder;
Expand Down
Loading