Пример #1
0
 public FormHome()
 {
     InitializeComponent();
     appTaskManager = new UserClientDecorator(new AppTaskManager());
     PopulateFilterComboBox();
     AgendaToDisplay = appTaskManager.GetAgendaController().GetAgenda();
 }
Пример #2
0
 private GitLabClient(string hostUrl, string apiToken)
 {
     _api = new API(hostUrl, apiToken);
     Users = new UserClient(_api);
     Projects = new ProjectClient(_api);
     Issues = new IssueClient(_api);
 }
Пример #3
0
 public UnitOfWork(ApiContext context)
 {
     this.context = context;
     User         = new UserRepo(context);
     Client       = new ClientRepo(context);
     UserClient   = new UserClientRepo(context);
 }
Пример #4
0
 public UsersController(IDynamicMiddleUrl dynamicMiddleUrl, IUserClient userClient, IHttpClientFactory httpClientFactory, ILogger <UsersController> logger)
 {
     _dynamicMiddleUrl = dynamicMiddleUrl;
     _userClient       = userClient;
     _httpClient       = httpClientFactory.CreateClient();
     _logger           = logger;
 }
Пример #5
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_httpServer = m_scene.Simian.GetAppModule <IHttpServer>();
            if (m_httpServer == null)
            {
                m_log.Warn("RezAvatar requires an IHttpServer");
                return;
            }

            m_userClient = m_scene.Simian.GetAppModule <IUserClient>();
            if (m_userClient == null)
            {
                m_log.Warn("RezAvatar requires an IUserClient");
                return;
            }

            m_lludp = scene.GetSceneModule <LLUDP>();
            if (m_lludp == null)
            {
                m_log.Error("Can't create the RegionDomain service without an LLUDP server");
                return;
            }

            string urlFriendlySceneName = WebUtil.UrlEncode(m_scene.Name);
            string regionPath           = "/regions/" + urlFriendlySceneName;

            m_httpServer.AddHandler("POST", null, regionPath + "/rez_avatar/request", true, true, RezAvatarRequestHandler);
            m_scene.AddPublicCapability("rez_avatar/request", m_httpServer.HttpAddress.Combine(regionPath + "/rez_avatar/request"));
        }
Пример #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="userClient"></param>
 /// <param name="dynamicMiddleUrl"></param>
 /// <param name="httpClientFactory"></param>
 public UserController(IUserClient userClient, IDynamicMiddleUrl dynamicMiddleUrl
                       , IHttpClientFactory httpClientFactory)
 {
     this.userClient       = userClient;
     this.dynamicMiddleUrl = dynamicMiddleUrl;
     this.httpClient       = httpClientFactory.CreateClient();
 }
Пример #7
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_httpServer = m_scene.Simian.GetAppModule<IHttpServer>();
            if (m_httpServer == null)
            {
                m_log.Warn("RezAvatar requires an IHttpServer");
                return;
            }

            m_userClient = m_scene.Simian.GetAppModule<IUserClient>();
            if (m_userClient == null)
            {
                m_log.Warn("RezAvatar requires an IUserClient");
                return;
            }

            m_lludp = scene.GetSceneModule<LLUDP>();
            if (m_lludp == null)
            {
                m_log.Error("Can't create the RegionDomain service without an LLUDP server");
                return;
            }

            string urlFriendlySceneName = WebUtil.UrlEncode(m_scene.Name);
            string regionPath = "/regions/" + urlFriendlySceneName;

            m_httpServer.AddHandler("POST", null, regionPath + "/rez_avatar/request", true, true, RezAvatarRequestHandler);
            m_scene.AddPublicCapability("rez_avatar/request", m_httpServer.HttpAddress.Combine(regionPath + "/rez_avatar/request"));
        }
Пример #8
0
        public bool LoginSetUser(IUserClient user, bool dcIfLoggedIn)
        {
            if (this.User != user && BaseServer.Users.Contains(user))
            {
                if (dcIfLoggedIn)
                {
                    var onlineInstances = BaseServer.Clients.Where(m => m.User == user).ToList();
                    foreach (var online in onlineInstances)
                    {
                        online.Dispose();
                    }
                }
                else
                {
                    LogLine("Login Rejected (online)");
                    return(false);
                }
            }

            User = user;

            if (User != null && OnLogin != null)
            {
                OnLogin(this, new OnLoginLogoutEventArgs(this));
            }

            return(User != null);
        }
