Exemple #1
0
 public TeacherTaskController(ITaskManager taskManager, ISubjectManager subjectManager, ITypeOfTaskManager typeOfTaskManager, IGroupManager groupManager)
 {
     this._taskManager = taskManager;
     this._subjectManager = subjectManager;
     this._typeOfTaskManager = typeOfTaskManager;
     this._groupManager = groupManager;
 }
Exemple #2
0
 public TaskManager(IRepository<Task> taskRepository, ITeacherManager teacherManager, IGroupManager groupManager, ITypeOfTaskManager typeOfTaskManager)
 {
     this._taskRepository = taskRepository;
     this._teacherManager = teacherManager;
     this._groupManager = groupManager;
     this._typeOfTaskManager = typeOfTaskManager;
 }
 public void ClearGroups(IGroupManager groups)
 {
     foreach (var groupName in _groupMembershipTracker.Keys.ToList())
     {
         ClearGroup(groups, groupName);
     }
 }
        public GroupManagerMock()
        {
            _dataSourceMock.RegisterData<Group>(MembershipTestData.Groups);
            _dataSourceMock.RegisterData<User>(MembershipTestData.Users);
            _dataSourceMock.Mock.Setup(d => d.Save<Group>(It.IsAny<Group>())).Returns<Group>(g => g);

            _groupManager = new GroupManager(_dataSourceMock.Mock.Object);
        }
Exemple #5
0
        public AppModule(IEmailManager emailManager, IGroupManager groupManager)
            : base("/app")
        {
            Get["/mail"] = _ => new MailsResponse { Emails = emailManager.GetAllEmails() };

            Get["/mail/{id}"] = _ => emailManager.GetEmail(_.id);

            Get["/groups"] = _ => new GroupsResponse { Groups = groupManager.GetAllGroups() };
        }
 public async Task AddToGroup(IGroupManager groupManager, string group, string connection)
 {
     await groupManager.Add(connection, group);
     if (!_groupMembershipTracker.ContainsKey(group))
     {
         _groupMembershipTracker[group] = new HashSet<string>();
     }
     _groupMembershipTracker[group].Add(connection);
 }
Exemple #7
0
 public TeacherManager(IRepository<Teacher> teacherRepository,
                       IRepository<Group2Teacher> groupToTeacherRepository,
                       IGroupManager groupManager,
                       IRepository<Institution2User> institutionToUserRepository)
 {
     this._teacherRepository = teacherRepository;
     this._groupToTeacherRepository = groupToTeacherRepository;
     this._groupManager = groupManager;
     this._institutionToUserRepository = institutionToUserRepository;
 }
        public void ClearGroup(IGroupManager groupManager, string group)
        {
            if (!_groupMembershipTracker.ContainsKey(group)) return;
            var set = _groupMembershipTracker[group];
            _groupMembershipTracker.Remove(group);

            foreach (var connectionId in set)
            {
                groupManager.Remove(connectionId, group);
            }
        }
        public GroupService(IMembershipDataSource dataSource, IGroupManager groupManager, IUserManager userManager, IRoleManager roleManager)
        {
            if (!StrixMembership.Configuration.UseGroups)
            {
                throw new InvalidOperationException(Resources.Interface.GroupsNotEnabed);
            }

            this._dataSource = dataSource;
            this._groupManager = groupManager;
            this._userManager = userManager;
            this._roleManager = roleManager;
        }
        public async Task RemoveFromGroup(IGroupManager groupManager, string group, string connection)
        {
            await groupManager.Remove(connection, group);
            if (!_groupMembershipTracker.ContainsKey(group)) return;
            var set = _groupMembershipTracker[group];

            set.Remove(connection);

            if (set.Count == 0)
            {
                _groupMembershipTracker.Remove(group);
            }
        }
Exemple #11
0
 public void ieduNnurne(ICustomizeHandler icustomizeHandler_1, IBasicHandler ibasicHandler_1, IGroupManager igroupManager_1, IFriendsManager ifriendsManager_1, IContactsManager icontactsManager_1)
 {
     this.icustomizeHandler_0 = icustomizeHandler_1;
     this.ibasicHandler_0     = ibasicHandler_1;
     this.igroupManager_0     = igroupManager_1;
     this.ifriendsManager_0   = ifriendsManager_1;
     this.icontactsManager_0  = icontactsManager_1;
 }
Exemple #12
0
        internal static async Task RemoveUserFromAllHubGroups(this ConnectionUser connectionUser, IGroupManager groups)
        {
            var cGroups = connectionUser.Groups.Keys.ToList();

            foreach (var key in cGroups)
            {
                await groups.RemoveFromGroupAsync(connectionUser.ConnectionId, key);

                connectionUser.Groups.Remove(key);
            }
            //    connectionUser.Groups = null;
            //  connectionUser.Groups = new Dictionary<string, IHubGroupItem>();
        }
 public StudentTextParser(IGroupManager groupManager, IStudentManager studentManager)
 {
     GroupManager = groupManager;
     StudentManager = studentManager;
     Columns = new List<Column>() { Index, FirstName, SecondName, FatherName, Group, Course };
 }
