本文整理汇总了C#中FlowControl类的典型用法代码示例。如果您正苦于以下问题:C# FlowControl类的具体用法?C# FlowControl怎么用?C# FlowControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FlowControl类属于命名空间,在下文中一共展示了FlowControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
private void Awake()
{
obstacleControl = GetComponent<ObstacleQueueControl>();
scoreControl = GetComponent<ScoreControl>();
timeControl = GetComponent<TimeControl>();
flowControl = GetComponent<FlowControl>();
deerLeft = GameObject.Find("DeerLeft");
deerRight = GameObject.Find("DeerRight");
}
示例2: SerialSettings
/// <summary>
/// Constructor
/// </summary>
/// <param name="port">port name, i.e. COM1</param>
/// <param name="baud">Baud rate for the port. Allowed values depend on the specific port</param>
/// <param name="dataBits">Number of data bits. Typically 8.</param>
/// <param name="stopBits"> Stop bits, typically 1</param>
/// <param name="parity"> Parity, typically none</param>
/// <param name="flowControl">Flow control, typically none</param>
public SerialSettings(String port, int baud, int dataBits, int stopBits, Parity parity, FlowControl flowControl)
{
this.port = port;
this.baud = baud;
this.dataBits = dataBits;
this.stopBits = stopBits;
this.parity = parity;
this.flowControl = flowControl;
}
示例3: OpCode
internal OpCode(string name, Code code, OperandType operandType, FlowControl flowControl, OpCodeType opCodeType, StackBehaviour push, StackBehaviour pop) {
this.Name = name;
this.Code = code;
this.OperandType = operandType;
this.FlowControl = flowControl;
this.OpCodeType = opCodeType;
this.StackBehaviourPush = push;
this.StackBehaviourPop = pop;
if (((ushort)code >> 8) == 0)
OpCodes.OneByteOpCodes[(byte)code] = this;
else if (((ushort)code >> 8) == 0xFE)
OpCodes.TwoByteOpCodes[(byte)code] = this;
}
示例4: OpCode
internal OpCode(int x, int y)
{
m_op1 = (byte)((x >> 0) & 0xff);
m_op2 = (byte)((x >> 8) & 0xff);
m_code = (Code)((x >> 16) & 0xff);
m_flowControl = (FlowControl)((x >> 24) & 0xff);
m_size = 0;
m_name = "";
m_opCodeType = (OpCodeType)((y >> 0) & 0xff);
m_operandType = (OperandType)((y >> 8) & 0xff);
m_stackBehaviourPop = (StackBehaviour)((y >> 16) & 0xff);
m_stackBehaviourPush = (StackBehaviour)((y >> 24) & 0xff);
}
示例5: OpCode
internal OpCode(string name, byte op1, byte op2, int size, FlowControl flowControl,
OpCodeType opCodeType, OperandType operandType,
StackBehaviour pop, StackBehaviour push)
{
m_name = name;
m_op1 = op1;
m_op2 = op2;
m_size = size;
m_flowControl = flowControl;
m_opCodeType = opCodeType;
m_operandType = operandType;
m_stackBehaviourPop = pop;
m_stackBehaviourPush = push;
}
示例6: OpCode
internal OpCode(String stringname, StackBehaviour pop, StackBehaviour push, OperandType operand, OpCodeType type, int size, byte s1, byte s2, FlowControl ctrl, bool endsjmpblk, int stack)
{
m_stringname = stringname;
m_pop = pop;
m_push = push;
m_operand = operand;
m_type = type;
m_size = size;
m_s1 = s1;
m_s2 = s2;
m_ctrl = ctrl;
m_endsUncondJmpBlk = endsjmpblk;
m_stackChange = stack;
}
示例7: OpCode
// Construct a new opcode.
internal OpCode(String name, int value, FlowControl flowControl,
OpCodeType opcodeType, OperandType operandType,
StackBehaviour stackPop, StackBehaviour stackPush)
{
this.name = name;
this.value = (short)value;
this.flowControl = (byte)flowControl;
this.opcodeType = (byte)opcodeType;
this.operandType = (byte)operandType;
if(value < 0x0100)
{
this.size = (byte)1;
}
else
{
this.size = (byte)2;
}
this.stackPop = (byte)stackPop;
this.stackPush = (byte)stackPush;
}
示例8: InitEvents
public void InitEvents ()
{
fc = FlowControl.Instance;
lc = LevelControl.Instance;
sc = ScoreControl.Instance;
uic = UIControl.Instance;
dc = DataControl.Instance;
shootC = GameObject.Find ("Player").GetComponent<ShootingController> ();
lc.BallsChanged += OnBallsChanged;
lc.LevelChanged += OnLevelChanged;
lc.TargetsChanged += OnTargetsChanged;
sc.ScoreChanged += OnScoreChanged;
shootC.InitPowerSlider += OnInitPowerSlider;
shootC.UpdatePowerSlider += OnUpdatePowerSlider;
string levelKind = dc.GetLevel (fc.Level).Kind;
if (levelKind.Equals ("T"))
GameObject.Find ("Player").GetComponent<MoveOnTrails> ().TrailsEndReached += OnTrailsEndReached;
}
示例9: OpCode
internal OpCode(string name, byte op1, byte op2, int size,
Code code, FlowControl flowControl,
OpCodeType opCodeType, OperandType operandType,
StackBehaviour pop, StackBehaviour push)
{
m_name = name;
m_op1 = op1;
m_op2 = op2;
m_size = size;
m_code = code;
m_flowControl = flowControl;
m_opCodeType = opCodeType;
m_operandType = operandType;
m_stackBehaviourPop = pop;
m_stackBehaviourPush = push;
if (op1 == 0xff)
OpCodes.OneByteOpCode [op2] = this;
else
OpCodes.TwoBytesOpCode [op2] = this;
}
示例10: CompareOpCode
//verify the opcode fields
//if not equal,retun the field name which contains error.
private CompareResult CompareOpCode(
OpCode opcode,
String stringname,
StackBehaviour pop,
StackBehaviour push,
OperandType operand,
OpCodeType type,
int size,
byte s1,
byte s2,
FlowControl ctrl)
{
CompareResult returnValue = CompareResult.Equal;
if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
if (size == 2)
{
if (opcode.Value != ((short)(s1 << 8 | s2)))
{
returnValue = returnValue | CompareResult.Value;
}
}
else
{
if (opcode.Value != ((short)s2))
{
returnValue = returnValue | CompareResult.Value;
}
}
if (opcode.FlowControl != ctrl)
{
returnValue = returnValue | CompareResult.FlowControl;
}
return returnValue;
}
示例11: SerialTerminalSettings
/// <summary>
/// <ja>デフォルト設定で初期化します。</ja>
/// <en>Initializes with default values.</en>
/// <seealso cref="Poderosa.Macro.ConnectionList.Open"/>
/// </summary>
/// <remarks>
/// <ja>パラメータは次のように初期化されます。</ja>
/// <en>The parameters are set as following:</en>
/// <list type="table">
/// <item><term><ja>エンコーディング</ja><en>Encoding</en></term><description><ja>EUC-JP</ja><en>iso-8859-1</en></description></item>
/// <item><term><ja>ログ</ja><en>Log</en></term><description><ja>取得しない</ja><en>None</en></description></item>
/// <item><term><ja>ローカルエコー</ja><en>Local echo</en></term><description><ja>しない</ja><en>Don't</en></description></item>
/// <item><term><ja>送信時改行</ja><en>New line</en></term><description>CR</description></item>
/// <item><term><ja>ボーレート</ja><en>Baud Rate</en></term><description>9600</description></item>
/// <item><term><ja>データ</ja><en>Data Bits</en></term><description><ja>8ビット</ja><en>8 bits</en></description></item>
/// <item><term><ja>パリティ</ja><en>Parity</en></term><description><ja>なし</ja><en>None</en></description></item>
/// <item><term><ja>ストップビット</ja><en>Stop Bits</en></term><description><ja>1ビット</ja><en>1 bit</en></description></item>
/// <item><term><ja>フローコントロール</ja><en>Flow Control</en></term><description><ja>なし</ja><en>None</en></description></item>
/// </list>
/// <ja>接続を開くには、<see cref="Poderosa.Macro.ConnectionList.Open"/>メソッドの引数としてSerialTerminalParamオブジェクトを渡します。</ja>
/// <en>To open a new connection, pass the SerialTerminalParam object to the <see cref="Poderosa.Macro.ConnectionList.Open"/> method.</en>
/// </remarks>
public SerialTerminalSettings() {
_baudRate = 9600;
_byteSize = 8;
_parity = Parity.NOPARITY;
_stopBits = StopBits.ONESTOPBIT;
_flowControl = FlowControl.None;
}
示例12: TestBulkPullPermanentExceptionSurrender
public void TestBulkPullPermanentExceptionSurrender() {
if (!Boolean.Parse((string)Runtime.Properties["replicationTestsEnabled"]))
{
Assert.Inconclusive("Replication tests disabled.");
return;
}
var fakeFactory = new MockHttpClientFactory(false);
FlowControl flow = new FlowControl(new FlowItem[]
{
new ExceptionThrower(new TaskCanceledException()) { ExecutionCount = -1 },
});
fakeFactory.HttpHandler.SetResponder("_bulk_get", (request) =>
flow.ExecuteNext<HttpResponseMessage>());
manager.DefaultHttpClientFactory = fakeFactory;
ManagerOptions.Default.RequestTimeout = TimeSpan.FromSeconds(5);
using (var remoteDb = _sg.CreateDatabase(TempDbName())) {
CreatePullAndTest(20, remoteDb, repl => Assert.IsTrue(database.GetDocumentCount() < 20, "Somehow got all the docs"));
}
}
示例13: Import
public override sealed void Import(ConfigNode data)
{
_port = GUtil.ParseInt(data["port"], 1);
_baudRate = GUtil.ParseInt(data["baud-rate"], 9600);
_byteSize = GUtil.ParseByte(data["byte-size"], 8);
_parity = (Parity)EnumDescAttribute.For(typeof(Parity)).FromName(data["parity"], Parity.NOPARITY);
_stopBits = (StopBits)EnumDescAttribute.For(typeof(StopBits)).FromName(data["stop-bits"], StopBits.ONESTOPBIT);
_flowControl = (FlowControl)EnumDescAttribute.For(typeof(FlowControl)).FromName(data["flow-control"], FlowControl.None);
_transmitDelayPerChar = GUtil.ParseInt(data["delay-per-char"], 0);
_transmitDelayPerLine = GUtil.ParseInt(data["delay-per-line"], 0);
base.Import(data);
}
示例14: OpCode
internal OpCode(OpCodeValues value, int flags)
{
m_stringname = null; // computed lazily
m_pop = (StackBehaviour)((flags >> StackBehaviourPopShift) & StackBehaviourMask);
m_push = (StackBehaviour)((flags >> StackBehaviourPushShift) & StackBehaviourMask);
m_operand = (OperandType)(flags & OperandTypeMask);
m_type = (OpCodeType)((flags >> OpCodeTypeShift) & OpCodeTypeMask);
m_size = (flags >> SizeShift) & SizeMask;
m_s1 = (byte)((int)value >> 8);
m_s2 = (byte)(int)value;
m_ctrl = (FlowControl)((flags >> FlowControlShift) & FlowControlMask);
m_endsUncondJmpBlk = (flags & EndsUncondJmpBlkFlag) != 0;
m_stackChange = (flags >> StackChangeShift);
}
示例15: ExternalDataConfigurationConnectionContext
/// <summary>
/// Initializes a new instance of the <see cref="ExternalDataConfigurationConnectionContext"/> class.
/// </summary>
/// <param name="name">
/// The name.
/// </param>
/// <param name="systemName">
/// The system Name.
/// </param>
/// <param name="portName">
/// The port name.
/// </param>
/// <param name="baudRate">
/// The baud rate.
/// </param>
/// <param name="parity">
/// The parity.
/// </param>
/// <param name="dtr">
/// The dtr.
/// </param>
/// <param name="flowControlHighSignal">
/// The flow control high signal.
/// </param>
/// <param name="parityErrorChecking">
/// The parity error checking.
/// </param>
/// <param name="flowControl">
/// The flow control.
/// </param>
/// <param name="rts">
/// The rts.
/// </param>
/// <param name="dataBits">
/// The data bits.
/// </param>
/// <param name="connectionType">
/// The connection type.
/// </param>
/// <param name="stopBits">
/// The stop bits.
/// </param>
/// <param name="computerConnectionList">
/// The computer connection list.
/// </param>
/// <param name="vid">
/// The vid.
/// </param>
/// <param name="pid">
/// The pid.
/// </param>
/// <param name="parentIdPrefix">
/// The parent Id Prefix.
/// </param>
/// <param name="expression">
/// </param>
public ExternalDataConfigurationConnectionContext(
string name,
string systemName,
string portName,
string baudRate,
SerialPortParity parity,
bool dtr,
int flowControlHighSignal,
bool parityErrorChecking,
FlowControl flowControl,
bool rts,
int dataBits,
ConnectionType connectionType,
StopBits stopBits,
IEnumerable<ComputerConnectionContext> computerConnectionList,
string vid,
string pid,
string parentIdPrefix,
string expression)
{
this._systemName = systemName;
this._name = name;
this._portName = portName;
this._baudRate = baudRate;
this._parity = parity;
this._dtr = dtr;
this._flowControlHighSignal = flowControlHighSignal;
this._parityErrorChecking = parityErrorChecking;
this._flowControl = flowControl;
this._rts = rts;
this._dataBits = dataBits;
this._connectionType = connectionType;
this._stopBits = stopBits;
this._computerConnectionList = computerConnectionList;
this._vid = vid;
this._pid = pid;
this._parentIdPrefix = parentIdPrefix;
this._expresion = expression;
}