Exemplo n.º 1
0
 public static void FireOnTransfer(long BytesTotal, long BytesTransferred)
 {
     if (OnTransfer != null)
     {
         OnTransfer.Invoke(BytesTotal, BytesTransferred);
     }
 }
Exemplo n.º 2
0
        public byte Transfer(IList <byte> inputSignals)
        {
            if (inputSignals.Count != EntryCount)
            {
                throw new Exception();
            }

            byte result = Adder(inputSignals) >= Limit ? (byte)1 : (byte)0;

            OnTransfer?.Invoke(result);

            return(result);
        }
Exemplo n.º 3
0
        public byte Transfer(IList <byte> inputSignals)
        {
            if (inputSignals.Count != 1)
            {
                throw new Exception();
            }

            byte result = inputSignals[0] >= 1 ? (byte)1 : (byte)0;

            OnTransfer?.Invoke(result);

            return(result);
        }
Exemplo n.º 4
0
        public byte Transfer(IList <byte> inputSignals)
        {
            if (inputSignals.Count != EntryCount)
            {
                throw new Exception();
            }

            byte result = Activator(Adder(inputSignals));

            OnTransfer?.Invoke(result);

            return(result);
        }
Exemplo n.º 5
0
 public void TransferItem(object[] id)
 {
     OnTransfer?.Invoke(this, new StashTransferEventArgs {
         InternalId = id, Count = 1
     });
 }
Exemplo n.º 6
0
 public void TransferAll(object[] id)
 {
     OnTransfer?.Invoke(this, new StashTransferEventArgs {
         InternalId = id, Count = int.MaxValue
     });
 }