Exemple #14
0
 public HubContext(dynamic clients, IGroupManager groupManager)
 {
     Clients = clients;
     Groups  = groupManager;
 }
Exemple #15
0
 private SessionManager(IHubContext hubContext)
 {
     _clients = hubContext.Clients;
     _groups = hubContext.Groups;
 }
Exemple #16
0
        private static async Task <string> _removeGroupAsync(this ConnectionUser connectionUser, IGroupManager grops,
                                                             Func <int, string> createName, int groupId)
        {
            var groupName = createName(groupId);

            if (!connectionUser.Groups.ContainsKey(groupName))
            {
                return(groupName);
            }

            connectionUser.Groups.Remove(groupName);
            await grops.RemoveFromGroupAsync(connectionUser.ConnectionId, groupName);

            return(groupName);
        }
Exemple #17
0
 internal static async Task <string> AddOrReplaceAllianceRecrutManagerGroupAsync(
     this ConnectionUser connectionUser, IGroupManager grops)
 {
     return(await connectionUser.AddOrReplaceGroupAsync(grops, connectionUser.AllianceId, HubGroupTypes.Alliance,
                                                        connectionUser.AllianceName, HubGroupPrefix.RecrutManager));
 }
Exemple #18
0
 internal static async Task <string> RemoveAllianceRecrutManagerGroupNameAsync(this ConnectionUser connectionUser,
                                                                               IGroupManager grops)
 {
     return
         (await connectionUser._removeGroupAsync(grops, CreateAllianceRecrutManagerGroupName,
                                                 connectionUser.AllianceId));
 }
Exemple #19
0
 public GroupController()
 {
     _aManager = new GroupManager();
 }
Exemple #20
0
 public void TestSetup()
 {
     groupManager  = new FakeGroupManager();
     gardenManager = new FakeGardenManager();
 }
Exemple #21
0
 public AppController(IUserManager userManager, IRouteManager routeManager, IGroupManager groupManager)
 {
     _userManager  = userManager;
     _routeManager = routeManager;
     _groupManager = groupManager;
 }
Exemple #22
0
 internal static async Task <string> RemoveGroupChannelNameAsync(this ConnectionUser connectionUser,
                                                                 IGroupManager grops, int channelId)
 {
     return(await connectionUser._removeGroupAsync(grops, CreateGroupChannelGroupName, channelId));
 }
 /// <summary>
 /// Initializes a new instance of <see cref="PersistentConnectionContext"/>.
 /// </summary>
 /// <param name="connection">The connection for the <see cref="PersistentConnectionContext"/>.</param>
 /// <param name="groupManager">The group manager for the <see cref="PersistentConnectionContext"/>.</param>
 public PersistentConnectionContext(IConnection connection, IGroupManager groupManager)
 {
     Connection = connection;
     GroupManager = groupManager;
 }
 private GameState(IHubContext context)
 {
     Clients = context.Clients;
     Groups  = context.Groups;
 }
Exemple #25
0
 public FileSystemHubTest(IEnvironment environment, ITracer tracer, HubCallerContext context,
     IGroupManager group, HubConnectionContext clients) : base(environment, tracer)
 {
     Context = context;
     Groups = group;
     Clients = clients;
 }
 public GroupController(KhatmaContext khatmaContext, IMapper Mapper, IGroupManager groupManager)
 {
     _KhatmaContext = khatmaContext;
     _Mapper        = Mapper;
     _groupManager  = groupManager;
 }
Exemple #27
0
 private Ticker(IHubConnectionContext<dynamic> clients, IGroupManager groups)
 {
     Clients = clients;
     Groups = groups;
 }
Exemple #28
0
 public GroupController(IGroupManager groupManager)
 {
     this._groupManager = groupManager;
 }
Exemple #29
0
 public SetModeratorCommand(IGroupManager groupManager)
 {
     this.groupManager = groupManager;
 }
Exemple #30
0
 public InviteMemberCommand(IGroupManager groupManager, IMapper mapper)
 {
     this.groupManager = groupManager;
     this.mapper       = mapper;
 }
Exemple #31
0
 public GroupManagerController(IGroupManager groupManager, IInstitutionManager institutionManager)
 {
     this._groupManager = groupManager;
     this._institutionManager = institutionManager;
 }
 public GroupController()
 {
     GroupManager = Site.GroupManager;
 }
Exemple #33
0
 public HubContext(dynamic clients, IGroupManager groupManager)
 {
     Clients = clients;
     Groups = groupManager;
 }
Exemple #34
0
 public MessageCommands(List <Translation> translations, IGuildManager guildManager, IGroupManager groupManager,
                        IConfiguration configuration, GuildInteractionService guildInteractionService) : base(translations, guildManager, groupManager, configuration)
 {
     _groupManager = groupManager;
 }