public override ResponseHeader Write(
RequestHeader requestHeader,
WriteValueCollection nodesToWrite,
out StatusCodeCollection results,
out DiagnosticInfoCollection diagnosticInfos)
{
OperationContext context = ValidateRequest(requestHeader, RequestType.Write);
try
{
if (nodesToWrite == null || nodesToWrite.Count == 0)
{
throw new ServiceResultException(StatusCodes.BadNothingToDo);
}
m_serverInternal.NodeManager.Write(
context,
nodesToWrite,
out results,
out diagnosticInfos);
return CreateResponse(requestHeader, context.StringTable);
}
catch (ServiceResultException e)
{
lock (ServerInternal.DiagnosticsLock)
{
ServerInternal.ServerDiagnostics.RejectedRequestsCount++;
if (IsSecurityError(e.StatusCode))
{
ServerInternal.ServerDiagnostics.SecurityRejectedRequestsCount++;
}
}
throw TranslateException(context, e);
}
finally
{
OnRequestComplete(context);
}
}