Пример #9
0
 public CustomerService(DatabaseContext context, IMapper mapper, IAddCustomerRequestValidator validator, IUserClient userClient)
 {
     _context    = context ?? throw new ArgumentNullException(nameof(context));
     _mapper     = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _validator  = validator ?? throw new ArgumentNullException(nameof(validator));
     _userClient = userClient ?? throw new ArgumentNullException(nameof(userClient));
 }
Пример #10
0
        protected UserClientWrapperBaseTest()
        {
            Client = A.Fake <IUserClient>();
            Mapper = A.Fake <IMapper>();
            var logger = A.Fake <ILogger <UserClientWrapper> >();

            ClientWrapper = new UserClientWrapper(Client, Mapper, logger, AccessToken);
        }
Пример #11
0
 public void Finish()
 {
     if (client != null)
     {
         client.Finish();
         client = null;
     }
 }
Пример #12
0
 public PurchasesClient(IUserClient userClient,
                        IHalClient halClient,
                        ILinkFactory linkFactory)
 {
     _userClient  = userClient;
     _halClient   = halClient;
     _linkFactory = linkFactory;
 }
Пример #13
0
 private GitLabClient(string hostUrl, string apiToken)
 {
     _api     = new API(hostUrl, apiToken);
     Users    = new UserClient(_api);
     Projects = new ProjectClient(_api);
     Issues   = new IssueClient(_api);
     Groups   = new NamespaceClient(_api);
 }
Пример #14
0
 public MenuClientGroup(IMenuClient menuClient, ILookUpValuesClient lookUpValuesClient, IUserClient userClient, IUserMenuClient userMenuClient, ExtendSearchGroup extendSearchGroup)
 {
     _menuClient         = menuClient;
     _lookUpValuesClient = lookUpValuesClient;
     _userClient         = userClient;
     _userMenuClient     = userMenuClient;
     _extendSearchGroup  = extendSearchGroup;
 }
Пример #15
0
 GitLabClient(string hostUrl, string apiToken)
 {
     _api = new API(hostUrl, apiToken);
     Users = new UserClient(_api);
     Projects = new ProjectClient(_api);
     Issues = new IssueClient(_api);
     Groups = new NamespaceClient(_api);
 }
Пример #16
0
 private GitLabClient(string hostUrl, string apiToken, IHttpRequestorFactory httpRequestorFactory)
 {
     _api     = new API(hostUrl, apiToken, httpRequestorFactory);
     Users    = new UserClient(_api);
     Projects = new ProjectClient(_api);
     Issues   = new IssueClient(_api);
     Groups   = new NamespaceClient(_api);
 }
