Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T2GVehicleInfoServiceStub"/> class.
        /// </summary>
        /// <param name="identificationService">The identification service.</param>
        /// <exception cref="ArgumentNullException">identificationService parameter is null</exception>
        public T2GVehicleInfoServiceStub(T2GIdentificationServiceStub identificationService)
        {
            if (identificationService == null)
            {
                throw new ArgumentNullException("identificationService");
            }

            _identificationService = identificationService;
            _identificationService.OnlineStatusChanged += new T2GIdentificationServiceStub.OnlineStatusChangedHandler(OnlineStatusChangedLogic);
            _identificationService.SystemDeleted       += new T2GIdentificationServiceStub.SystemDeletedHandler(SystemDeletedLogic);
        }
Example #2
0
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_identificationService != null)
         {
             _identificationService.OnlineStatusChanged -= new T2GIdentificationServiceStub.OnlineStatusChangedHandler(OnlineStatusChangedLogic);
             _identificationService.SystemDeleted       -= new T2GIdentificationServiceStub.SystemDeletedHandler(SystemDeletedLogic);
             _identificationService = null;
         }
     }
 }