当前位置: 首页>>代码示例>>C#>>正文


C# IServer类代码示例

本文整理汇总了C#中IServer的典型用法代码示例。如果您正苦于以下问题:C# IServer类的具体用法?C# IServer怎么用?C# IServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IServer类属于命名空间,在下文中一共展示了IServer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConsoleOutputTask

		protected ConsoleOutputTask(IServer server, IEventAggregator events)
			: base(events)
		{
			this.server = server;
			Console = new BindableCollection<string>();
			server.CurrentDatabaseChanged += delegate { ClearConsole(); };
		}
开发者ID:nzdunic,项目名称:ravendb,代码行数:7,代码来源:ConsoleOutputTask.cs

示例2: UserQuitEventArgs

 public UserQuitEventArgs(IUser user, IChannel channel, IServer server, string reason = null)
 {
     this.User = user;
     this.Channel = channel;
     this.Server = server;
     this.Reason = reason;
 }
开发者ID:pjmagee,项目名称:NazureBot,代码行数:7,代码来源:UserQuitEventArgs.cs

示例3: Account

 public Account(string username, string passwordHash, ICountry country, IServer server)
 {
     Username = username;
     PasswordHash = passwordHash;
     Country = country;
     Server = server;
 }
开发者ID:ebeeb,项目名称:SfSdk,代码行数:7,代码来源:Account.cs

示例4: AddServer

 public void AddServer(IServer server)
 {
     TreeIter iter = Store.Append();
     //Store.SetValue(iter, 0, new Gdk.Pixbuf...)
     Store.SetValue(iter, 1, server.Name);
     Store.SetValue(iter, 2, server);
 }
开发者ID:vrosnet,项目名称:logopathy,代码行数:7,代码来源:ServerListView.cs

示例5: RemoveMethodFromNewClientEvent

 protected static void RemoveMethodFromNewClientEvent(IServer server, ClientConnectedEventHandler clientConnectedEventHandler)
 {
     lock (clientConnectedEventHandler)
     {
         server.NewClientEvent -= clientConnectedEventHandler;
     }            
 }
开发者ID:ionhristiniuc,项目名称:chatapp,代码行数:7,代码来源:ServerPeerConnection.cs

示例6: AddMethodToNewClientEvent

 protected static void AddMethodToNewClientEvent(IServer server, ClientConnectedEventHandler clientConnectedEventHandler)
 {
     lock (newClientEventMonitor)
     {
         server.NewClientEvent += clientConnectedEventHandler;
     }            
 }
开发者ID:ionhristiniuc,项目名称:chatapp,代码行数:7,代码来源:ServerPeerConnection.cs

示例7: Connector

 public Connector(IServer server, string ip, int port)
 {
     Connections = new List<IWebSocketConnection>();
     _server = server;
     _ip = ip;
     _port = port;
 }
开发者ID:jamie-tigereye,项目名称:DDPServer.Net,代码行数:7,代码来源:Connector.cs

示例8: PacketManager

		public PacketManager(TextWriter logger, IServer server)
		{
			Logger = logger;
			Server = server;

			_packetHandlers = new Dictionary<DataIdentifier, Func<EndPoint, ChatPacket, ChatPacket>>();
		}
开发者ID:treytomes,项目名称:ASCIIWorld2,代码行数:7,代码来源:PacketManager.cs

示例9: PadInt

 public PadInt(int txid, int uid, IServer server, int version)
 {
     _txid = txid;
     _uid = uid;
     _server = server;
     _version = version;
 }
开发者ID:rtfpessoa,项目名称:padi-dstm,代码行数:7,代码来源:PadInt.cs

示例10: BaseConnection

        /// <summary>
        /// Add an socket to "server"-Server-Instance and register it
        /// </summary>
        /// <param name="ep">Socket to register</param>
        /// <param name="server">Server-Instance</param>
        public BaseConnection(Socket client, IServer server)
        {
            if (client == null)
                throw new ArgumentNullException("client");

            if (server == null)
                throw new ArgumentNullException("server");

            //			this._encoding = Encoding.GetEncoding(28591);// iso_8859-1
            this.handler = client;
            this._server = server;
            /*
            int id = this.rnd.Next();
            while (server.HasID(id) || server.SeedID(id)) // new seed id
            {
                id = this.rnd.Next();
            }

            this._id = id;

            #if UNSTABLE
            SocketManager socketManager = ((BaseServer)this._server).SocketManager;
            socketManager.AddConnection(this);
            #else
            ThreadPool.QueueUserWorkItem(new WaitCallback(this.RecieveProc), null); // to/do: 25 Thread Limit!!!!
            #endif

            this.available = true;

            Console.WriteLine("new BaseConnection with id: {0}, is availbale", id);*/
            this.Initialize();
        }
