private void NotifyUser(object sender, GenericEventArg e) { var json = JsonConvert.SerializeObject(e.Data); var msg = Encoding.ASCII.GetBytes(json); webSocket.SendAsync(msg, WebSocketMessageType.Text, true, CancellationToken.None); }
// Token: 0x060012C6 RID: 4806 RVA: 0x0003CD58 File Offset: 0x0003AF58 private void Task_Error(object sender, GenericEventArg <TaskErrorEventArg> e) { if (e.Data.ExceptionHandled) { return; } PswsErrorHandling.SendErrorToClient(PswsErrorCode.CmdletExecutionFailure, e.Data.Exception, null); }
// Token: 0x06001564 RID: 5476 RVA: 0x0004EF34 File Offset: 0x0004D134 private void AppendSqmErrorRecord(object sender, GenericEventArg <TaskErrorEventArg> e) { if (e.Data.ExceptionHandled) { return; } if (this.sqmErrors.Count < 6) { LocalizedException ex = e.Data.Exception as LocalizedException; this.sqmErrors.Add(new SqmErrorRecord(e.Data.GetType().Name, (ex == null) ? "Unknown" : ex.StringId)); } }