var server = new DcmServer<WorklistService>();
public delegate DcmAssociateResult DcmAssociationCallback
(WorklistService client, DcmAssociate association);
public delegate IEnumerable<CFindResponse> DcmCFindRequest
(WorklistService client, DcmDataset query);
public DcmAssociationCallback OnAssociationRequest;
public DcmCFindRequest OnCFindRequest;
Now, to set these delagates for the WorklistServices I'm using the
server's OnDicomClientCreated:
server.OnDicomClientCreated += new
DcmServer<WorklistService>.DicomClientCreatedDelegate((s, c, dst) =>
{
FooService service = new FooService(..using some local
context...);
c.OnAssociationRequest = service.Associate;
c.OnCFindRequest = service.Query;
});