Пример #17
0
 public PaymentMethodsClient(IUserClient userClient,
                             IHalClient halClient,
                             ILinkFactory linkFactory)
 {
     _userClient  = userClient;
     _halClient   = halClient;
     _linkFactory = linkFactory;
 }
        public MainWindow()
        {
            var clientConfig = ConfigurationManager.GetSection("GorestClient") as ClientConfig;

            Client = new UserClient(clientConfig);

            InitializeComponent();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SessionsServerRepository"/> class.
 /// </summary>
 public SessionsServerRepository(
     IHttpClientFactory httpClientFactory,
     IUserClient userClient,
     IHttpResponseHandler httpResponseHandler)
 {
     _httpClientFactory   = httpClientFactory;
     _userClient          = userClient;
     _httpResponseHandler = httpResponseHandler;
 }
Пример #20
0
 public UserController(IUserClient userClient,
                       IDynamicMiddleUrl dynamicMiddleUrl,
                       IHttpClientFactory httpClientFactory)
 {
     Console.WriteLine("UserController Constructor");
     _userClient       = userClient;
     _dynamicMiddleUrl = dynamicMiddleUrl;
     _httpClient       = httpClientFactory.CreateClient();
 }
Пример #21
0
 private GitLabClient(string hostUrl, string apiToken, string accessToken)
 {
     _api = new API(hostUrl, apiToken, accessToken);
     Users = new UserClient(_api);
     Projects = new ProjectClient(_api);
     Issues = new IssueClient(_api);
     Groups = new NamespaceClient(_api);
     Labels = new LabelClient(_api);
 }
        public static async Task Main(string[] args)
        {
            DependencyFactory.Instance.RegisterDependencies();
            IUserClient client = DependencyFactory.Instance.Resolve <IUserClient>();

            var result = await client.GetByEmailAsync("*****@*****.**");

            Console.WriteLine(result?.Model?.User?.UserId);
        }
Пример #23
0
 public UserController(IUserClient _userClient, IUserMenuClient _userMenuClient, IMenuClient _menuClient, IUserGroup _userGroup, IMenuFunctionClient menuFunctionClient, IUserFunctionClient userFunctionClient) : base(_userClient)
 {
     userClient          = _userClient;
     this.userMenuClient = _userMenuClient;
     this.menuClient     = _menuClient;
     this.userGroup      = _userGroup;
     _menuFunctionClient = menuFunctionClient;
     _userFunctionClient = userFunctionClient;
 }
Пример #24
0
 GitLabClient(string hostUrl, string apiToken, ApiVersion apiVersion)
 {
     api             = new Api(hostUrl, apiToken);
     api._ApiVersion = apiVersion;
     Users           = new UserClient(api);
     Projects        = new ProjectClient(api);
     Issues          = new IssueClient(api);
     Groups          = new NamespaceClient(api);
 }
Пример #25
0
 public WebhooksClient(IUserClient userClient,
                       IHalClient halClient,
                       ILinkFactory linkFactory)
 {
     _userClient   = userClient;
     _halClient    = halClient;
     _linkFactory  = linkFactory;
     _linkResolver = new LinkResolver();
 }
Пример #26
0
 public TokenController(
     JWTTokenOptions tokenOptions,
     IUserClient _userClient,
     IUserFunctionClient _userFunctionClient)
 {
     _tokenOptions      = tokenOptions;
     userClient         = _userClient;
     userFunctionClient = _userFunctionClient;
 }
 public UserApplicationService(IAccountLocationClient accountLocationClient, IMapper mapper, INetworkApplicationService networkApplicationService, IAccountApplicationService accountApplicationService, IUserClient userClient, IEmailApplicationService emailApplicationService, IPaymentHistoryApplicationService paymentHistoryApplicationService)
 {
     _userClient = userClient;
     _emailApplicationService          = emailApplicationService;
     _paymentHistoryApplicationService = paymentHistoryApplicationService;
     _accountApplicationService        = accountApplicationService;
     _networkApplicationService        = networkApplicationService;
     _mapper = mapper;
     _accountLocationClient = accountLocationClient;
 }
Пример #28
0
 public UserClientWrapper(
     IUserClient client,
     IMapper mapper,
     ILogger <UserClientWrapper> logger,
     AccessToken accessToken)
 {
     _client      = client ?? throw new ArgumentNullException(nameof(client));
     _mapper      = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _logger      = logger ?? throw new ArgumentNullException(nameof(logger));
     _accessToken = accessToken?.Value ?? throw new ArgumentNullException(nameof(accessToken));
 }
Пример #29
0
        public void Logout()
        {
            LogLine("Logout");

            if (OnLogout != null)
            {
                OnLogout(this, new OnLoginLogoutEventArgs(this));
            }

            User = null;
        }
Пример #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SampleService"/> class.
 /// </summary>
 /// <param name="sdkClientSettings">Instance of the <see cref="_sdkClientSettings"/>.</param>
 /// <param name="systemClient">Instance of the <see cref="ISystemClient"/> interface.</param>
 /// <param name="userClient">Instance of the <see cref="IUserClient"/> interface.</param>
 /// <param name="userViewsClient">Instance of the <see cref="IUserViewsClient"/> interface.</param>
 public SampleService(
     SdkClientSettings sdkClientSettings,
     ISystemClient systemClient,
     IUserClient userClient,
     IUserViewsClient userViewsClient)
 {
     _sdkClientSettings = sdkClientSettings;
     _systemClient      = systemClient;
     _userClient        = userClient;
     _userViewsClient   = userViewsClient;
 }
Пример #31
0
        public RemoteClient(IUserClient localUser, System.Net.IPAddress IP, int port)
            : base(localUser)
        {
            this.HostIP = IP;
            this.Port   = port;
            Handler     = new ClientPacketHandler();

            Reader.OnReadData       += Handler.OnRead;
            Reader.OnDisconnect     += Reader_OnDisconnect;
            Reader.OnBufferOverflow += Reader_OnBufferOverflow;
        }
Пример #32
0
        public RemoteClient(IUserClient localUser, System.Net.IPAddress IP, int port)
            : base(localUser)
        {
            this.HostIP = IP;
            this.Port = port;
            Handler = new ClientPacketHandler();

            Reader.OnReadData += Handler.OnRead;
            Reader.OnDisconnect += Reader_OnDisconnect;
            Reader.OnBufferOverflow += Reader_OnBufferOverflow;
        }
Пример #33
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_parcels = m_scene.GetSceneModule <IParcels>();

            m_userClient      = m_scene.Simian.GetAppModule <IUserClient>();
            m_inventoryClient = m_scene.Simian.GetAppModule <IInventoryClient>();
            m_groupsClient    = m_scene.Simian.GetAppModule <IGroupsClient>();
            m_estateClient    = m_scene.Simian.GetAppModule <IEstateClient>();
        }
