本文整理汇总了C#中ITerminal类的典型用法代码示例。如果您正苦于以下问题:C# ITerminal类的具体用法?C# ITerminal怎么用?C# ITerminal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITerminal类属于命名空间,在下文中一共展示了ITerminal类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OperatingContext
public OperatingContext(ITerminal Terminal, RegexSurfer Surfer, UsbConnectionFactory Usb, IProgressControllerFactory ProgressControllerFactory,
int BlockSize)
{
this.BlockSize = BlockSize;
this.ProgressControllerFactory = ProgressControllerFactory;
this.Usb = Usb;
this.Terminal = Terminal;
this.Surfer = Surfer;
State = ProgrammingContextState.Unknown;
NandSize = ulong.MaxValue;
}
开发者ID:NpoSaut,项目名称:netFirmwaring,代码行数:11,代码来源:OperatingContext.cs
示例17: InitTerminal
public void InitTerminal(ITerminal terminal)
{
switch (terminal.Type)
{
case TerminalType.AlorTrade:
InitAlorTerminal(terminal as AlorTerminal, -1);
break;
case TerminalType.Oec:
InitOecTerminal(terminal as OecTerminal);
break;
}
}
开发者ID:GodVVin,项目名称:trade,代码行数:12,代码来源:TerminalsManager.cs
示例18: Parse
public string Parse(
ITerminal Terminal,
string Command,
ref string[] Arguments)
{
string commandName = null;
ParsedCommandLine Parsed = new ParsedCommandLine( Command );
bool bParsed = Parsed.Parse();
if ( ! bParsed )
{
Terminal.WriteTo( new StringBuilder( "Failed to parse\n" ), ConsoleProcessRedirection.OutputType.StandardError );
}
else
{
Parsed.Print( Terminal );
}
Command = Command.TrimStart(' ','\t');
Command = Command.TrimEnd(' ','\t');
if ( Command.Length > 0 )
{
Arguments = Command.Split( new char[] {' ','\t'} );
if ( Arguments[0].ToLower().StartsWith("cd\\") )
{
string[] NewArguments = new string[ Arguments.Length + 1 ];
NewArguments[0] = Arguments[0].Substring( 0, 2 );
NewArguments[1] = Arguments[0].Substring( 2, Arguments[0].Length - 2 );
if ( Arguments.Length > 1 )
{
NewArguments[1] += Arguments[1];
for ( int Argument = 1; Argument < Arguments.Length; Argument++ )
{
NewArguments[ Argument + 1 ] = Arguments[ Argument ];
}
}
Arguments = NewArguments;
}
commandName = Arguments[0].ToLower();
}
return commandName;
}
开发者ID:adamedx,项目名称:shango,代码行数:53,代码来源:DefaultCommandParser.cs
示例19: RegisterEventsForTerminal
public void RegisterEventsForTerminal(ITerminal terminal)
{
terminal.Plugging += (sender, args) => { this.State = PortState.Free; };
terminal.UnPlugging += (sender, args) => { this.State = PortState.Off; };
terminal.OutConnection += (sender, request) =>
{
if (request.Code == Request.OutcomingCall && this.State == PortState.Free)
{
this.State = PortState.Busy;
}
};
}
开发者ID:IIITanbI,项目名称:EpamProjects,代码行数:12,代码来源:Port.cs
示例20: Prompt
public Prompt(
ITerminal Terminal,
string DefaultPrompt
)
{
_Terminal = Terminal;
if ( null != DefaultPrompt )
{
_DefaultPrompt = DefaultPrompt;
}
}
开发者ID:adamedx,项目名称:shango,代码行数:12,代码来源:Prompt.cs
注:本文中的ITerminal类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论