Beispiel #1
0
 public void Process(OperationContext context)
 {
     if (context.CurrentOperation.Title == nameof(ISubDemoPlugin.FireEmployee))
     {
         var count = _registry.List.Count;
         if (count > 0)
         {
             var firedIndex    = new Random().Next(count);
             var firedEmployee = _registry.List[firedIndex];
             _registry.List.RemoveAt(firedIndex);
             var args = new JobOpeningArgs()
             {
                 Vacancy = firedEmployee
             };
             _raiser.Post(nameof(ISubDemoPlugin.PositionOpened), args);
             context.Complete();
         }
     }
 }