Пример #34
0
        public GivenAnUserClientInstance()
        {
            IApplicationContext  applicationContext  = new ApplicationContext();
            IConfigurationRoot   configurationRoot   = ConfigurationRootFactory.Create(applicationContext);
            IConfigurationGetter configurationGetter = new ConfigurationGetter(configurationRoot);

            var projectContextOptions = configurationGetter.GetOptions <ProjectContextOptions>();
            var clientOptions         = configurationGetter.GetOptions <CsomClientOptions>();

            var projectContext = ProjectContextFactory.Build(projectContextOptions);

            _client = new UserClient(projectContext, clientOptions);
        }
        public EditEmployeeWindow(IUserClient client, User user)
        {
            InitializeComponent();

            User             = user;
            Client           = client;
            this.DataContext = this;

            GenderCombobox.ItemsSource   = Enum.GetValues(typeof(Gender)).Cast <Gender>();
            GenderCombobox.SelectedIndex = 0;
            StatusCombobox.ItemsSource   = Enum.GetValues(typeof(UserActivityStatus)).Cast <UserActivityStatus>();
            StatusCombobox.SelectedIndex = 0;

            InitValues();
        }
Пример #36
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_userClient = m_scene.Simian.GetAppModule<IUserClient>();

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                m_udp.AddPacketHandler(PacketType.AgentDataUpdateRequest, AgentDataUpdateRequestHandler);
                m_udp.AddPacketHandler(PacketType.UUIDNameRequest, UUIDNameRequestHandler);
                m_udp.AddPacketHandler(PacketType.UUIDGroupNameRequest, UUIDGroupNameRequestHandler);
                m_udp.AddPacketHandler(PacketType.AvatarPropertiesRequest, AvatarPropertiesRequestHandler);
                m_udp.AddPacketHandler(PacketType.AvatarPropertiesUpdate, AvatarPropertiesUpdateHandler);
                m_udp.AddPacketHandler(PacketType.AvatarInterestsUpdate, AvatarInterestsUpdateHandler);
            }
        }
        public bool Start(Simian simian)
        {
            m_simian = simian;
            m_userClient = m_simian.GetAppModule<IUserClient>();

            IConfigSource source = simian.Config;
            IConfig config = source.Configs["SimianGrid"];
            if (config != null)
                m_serverUrl = config.GetString("InventoryService", null);

            if (String.IsNullOrEmpty(m_serverUrl))
            {
                m_log.Error("[SimianGrid] config section is missing the InventoryService URL");
                return false;
            }

            return true;
        }
Пример #38
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_httpServer = m_scene.Simian.GetAppModule<IHttpServer>();
            if (m_httpServer == null)
            {
                m_log.Warn("SeedCapability requires an IHttpServer");
                return;
            }

            m_userClient = m_scene.Simian.GetAppModule<IUserClient>();
            if (m_userClient == null)
            {
                m_log.Warn("SeedCapability requires an IUserClient");
                return;
            }

            m_scene.Capabilities.AddProtectedResource(m_scene.ID, "region_seed_capability", SeedCapabilityHandler);
        }
