public RegistrationEventArgs(RegistrationEventType eventType, ServiceDescriptor descriptor, ServiceError error, bool moreComing) : base(moreComing) { EventType = eventType; Descriptor = descriptor; Error = error; }
internal static void RunRegisteredEvents(RegistrationEventType type) { var registrations = _registeredEvents[type]; foreach (var registration in registrations) { registration.Invoke(); } }
public static string DisplayName(this RegistrationEventType eventType) { return (typeof(RegistrationEventType) .GetFields() .FirstOrDefault(x => x.Name == eventType.ToString()) ?.GetCustomAttributes <DisplayAttribute>() .FirstOrDefault() ?.Name); }
public Registration( Employee employee, RegistrationEventType eventType, Entrance entrance) { SetDateTime(); SetEventType(eventType); SetEmployee(employee); SetEntrance(entrance); }
public void RegisterEmployee(Employee employee, RegistrationEventType eventType, Entrance entrance) { if (employee == null) { throw new ArgumentNullException(nameof(employee)); } if (entrance == null) { throw new ArgumentNullException(nameof(entrance)); } var registration = new Registration(employee, eventType, entrance); _registrationRepository.Add(registration); }
private void SetEventType(RegistrationEventType eventType) { EventType = eventType; }