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


C# ITerminal类代码示例

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


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

示例1: ZeroOrOne

 private static IEnumerable<IProduction> ZeroOrOne(INonTerminal identifier, ITerminal[] terminals)
 {
     // NonTerminal -> Terminal | <null>
     return new[]{
             new Production(identifier, terminals),
             new Production(identifier) };
 }
开发者ID:whitten,项目名称:Pliant,代码行数:7,代码来源:RegexParser.cs

示例2: Shell

 public Shell(ITerminal Term)
 {
     timer = timerReset;
     term = Term;
     allPrograms = new List<Program>();
     editMode = false;
 }
开发者ID:Evangielis,项目名称:TheAssembler,代码行数:7,代码来源:Shell.cs

示例3: SubscriptionToTerminalEvents

 public override void SubscriptionToTerminalEvents(ITerminal terminal)
 {
     terminal.OutgoingRequest += (sender, info) =>
     {
         Console.ForegroundColor = ConsoleColor.Yellow;
         Console.WriteLine(info.ToString());
         Console.ForegroundColor = ConsoleColor.Gray;
     };
     terminal.IncomingRequest += (sender, info) =>
     {
         Console.ForegroundColor = ConsoleColor.Yellow;
         Console.WriteLine(info.ToString());
         Console.ForegroundColor = ConsoleColor.Gray;
     };
     terminal.StateChanged += (sender, state) => { Console.WriteLine(sender.ToString() + " - " + state); };
     terminal.AnsweredTheCall += (sender, args) =>
     {
         Console.ForegroundColor = ConsoleColor.Blue;
         Console.WriteLine(sender.ToString() + " answered the call");
         Console.ForegroundColor = ConsoleColor.Gray;
     };
     terminal.DroppedTheCall += (sender, args) =>
     {
         Console.ForegroundColor = ConsoleColor.Blue;
             Console.WriteLine(sender.ToString() + " dropped the call");
         Console.ForegroundColor = ConsoleColor.Gray;
     };
 }
开发者ID:andrewtovkach,项目名称:EpamTraining,代码行数:28,代码来源:TestStation.cs

示例4: AddTerminal

        public void AddTerminal(ITerminal terminal)
        {
            if (terminal == null) throw new ArgumentNullException(nameof(terminal));

            RegisterTerminal(terminal);
            _terminals.Add(terminal);
        }
开发者ID:SergeyKononovich,项目名称:EpamTraining,代码行数:7,代码来源:Station.cs

示例5: DisplayTcpServerInfo

		private void DisplayTcpServerInfo(TcpServer server, ITerminal output)
		{
			this.DisplayListenerInfo(server, output);

			if(!server.IsListening)
				return;

			output.WriteLine();
			output.Write(TerminalColor.DarkMagenta, "ID\t");
			output.Write(TerminalColor.DarkMagenta, ResourceUtility.GetString("${LastReceivedTime}") + "\t\t");
			output.Write(TerminalColor.DarkMagenta, ResourceUtility.GetString("${LastSendTime}") + "\t\t");
			output.Write(TerminalColor.DarkMagenta, ResourceUtility.GetString("${LocalEndPoint}") + "\t\t");
			output.WriteLine(TerminalColor.DarkMagenta, ResourceUtility.GetString("${RemoteEndPoint}") + "\t");

			var channels = server.ChannelManager.GetActivedChannels();

			foreach(TcpServerChannel channel in channels)
			{
				if(channel == this.Channel)
					output.Write(TerminalColor.Magenta, "* ");

				output.WriteLine(
					"{0}\t{1:yyyy-MM-dd HH:mm:ss}\t{2:yyyy-MM-dd HH:mm:ss}\t{3}\t\t{4}",
					channel.ChannelId,
					channel.LastReceivedTime,
					channel.LastSendTime,
					channel.LocalEndPoint,
					channel.RemoteEndPoint);
			}

			output.WriteLine();
		}
开发者ID:Flagwind,项目名称:Zongsoft.Terminals,代码行数:32,代码来源:TcpServerStatusCommand.cs

示例6: Deployer

		public Deployer(ITerminal terminal)
		{
			if(terminal == null)
				throw new ArgumentNullException("terminal");

			_terminal = terminal;
		}
开发者ID:Flagwind,项目名称:Zongsoft.Utilities.Deployer,代码行数:7,代码来源:Deployer.cs

示例7: CommandBase

        protected CommandBase(
            ICommandProcessor ParentCommandProcessor,
            ITerminal  Terminal)
        {
            _CommandProcessor = ParentCommandProcessor;

            _Terminal = Terminal;
        }
开发者ID:adamedx,项目名称:shango,代码行数:8,代码来源:Command.cs

示例8: TerminalCommandExecutor

		public TerminalCommandExecutor(ITerminal terminal, ICommandLineParser parser)
		{
			if(terminal == null)
				throw new ArgumentNullException("terminal");

			_terminal = terminal;
			this.Parser = parser;
		}