Пример #39
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_userClient = m_scene.Simian.GetAppModule<IUserClient>();
            m_inventoryClient = m_scene.Simian.GetAppModule<IInventoryClient>();

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp != null)
            {
                m_udp.AddPacketHandler(PacketType.AgentSetAppearance, AgentSetAppearanceHandler);
                m_udp.AddPacketHandler(PacketType.AgentWearablesRequest, AgentWearablesRequestHandler);
                m_udp.AddPacketHandler(PacketType.AgentIsNowWearing, AgentIsNowWearingHandler);
                m_udp.AddPacketHandler(PacketType.AgentCachedTexture, AgentCachedTextureHandler);

                m_scene.AddInterestListHandler(AVATAR_APPEARANCE, new InterestListEventHandler
                    { PriorityCallback = AvatarAppearancePrioritizer, SendCallback = SendAvatarAppearancePackets });

                m_scene.OnPresenceAdd += PresenceAddHandler;
            }
        }
Пример #40
0
        public bool Start(Simian simian)
        {
            m_simian = simian;
            m_userClient = m_simian.GetAppModule<IUserClient>();

            // Library user and inventory creation
            string libraryOwnerName = "Library Owner";
            IConfig config = simian.Config.Configs["StandaloneInventoryClient"];
            if (config != null)
            {
                libraryOwnerName = config.GetString("LibraryOwnerName", "Library Owner");
            }
            CreateLibrary(libraryOwnerName);

            // Deserialize inventories from disk
            m_fileDataStore = m_simian.GetAppModule<FileDataStore>();
            if (m_fileDataStore != null)
            {
                IList<SerializedData> inventories = m_fileDataStore.Deserialize(UUID.Zero, "Inventory");
                for (int i = 0; i < inventories.Count; i++)
                {
                    string name = inventories[i].Name;

                    UUID ownerID;
                    if (UUID.TryParse(name, out ownerID))
                    {
                        OSDMap map = null;
                        try { map = OSDParser.Deserialize(inventories[i].Data) as OSDMap; }
                        catch (Exception) { }

                        if (map != null)
                            DeserializeInventory(ownerID, map);
                        else
                            m_log.Warn("Failed to deserialize inventory file " + name);
                    }
                }
            }

            return true;
        }
Пример #41
0
 public LocalClient(IUserClient localUser)
     : base(localUser)
 {
     Notifier = new LocalNotifier();
 }
Пример #42
0
 public RemoteTCPClient(IUserClient localUser, System.Net.IPAddress IP, int port)
     : base(localUser, IP, port)
 {
 }
Пример #43
0
 public UsersTests()
 {
     _users = Config.Connect().Users;
 }
 public SessionsController(IUserClient client, ISessionProvider sessionProvider)
 {
     _client = client;
     _sessionProvider = sessionProvider;
 }
Пример #45
0
        public void Start(IScene scene)
        {
            m_scene = scene;

            m_parcels = m_scene.GetSceneModule<IParcels>();

            m_userClient = m_scene.Simian.GetAppModule<IUserClient>();
            m_inventoryClient = m_scene.Simian.GetAppModule<IInventoryClient>();
            m_groupsClient = m_scene.Simian.GetAppModule<IGroupsClient>();
            m_estateClient = m_scene.Simian.GetAppModule<IEstateClient>();
        }
Пример #46
0
        public bool Start(Simian simian)
        {
            m_simian = simian;

            #region Get Module References

            m_httpServer = simian.GetAppModule<IHttpServer>();
            if (m_httpServer == null)
            {
                m_log.Error("Can't create the LindenLogin service without an HTTP server");
                return false;
            }

            m_userClient = simian.GetAppModule<IUserClient>();
            if (m_userClient == null)
            {
                m_log.Error("Can't create the LindenLogin service without a user client");
                return false;
            }

            m_gridClient = simian.GetAppModule<IGridClient>();
            if (m_gridClient == null)
            {
                m_log.Error("Can't create the LindenLogin service without a grid client");
                return false;
            }

            m_inventoryClient = simian.GetAppModule<IInventoryClient>();

            #endregion Get Module References

            m_httpServer.AddXmlRpcHandler("/", true, "login_to_simulator", LoginHandler);
            m_log.Info("LindenLogin handler initialized");

            return true;
        }
 public UsersController(IUserClient userClient)
 {
     _userClient = userClient;
 }
Пример #48
0
 public bool LoginSetUser(IUserClient user, bool dcIfLoggedIn)
 {
     throw new NotImplementedException();
 }
