/// <summary>
 /// 削除。
 /// </summary>
 /// <param name="proc">メッセージ解析メソッド。</param>
 internal void Remove(AnalyzeMessage proc)
 {
     _proc.Remove(proc);
     if (0 < _proc.Count)
     {
         return;
     }
     NativeMethods.UnhookWindowsHookEx(_idHook);
     GC.KeepAlive(_traceProc);
     _traceProc = null;
 }
Exemplo n.º 2
0
 public async Task Analyze(MrAnalyze mrAnalyze)
 {
     var message = new AnalyzeMessage
     {
         AlgorithmId = mrAnalyze.MrAlgorithmId,
         AnalyzeId   = mrAnalyze.Id,
         RecordId    = mrAnalyze.MrRecordId
     };
     var jsonMessage  = JsonConvert.SerializeObject(message);
     var azureMessage = new Message(Encoding.UTF8.GetBytes(jsonMessage));
     await queueClient.SendAsync(azureMessage);
 }
Exemplo n.º 3
0
        public HttpResponseMessage Post(AnalyzeMessage message)
        {
            var output = _mediator.Send(message);

            return(Request.CreateResponse(output));
        }
 /// <summary>
 /// 登録。
 /// </summary>
 /// <param name="proc">メッセージ解析メソッド。</param>
 internal void Entry(AnalyzeMessage proc)
 {
     _proc.Add(proc, true);
 }