예제 #1
0
        /// <summary>
        /// Creates a Notifier instance to send notificaitons of changes
        /// this creates a sperate remote connection to the server
        /// if connection is lost this object must be recreated.
        /// </summary>
        /// <param name="aRemoteserver">Server to connect to</param>
        /// <param name="aPort">port of the ser</param>
        /// <param name="aEncryptedConnection">HTTPS connection or not</param>
        /// <param name="ConnectionId">ID of an existing connection</param>
        public PandoraObjectNotifier(string aRemoteserver, int aPort, bool aEncryptedConnection, string aConnectionId, string aDataPath)
        {
            FUpgradePath           = aDataPath;
            OnErrorEvent          += PandoraObjectNotifier_OnErrorEvent;
            LastNotifiedCurrencyId = 0;
            MinutesBetweenCheckForNewCurrencies = 60;

            FServerAccess = new PandoraWalletServiceAccess(aRemoteserver, aPort, aEncryptedConnection, aConnectionId);
        }
예제 #2
0
 protected override void InternalFinalize()
 {
     base.InternalFinalize();
     Log.Write(LogLevel.Info, "Pandora Object Notifier shutting down.");
     FServerAccess?.Dispose();
     FFindServerItemsTimer?.Dispose();
     FWebClientDownloader?.CancelAsync();
     FServerAccess = null;
 }