public void WaitOn(long requestId, Scope scope, Action <Scope> handler) { EventChannel.EventMsg e = new EventChannel.EventMsg() { Id = requestId.ToString(), Type = "RequestEvent_End", Field = String.Empty }; Handlers.Add(e, new EventHandler() { Scope = scope, Handler = handler }); RegisterEvent(e); }
public T GetCreatedResource <T>() { EventChannel.EventMsg e = Get <EventChannel.EventMsg>("event"); return(JsonConvert.DeserializeObject <T>(e.Value)); }