You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Obsolete("No longer thread safe. Must not use.")]
ServerStatusValue Status {get;}
But what's the next version use?
Here is my code
protectedoverridevoidOnServerStarted(IServerInternalserver){base.OnServerStarted(server);// request notifications when the user identity is changed. all valid users are accepted by default.
server.SessionManager.ImpersonateUser +=new ImpersonateEventHandler(SessionManager_ImpersonateUser);try{// allow a faster sampling interval for CurrentTime node.
server.Status.Variable.CurrentTime.MinimumSamplingInterval =250;}catch{}}
The text was updated successfully, but these errors were encountered:
BenLampson
changed the title
ServerStatusValue is Obsolete what is the next version?
ServerStatusValue was Obsolete what is the next version?
May 17, 2021
The ServerStatusValue Status { get; } property was marked as obsolete because it is not thread safe.
The thread safe version is ServerState CurrentState { get; set; }, but it returns only the State value.
A better version of that code should be:
try
{
lock (ServerInternal.Status.Lock)
{
// allow a faster sampling interval for CurrentTime node.
ServerInternal.Status.Variable.CurrentTime.MinimumSamplingInterval = 250;
}
}
AlinMoldovean
added a commit
to AlinMoldovean/UA-.NETStandard
that referenced
this issue
May 24, 2021
I found there has obsolete description here,
But what's the next version use?
Here is my code
The text was updated successfully, but these errors were encountered: