Esempio n. 1
0
 private IodineObject connected(VirtualMachine vm, IodineObject self, IodineObject[] args)
 {
     try {
         var result = !((Socket.Poll(1000, SelectMode.SelectRead) &&
                         (Socket.Available == 0)) || !Socket.Connected);
         return(IodineBool.Create(result));
     } catch {
         return(IodineBool.False);
     }
 }
Esempio n. 2
0
 public IodineObject ReadBool()
 {
     return(IodineBool.Create(binaryReader.ReadBoolean()));
 }
Esempio n. 3
0
 private void WriteBool(IodineBool boolean)
 {
     binaryWriter.Write((byte)DataType.BoolObject);
     binaryWriter.Write(boolean.Value);
 }
        public override object ConvertFrom(TypeRegistry registry, IodineObject obj)
        {
            IodineBool boolean = obj as IodineBool;

            return(boolean.Value);
        }