开发者ID:Flagwind,项目名称:Zongsoft.CoreLibrary,代码行数:8,代码来源:TerminalCommandExecutor.cs

示例9: BlackJack

 /// <summary>
 /// Constructor for BlackJack game
 /// </summary>
 /// <param name="terminal"></param>
 public BlackJack(ITerminal terminal)
     : base(terminal)
 {
     _terminal = terminal;
     user = new Player(100);
     dealer = new Player(9999999);
     _cardGame = new CardGame(terminal);
 }
开发者ID:alex606,项目名称:cis501,代码行数:12,代码来源:BlackJack.cs

示例10: Initialize

 public override void Initialize(IHostContext hostContext)
 {
     base.Initialize(hostContext);
     Trace.Verbose("Creating _store");
     _store = hostContext.GetService<IConfigurationStore>();
     Trace.Verbose("store created");
     _term = hostContext.GetService<ITerminal>();
 }
开发者ID:tanvi-soni,项目名称:vsts-agent,代码行数:8,代码来源:ConfigurationManager.cs

示例11: WritePluginNode

		public static void WritePluginNode(ITerminal terminal, PluginTreeNode node, ObtainMode obtainMode, int maxDepth)
		{
			if(node == null)
				return;

			terminal.Write(TerminalColor.DarkYellow, "[{0}]", node.NodeType);
			terminal.WriteLine(node.FullPath);
			terminal.Write(TerminalColor.DarkYellow, "Plugin File: ");

			if(node.Plugin == null)
				terminal.WriteLine(TerminalColor.Red, "N/A");
			else
				terminal.WriteLine(node.Plugin.FilePath);

			terminal.Write(TerminalColor.DarkYellow, "Node Properties: ");
			terminal.WriteLine(node.Properties.Count);

			if(node.Properties.Count > 0)
			{
				terminal.WriteLine(TerminalColor.Gray, "{");

				foreach(PluginExtendedProperty property in node.Properties)
				{
					terminal.Write(TerminalColor.DarkYellow, "\t" + property.Name);
					terminal.Write(" = ");
					terminal.Write(property.RawValue);

					if(property.Value != null)
					{
						terminal.Write(TerminalColor.DarkGray, " [");
						terminal.Write(TerminalColor.Blue, property.Value.GetType().FullName);
						terminal.Write(TerminalColor.DarkGray, "]");
					}

					terminal.WriteLine();
				}

				terminal.WriteLine(TerminalColor.Gray, "}");
			}

			terminal.WriteLine(TerminalColor.DarkYellow, "Children: {0}", node.Children.Count);
			if(node.Children.Count > 0)
			{
				terminal.WriteLine();

				foreach(var child in node.Children)
				{
					terminal.WriteLine(child);
				}
			}

			object value = node.UnwrapValue(obtainMode, null);
			if(value != null)
			{
				terminal.WriteLine();
				Zongsoft.Runtime.Serialization.Serializer.Text.Serialize(terminal.OutputStream, value);
			}
		}
开发者ID:jonfee,项目名称:Zongsoft.Terminals.Plugins,代码行数:58,代码来源:Utility.cs

示例12: PayBill

 public bool PayBill(ITerminal terminal)
 {
     foreach (var c in this.CallHistory.Where(x => x.source.Number == terminal.Number)) {
       if (c.Paid == false) {
           c.Paid = true;
       }
       }
       return true;
 }
开发者ID:newLink01,项目名称:ForEPAM,代码行数:9,代码来源:BillingSystem.cs

示例13: Shell

 public Shell(ITerminal Term)
 {
     //timer = timerReset;
     term = Term;
     allPrograms = new List<Program>();
     editMode = false;
     programLog = new StringBuilder();
     sinceLastRun = TimeSpan.Zero;
 }
开发者ID:Evangielis,项目名称:TheAssembler,代码行数:9,代码来源:Shell.cs

示例14: RedirectedProcess

        public RedirectedProcess( ITerminal ClientTerminal, ICommandClient CommandClient )
        {
            _InputHandler = new InputHandler();

            _TerminalClient = ClientTerminal;

            _ProcessExit = new ManualResetEvent( false );

            _CommandClient = CommandClient;
        }
开发者ID:adamedx,项目名称:shango,代码行数:10,代码来源:RedirectedProcess.cs

示例15: ZeroOrMany

        private static IEnumerable<IProduction> ZeroOrMany(INonTerminal identifier, ITerminal[] terminals)
        {
            var recursiveProductionSymbols = new List<ISymbol>();
            recursiveProductionSymbols.Add(identifier);
            recursiveProductionSymbols.AddRange(terminals);

            // NonTerminal -> NonTerminal Terminal | <null>
            return new[]{
                new Production(identifier, recursiveProductionSymbols.ToArray()),
                new Production(identifier)};
        }
开发者ID:whitten,项目名称:Pliant,代码行数:11,代码来源:RegexParser.cs


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