Exemplo n.º 1
0
 public async Task LogBatch(ILogBatchModel model)
 {
     if (model.StartSessions != null)
     {
         foreach (var startSession in model.StartSessions)
         {
             await StartSession(startSession);
         }
     }
     if (model.AuthenticateSessions != null)
     {
         foreach (var authSession in model.AuthenticateSessions)
         {
             await AuthenticateSession(authSession);
         }
     }
     if (model.StartRequests != null)
     {
         foreach (var startRequest in model.StartRequests)
         {
             await StartRequest(startRequest);
         }
     }
     if (model.LogEvents != null)
     {
         foreach (var logEvent in model.LogEvents)
         {
             await LogEvent(logEvent);
         }
     }
     if (model.EndRequests != null)
     {
         foreach (var endRequest in model.EndRequests)
         {
             await EndRequest(endRequest);
         }
     }
     if (model.EndSessions != null)
     {
         foreach (var endSession in model.EndSessions)
         {
             await EndSession(endSession);
         }
     }
 }
Exemplo n.º 2
0
 public LogBatchModel(ILogBatchModel source)
 {
     StartSessions = source.StartSessions
                     ?.Select(session => new StartSessionModel(session)).ToArray()
                     ?? new StartSessionModel[] { };
     AuthenticateSessions = source.AuthenticateSessions
                            ?.Select(session => new AuthenticateSessionModel(session)).ToArray()
                            ?? new AuthenticateSessionModel[] { };
     StartRequests = source.StartRequests
                     ?.Select(request => new StartRequestModel(request)).ToArray()
                     ?? new StartRequestModel[] { };
     LogEvents = source.LogEvents
                 ?.Select(evt => new LogEventModel(evt)).ToArray()
                 ?? new LogEventModel[] { };
     EndRequests = source.EndRequests
                   ?.Select(request => new EndRequestModel(request)).ToArray()
                   ?? new EndRequestModel[] { };
     EndSessions = source.EndSessions
                   ?.Select(session => new EndSessionModel(session)).ToArray()
                   ?? new EndSessionModel[] { };
 }
Exemplo n.º 3
0
 public Task LogBatch(ILogBatchModel model)
 => client.PermanentLog.LogBatch(new LogBatchModel(model));