コード例 #1
0
 /// <summary>
 /// ensure to call base.RegisterDevice(_callback, _signalErrorcallback);
 /// Set device configuration, allow configuration in confFiles
 /// </summary>
 /// <param name="_callback"></param>
 /// <returns></returns>
 public virtual String RegisterDevice(RecolectorSignalcallback _callback, RecolectorSignalErrorcallback _signalErrorcallback)
 {
     this.Id = Guid.NewGuid().ToString();
     this.moneyReceivedCallback = _callback;
     this.signalErrorcallback   = _signalErrorcallback;
     return(Id);
 }
コード例 #2
0
        /// <summary>
        /// ensure to call base.RegisterDevice(_callback);
        /// Set device configuration, allow configuration in confFiles
        /// </summary>
        /// <param name="_callback"></param>
        /// <returns></returns>
        public override String RegisterDevice(RecolectorSignalcallback _callback, RecolectorSignalErrorcallback _signalErrorcallback)
        {
            base.RegisterDevice(_callback, _signalErrorcallback);

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("Money Recolector register under id " + this.Id);
            Console.ResetColor();

            return(this.Id);
        }