Beispiel #1
0
 public static void FireOnTransfer(long BytesTotal, long BytesTransferred)
 {
     if (OnTransfer != null)
     {
         OnTransfer.Invoke(BytesTotal, BytesTransferred);
     }
 }
        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);
        }
        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);
        }
        public byte Transfer(IList <byte> inputSignals)
        {
            if (inputSignals.Count != EntryCount)
            {
                throw new Exception();
            }

            byte result = Activator(Adder(inputSignals));

            OnTransfer?.Invoke(result);

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