.NET Based OPC UA Client/Server SDK  3.3.0.530
Methods

If an object type provides methods to be called on the object instances, the model needs to implement either the IMethodDispatcher or the IAsyncMethodDispatcher interface. This is already done by the UaModeler. The UaModeler will also generate an additional interface for each object type with methods and a property of this type. You can either set an object to the property that will receive the method calls or you can implement the interface directly on the object type model. The latter is done in the ProductionModel:

public partial class ProductionModel : IProductionMethods

Of course the implementation needs to be added as well. The methods will be called on the synchronization context, so we do not need to perform any locking here.

public StatusCode InsertJob(
RequestContext context,
ProductionModel model,
string Identifier,
string Name,
NodeId[] InputMaterial,
NodeId[] OutputMaterial,
out NodeId JobNodeId
)
{
Console.WriteLine($"[{Thread.CurrentThread.ManagedThreadId}] InsertJob");
if (ProductionPlan.Any(j => j.Identifier == Identifier))
{
JobNodeId = null;
return StatusCodes.BadAlreadyExists;
}
var job = new TemperingJobModel()
{
Identifier = Identifier,
Name = Name,
};
ProductionPlan.Add(job);
job.Initialize();
CurrentCountOfJobs = (uint)ProductionPlan.Count;
JobNodeId = job.JobNodeId;
return StatusCodes.Good;
}