开发者ID:BackupTheBerlios,项目名称:storm-ircd-svn,代码行数:37,代码来源:BaseConnection.cs

示例11: Use

        public void Use(IServer server, string commandName, string[] tokens)
        {
            if (tokens.Length < 1)
            {
                Help(server);
                return;
            }

            var toKick = server.GetClients();


            if (toKick.Any() && tokens[0].ToLower() != "all")
            {
                foreach (var client1 in toKick.Where(client1 => !client1.GetOwner().CanUseCommand("chraft.kick.exempt")))
                {
                    client1.Kick(tokens.Length > 1 ? tokens[1] : "Kicked");
                    server.GetLogger().Log(LogLevel.Info, "Kicked " + client1.GetOwner().Name);
                }
            }
            else
            {
                foreach (IClient t in toKick.Where(t => t.GetOwner().Name.ToLower() == tokens[0].ToLower()).Where(t => !t.GetOwner().CanUseCommand("chraft.kick.exempt")))
                {
                    t.Kick(tokens.Length > 1 ? tokens[1] : "Kicked");
                    server.GetLogger().Log(LogLevel.Info, "Kicked " + t.GetOwner().Name);
                }
            }
        }
开发者ID:TheaP,项目名称:c-raft,代码行数:28,代码来源:CmdKick.cs

示例12: Run

 public void Run(int port) {
   using (var mefContainer = SetupMefContainer()) {
     var server = mefContainer.GetExportedValue<IServer>();
     Instance = server; // For debugging only.
     server.Run(port);
   }
 }
开发者ID:kleopatra999,项目名称:vs-chromium,代码行数:7,代码来源:ServerStub.cs

示例13: GetModel

		private Model GetModel(IServer server)
		{
			RequiresNotNull(server);
			var r = server.PollCurrentStatus();
			var model = new Model(r);
			return model;
		}
开发者ID:jairov4,项目名称:Yorkfield,代码行数:7,代码来源:MainServerWebMonitor.cs

示例14: Start

		/// <summary>
		/// Starts the specified server.
		/// </summary>
		/// <param name="server">The server.</param>
		public void Start(IServer server)
		{
			RequiresNotNull(server);
			var instructions = new BuildInstructions(Guid.Empty, string.Empty, string.Empty);
			try
			{
				instructions = GetBuildInstructions(server);
				BuildProject(server, instructions);
				ExecuteNUnitTestRunner(server, instructions);
			}
			catch (FileNotFoundException e)
			{
				log.Log(LogSeverity.Error,  $"The file was not found: {e.FileName}");
				var status = new ClientInformation(Environment.MachineName, instructions.Session, BuildStatus.Failed,
					new TestResult[0]);
				server.UpdateClientStatus(status);
			}
			catch (Win32Exception e)
			{
				log.Log(LogSeverity.Error, $"Error launching the build process: {e.Message}");
				var status = new ClientInformation(Environment.MachineName, instructions.Session, BuildStatus.Failed,
					new TestResult[0]);
				server.UpdateClientStatus(status);
			}
			catch (ApplicationException e)
			{
				log.Log(LogSeverity.Error, $"Error building the project: {e.Message}");
				var status = new ClientInformation(Environment.MachineName, instructions.Session, BuildStatus.Failed,
					new TestResult[0]);
				server.UpdateClientStatus(status);
			}
		}
开发者ID:jairov4,项目名称:Yorkfield,代码行数:36,代码来源:MainClient.cs

示例15: SelectDatabaseViewModel

 public SelectDatabaseViewModel(IServer server, IEventAggregator events)
     : base(events)
 {
     DisplayName = "Home";
     Server = server;
     ShowCreateDatabaseForm = Visibility.Collapsed;
 }
开发者ID:nzdunic,项目名称:ravendb,代码行数:7,代码来源:SelectDatabaseViewModel.cs


注:本文中的IServer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。