Exemple #1
0
        /// <summary>
        /// Выгрузка Доменов Сессии
        /// </summary>
        public void Dispose()
        {
            lock (SessionLocker)
                if (m_Disposed)
                {
                    return;
                }
                else
                {
                    m_Disposed = true;
                }

            try
            {
                lock (SessionLocker)
                {
                    foreach (var domain in Domains)
                    {
                        domain.Disposed -= OnDomainDisposed;
                        domain.Dispose();
                    }

                    Domains.Clear();
                }
            }
            catch (Exception ex)
            {
                Utilites.m_loger.Log("Возникло исключение при освобождении доменной сессиии", ex, new LogParameter("ID сессии", ID.ToString()));
            }
            finally
            {
                Disposed?.Invoke(this);
            }
        }
Exemple #2
0
        internal void Unload()
        {
            Context.UnloadAndClean();
            Plugins.Clear();
            Domains.Clear();
            CommandInfo.Reset();
            Bridge.OccupiedCommandNames.Clear();
            Bridge.OccupiedConsoleCommandNames.Clear();
            Bridge.ConsoleManager.Reset();

            _isLoaded = false;
        }
Exemple #3
0
        private void LoadV1(string[] data)
        {
            Domains.Clear();
            Domain   = data != null && data.Length > 0 ? data[0] : "";
            Token    = data != null && data.Length > 1 ? CharSwitch(data[1]) : "";
            Interval = data != null && data.Length > 2 ? data[2] : "30m";
            var ownResolveOfIPs = data != null && data.Length > 3 ? data[3] == "OwnResolveIpv6" || data[3] == "OwnResolveIPs" : false;

            if (ownResolveOfIPs)
            {
                Domains.Add(new DDnsDomain()
                {
                    Domain = Domain, ResolutionMode = DDnsResolutionMode.Local
                });
                Domain = "*";
            }
        }