Пример #49
0
        public void Start(IScene scene)
        {
            m_scene = scene;
            m_lastCameraPositions = new Dictionary<uint, Vector3>();
            m_borderCrossThrottles = new Dictionary<UUID, int>();

            // Create an AABB for this scene that extends beyond the borders by BORDER_CROSS_THRESHOLD
            // that is used to check for border crossings
            m_borderCrossAABB = new AABB(Vector3.Zero, new Vector3(scene.MaxPosition - scene.MinPosition));
            m_borderCrossAABB.Min -= new Vector3(BORDER_CROSS_THRESHOLD, BORDER_CROSS_THRESHOLD, BORDER_CROSS_THRESHOLD);
            m_borderCrossAABB.Max += new Vector3(BORDER_CROSS_THRESHOLD, BORDER_CROSS_THRESHOLD, BORDER_CROSS_THRESHOLD);

            m_scheduler = m_scene.Simian.GetAppModule<IScheduler>();
            if (m_scheduler == null)
            {
                m_log.Warn("Neighbors requires an IScheduler");
                return;
            }

            m_httpServer = m_scene.Simian.GetAppModule<IHttpServer>();
            if (m_httpServer == null)
            {
                m_log.Warn("Neighbors requires an IHttpServer");
                return;
            }

            m_udp = m_scene.GetSceneModule<LLUDP>();
            if (m_udp == null)
            {
                m_log.Warn("Neighbors requires an LLUDP");
                return;
            }

            m_userClient = m_scene.Simian.GetAppModule<IUserClient>();
            if (m_userClient == null)
            {
                m_log.Warn("Neighbors requires an IUserClient");
                return;
            }

            m_gridClient = scene.Simian.GetAppModule<IGridClient>();

            // Add neighbor messaging handlers
            string urlFriendlySceneName = WebUtil.UrlEncode(scene.Name);
            string regionPath = "/regions/" + urlFriendlySceneName;
            m_httpServer.AddHandler("POST", null, regionPath + "/region/online", true, true, RegionOnlineHandler);
            m_httpServer.AddHandler("POST", null, regionPath + "/region/offline", true, true, RegionOfflineHandler);
            m_httpServer.AddHandler("POST", null, regionPath + "/child_avatar/update", true, true, ChildAvatarUpdateHandler);

            m_scene.AddPublicCapability("region/online", m_httpServer.HttpAddress.Combine(regionPath + "/region/online"));
            m_scene.AddPublicCapability("region/offline", m_httpServer.HttpAddress.Combine(regionPath + "/region/offline"));
            m_scene.AddPublicCapability("child_avatar/update", m_httpServer.HttpAddress.Combine(regionPath + "/child_avatar/update"));

            // Track local scenes going up and down
            m_sceneFactory = scene.Simian.GetAppModule<ISceneFactory>();
            if (m_sceneFactory != null)
            {
                m_sceneFactory.OnSceneStart += SceneStartHandler;
                m_sceneFactory.OnSceneStop += SceneStopHandler;
            }

            m_scene.OnPresenceAdd += PresenceAddHandler;
            m_scene.OnEntityAddOrUpdate += EntityAddOrUpdateHandler;

            m_childUpdates = new ThrottledQueue<uint, IScenePresence>(5.0f, 200, true, SendChildUpdate);
            m_childUpdates.Start();
        }
Пример #50
0
 public UserService(IUserClient userClient)
 {
     this.client = userClient;
 }
Пример #51
0
        public bool LoginSetUser(IUserClient user, bool dcIfLoggedIn)
        {
            if (this.User != user && BaseServer.Users.Contains(user))
            {
                if (dcIfLoggedIn)
                {
                    var onlineInstances = BaseServer.Clients.Where(m => m.User == user).ToList();
                    foreach (var online in onlineInstances)
                        online.Dispose();
                }
                else
                {
                    LogLine("Login Rejected (online)");
                    return false;
                }
            }

            User = user;

            if (User != null && OnLogin != null)
                OnLogin(this, new OnLoginLogoutEventArgs(this));

            return User != null;
        }
Пример #52
0
 public BaseClient(IUserClient localUser)
 {
     this._LocalUser = localUser;
 }
Пример #53
0
 public RemoteUDPClient(IUserClient localUser, IPAddress IP, int port)
     : base(localUser, IP, port)
 {
 }
Пример #54
0
 public void OnUserLogout(IUserClient client)
 {
     telNetState.SendInfoLine("  {0} logout.", client.Nickname);
 }