BinhlEmul.World.GetPortValue C# (CSharp) Method

GetPortValue() public method

public GetPortValue ( string portName ) : bool
portName string
return bool
        public bool GetPortValue(string portName)
        {
            return (from port in outPorts where port.Name == portName select port.Value).FirstOrDefault();
        }

Usage Example

示例#1
0
 private static void FTest(ref bool allTests, ref int numTests, World world, string str)
 {
     numTests++;
     string[] fargs = Regex.Match(str, @"\(.*?\)").Value.Replace("(", "").Replace(")", "").Trim().Split(',');
     string port = fargs[0].Trim();
     bool value = Convert.ToInt32(fargs[1].Trim()) == 1;
     if (value == world.GetPortValue(port))
     {
         Console.ForegroundColor = ConsoleColor.Green;
         Console.WriteLine("Test port:{0} - OK", port);
         Console.ForegroundColor = ConsoleColor.White;
     }
     else
     {
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine("Test port:{0} - ERROR", port);
         Console.ForegroundColor = ConsoleColor.White;
         allTests = false;
     }
 }
All Usage Examples Of BinhlEmul.World::GetPortValue