public GroupModule(ICommandDispatcher commandDispatcher, IGroupStorage groupStorage, IValidatorResolver validatorResolver) : base(commandDispatcher, validatorResolver, modulePath: "groups") { Get("{id}", async args => await Fetch <GetGroup, Group> (async x => await groupStorage.GetAsync(x.Id)).HandleAsync()); Get("", async args => await FetchCollection <BrowseGroups, Group> (async x => await groupStorage.BrowseAsync(x)) .MapTo(x => new BasicGroup { Id = x.Id, OrganizationId = x.OrganizationId, Name = x.Name, Codename = x.Codename, IsPublic = x.IsPublic, State = x.State, CreatedAt = x.CreatedAt, MembersCount = x.Members?.Count ?? 0 }).HandleAsync()); Post("", async args => await For <CreateGroup>() .SetResourceId(x => x.GroupId) .OnSuccessAccepted("groups/{0}") .DispatchAsync()); Post("{groupId}/members", async args => await ForModerator <AddMemberToGroup>() .OnSuccessAccepted("groups/{0}") .DispatchAsync()); }
public GroupClient(IWebSocketClientStorage <TService> _socketClientStorage, IGroupStorage <TService> _groupStorage, IEventBusProxy _eventBusProxy, ILogger <GroupClient <TService> > _logger) { socketClientStorage = _socketClientStorage; groupStorage = _groupStorage; eventBusProxy = _eventBusProxy; RequestPath = TenantPathCache.GetByType(typeof(TService)); logger = _logger; }
public GroupLogic(IGroupStorage groupStorage) { _groupStorage = groupStorage; }
public StudentsController(IGroupStorage storage) { _storage = storage; }
/// <summary> /// Initializes an instance of this class /// </summary> /// <param name="controllerStorage">reference to the <see cref="IControllerStorage"/>, where all controllers are stored persistently</param> /// <param name="groupStorage">reference to the <see cref="IGroupStorage"/>, where all groups are stored persistently</param> /// <param name="ledStorage">reference to the <see cref="ILedStorage"/>, where all LEDs are stored persistently</param> public ControllerHandler(IControllerStorage controllerStorage, IGroupStorage groupStorage, ILedStorage ledStorage) { _controllerStorage = controllerStorage; _ledStorage = ledStorage; _groupStorage = groupStorage; }
public GroupService(IGroupStorage groupStorage) { this.groupStorage = groupStorage; }
public GroupLogic(IGroupStorage groupStorage) { this.groupStorage = groupStorage; }
/// <summary> /// Initializes an instance of this class /// </summary> /// <param name="groupStorage">reference to the <see cref="IGroupStorage"/> where all groups are stored persistently</param> /// <param name="ledStorage">reference to the <see cref="ILedStorage"/> where all groups are stored</param> public GroupHandler(IGroupStorage groupStorage, ILedStorage ledStorage) { _groupStorage = groupStorage; _ledStorage = ledStorage; }