Interface IEventService
Defines the contract for event management operations in the OEMS system.
Namespace: OEMS.Core.Application.ApplicationServiceInterfaces
Assembly: OEMS.Core.dll
Syntax
public interface IEventService
Methods
AddProcessAsync(Guid, CreateProcessDto)
Adds a new process to an event.
Declaration
Task<ProcessDto> AddProcessAsync(Guid eventId, CreateProcessDto dto)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | The unique identifier of the event. |
CreateProcessDto | dto | The process creation data transfer object. |
Returns
Type | Description |
---|---|
Task<ProcessDto> | A task that represents the asynchronous operation. The task result contains the created process data transfer object. |
AddProcessStepAsync(Guid, CreateProcessStepDto)
Adds a new process step to a process.
Declaration
Task<ProcessStepDto> AddProcessStepAsync(Guid processId, CreateProcessStepDto dto)
Parameters
Type | Name | Description |
---|---|---|
Guid | processId | The unique identifier of the process. |
CreateProcessStepDto | dto | The process step creation data transfer object. |
Returns
Type | Description |
---|---|
Task<ProcessStepDto> | A task that represents the asynchronous operation. The task result contains the created process step data transfer object. |
ArchivePastEventsAsync(CancellationToken)
Archives events that have already passed.
Declaration
Task<int> ArchivePastEventsAsync(CancellationToken ct = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | ct | Cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task<int> | A task that represents the asynchronous operation. The task result contains the number of events archived. |
CancelEventAsync(Guid, string)
Setzt den Status eines Events auf „Cancelled“ und speichert einen Grund.
Declaration
Task<EventDto> CancelEventAsync(Guid eventId, string cancellationReason)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | |
string | cancellationReason |
Returns
Type | Description |
---|---|
Task<EventDto> |
CancelEventRegistrationAsync(Guid, Guid)
Cancels a user's registration for an event.
Declaration
Task<bool> CancelEventRegistrationAsync(Guid userId, Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The unique identifier of the user cancelling registration. |
Guid | eventId | The unique identifier of the event. |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents the asynchronous operation. The task result indicates whether the cancellation was successful. |
CheckIfEventWithCategory(Guid, Guid)
Checks if there are any events using a specific category within an organization.
Declaration
Task<(bool hasAny, List<string> eventNames)> CheckIfEventWithCategory(Guid orgId, Guid categoryId)
Parameters
Type | Name | Description |
---|---|---|
Guid | orgId | The unique identifier of the organization. |
Guid | categoryId | The unique identifier of the category to check. |
Returns
Type | Description |
---|---|
Task<(bool hasAny, List<string> eventNames)> | A task that represents the asynchronous operation. The task result contains a tuple indicating whether events exist and a list of event names. |
CreateEventAsync(CreateEventDto, Guid, Guid)
Legt ein neues Event an.
Declaration
Task CreateEventAsync(CreateEventDto dto, Guid organizerId, Guid organizationId)
Parameters
Type | Name | Description |
---|---|---|
CreateEventDto | dto | |
Guid | organizerId | |
Guid | organizationId |
Returns
Type | Description |
---|---|
Task |
DeleteEventAsync(Guid)
Löscht ein Event.
Declaration
Task DeleteEventAsync(Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId |
Returns
Type | Description |
---|---|
Task |
DeleteEventIfNoParticipantsAsync(Guid, Guid)
Deletes an event if it has no participants.
Declaration
Task<bool> DeleteEventIfNoParticipantsAsync(Guid eventId, Guid userId)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | The unique identifier of the event to delete. |
Guid | userId | The unique identifier of the user requesting the deletion. |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents the asynchronous operation. The task result indicates whether the event was deleted. |
DeleteProcessAsync(Guid, Guid)
Deletes a process from an event.
Declaration
Task DeleteProcessAsync(Guid processId, Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | processId | The unique identifier of the process to delete. |
Guid | eventId | The unique identifier of the event. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
DeleteProcessStepAsync(Guid, Guid)
Deletes a process step from an event.
Declaration
Task DeleteProcessStepAsync(Guid stepId, Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | stepId | The unique identifier of the process step to delete. |
Guid | eventId | The unique identifier of the event. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
GetAllEventsbyOrganisationAsync(Guid)
Retrieves all events for a specific organization.
Declaration
Task<IEnumerable<EventDto>> GetAllEventsbyOrganisationAsync(Guid orgId)
Parameters
Type | Name | Description |
---|---|---|
Guid | orgId | The unique identifier of the organization. |
Returns
Type | Description |
---|---|
Task<IEnumerable<EventDto>> | A task that represents the asynchronous operation. The task result contains a collection of event data transfer objects. |
GetEventByIdAsync(Guid)
Liefert ein Event per Id.
Declaration
Task<EventDto> GetEventByIdAsync(Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId |
Returns
Type | Description |
---|---|
Task<EventDto> |
GetEventsByOrganizationAsync(Guid)
Liefert alle Events einer Organisation.
Declaration
Task<IEnumerable<EventDto>> GetEventsByOrganizationAsync(Guid organizationId)
Parameters
Type | Name | Description |
---|---|---|
Guid | organizationId |
Returns
Type | Description |
---|---|
Task<IEnumerable<EventDto>> |
GetEventsByStatusAsync(EventStatus)
Liefert Events nach ihrem Status.
Declaration
Task<IEnumerable<EventDto>> GetEventsByStatusAsync(EventStatus status)
Parameters
Type | Name | Description |
---|---|---|
EventStatus | status |
Returns
Type | Description |
---|---|
Task<IEnumerable<EventDto>> |
GetEventsInDateRangeAsync(DateTime, DateTime)
Liefert Events innerhalb eines Datumsbereichs.
Declaration
Task<IEnumerable<EventDto>> GetEventsInDateRangeAsync(DateTime from, DateTime to)
Parameters
Type | Name | Description |
---|---|---|
DateTime | from | |
DateTime | to |
Returns
Type | Description |
---|---|
Task<IEnumerable<EventDto>> |
GetParticipantsByEventIdAsync(Guid)
Retrieves all participants for a specific event.
Declaration
Task<List<EventParticipantDto>> GetParticipantsByEventIdAsync(Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | The unique identifier of the event. |
Returns
Type | Description |
---|---|
Task<List<EventParticipantDto>> | A task that represents the asynchronous operation. The task result contains a list of event participant data transfer objects. |
GetUniqueEventCategories(List<EventDto>)
Gets unique event categories from a list of events.
Declaration
Task<List<string>> GetUniqueEventCategories(List<EventDto> events)
Parameters
Type | Name | Description |
---|---|---|
List<EventDto> | events | A list of event data transfer objects. |
Returns
Type | Description |
---|---|
Task<List<string>> | A task that represents the asynchronous operation. The task result contains a list of unique category names. |
GetUserRegisteredEventIdsAsync(Guid, IEnumerable<Guid>)
Gets the event IDs for which a user is registered from a given collection of event IDs.
Declaration
Task<HashSet<Guid>> GetUserRegisteredEventIdsAsync(Guid userId, IEnumerable<Guid> eventIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The unique identifier of the user. |
IEnumerable<Guid> | eventIds | A collection of event IDs to check. |
Returns
Type | Description |
---|---|
Task<HashSet<Guid>> | A task that represents the asynchronous operation. The task result contains a set of event IDs for which the user is registered. |
InviteParticipantAsync(Guid, Guid)
Invites a specific user to participate in an event.
Declaration
Task InviteParticipantAsync(Guid eventId, Guid userId)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | The unique identifier of the event. |
Guid | userId | The unique identifier of the user to invite. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
InviteParticipantsAsync(Guid, IEnumerable<Guid>)
Declaration
Task InviteParticipantsAsync(Guid eventId, IEnumerable<Guid> userIds)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | |
IEnumerable<Guid> | userIds |
Returns
Type | Description |
---|---|
Task |
InviteUserByEmailAsync(Guid, string)
Invites a user to participate in an event by email address.
Declaration
Task InviteUserByEmailAsync(Guid eventId, string email)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | The unique identifier of the event. |
string | The email address of the person to invite. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
IsUserRegisteredAsync(Guid, Guid)
Checks if a user is registered for a specific event.
Declaration
Task<bool> IsUserRegisteredAsync(Guid userId, Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The unique identifier of the user. |
Guid | eventId | The unique identifier of the event. |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents the asynchronous operation. The task result indicates whether the user is registered. |
RegisterUserToEventAsync(Guid, Guid)
Registers a user for an event.
Declaration
Task<bool> RegisterUserToEventAsync(Guid userId, Guid eventId)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The unique identifier of the user to register. |
Guid | eventId | The unique identifier of the event. |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents the asynchronous operation. The task result indicates whether the registration was successful. |
RemoveParticipantAsync(Guid, Guid)
Entfernt einen Teilnehmer.
Declaration
Task RemoveParticipantAsync(Guid eventId, Guid userId)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | |
Guid | userId |
Returns
Type | Description |
---|---|
Task |
UpdateBasicEventAsync(Guid, UpdateEventDto)
Updates basic event information.
Declaration
Task UpdateBasicEventAsync(Guid id, UpdateEventDto dto)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The unique identifier of the event to update. |
UpdateEventDto | dto | The event update data transfer object containing basic information. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
UpdateEventAsync(Guid, UpdateEventDto)
Aktualisiert ein bestehendes Event.
Declaration
Task<EventDto> UpdateEventAsync(Guid eventId, UpdateEventDto dto)
Parameters
Type | Name | Description |
---|---|---|
Guid | eventId | |
UpdateEventDto | dto |
Returns
Type | Description |
---|---|
Task<EventDto> |
UpdateProcessAsync(Guid, UpdateProcessDto)
Updates an existing process.
Declaration
Task<ProcessDto> UpdateProcessAsync(Guid processId, UpdateProcessDto dto)
Parameters
Type | Name | Description |
---|---|---|
Guid | processId | The unique identifier of the process to update. |
UpdateProcessDto | dto | The process update data transfer object. |
Returns
Type | Description |
---|---|
Task<ProcessDto> | A task that represents the asynchronous operation. The task result contains the updated process data transfer object. |
UpdateProcessStepAsync(Guid, UpdateProcessStepDto)
Updates an existing process step.
Declaration
Task<ProcessStepDto> UpdateProcessStepAsync(Guid stepId, UpdateProcessStepDto dto)
Parameters
Type | Name | Description |
---|---|---|
Guid | stepId | The unique identifier of the process step to update. |
UpdateProcessStepDto | dto | The process step update data transfer object. |
Returns
Type | Description |
---|---|
Task<ProcessStepDto> | A task that represents the asynchronous operation. The task result contains the updated process step data transfer object. |