Exemple #1
0
 IEnumerator IEnumerable.GetEnumerator()
 {
     using (RWLockReadSession lockSession = new RWLockReadSession(m_dictLocker))
     {
         return(m_dict.GetEnumerator());
     }
 }
Exemple #2
0
 public void CopyTo(KeyValuePair <TisValidationMethod, TisValidationMethodResult>[] array, int arrayIndex)
 {
     using (RWLockReadSession lockSession = new RWLockReadSession(m_dictLocker))
     {
         m_dict.CopyTo(array, arrayIndex);
     }
 }
Exemple #3
0
 public IEnumerator <KeyValuePair <TisValidationMethod, TisValidationMethodResult> > GetEnumerator()
 {
     using (RWLockReadSession lockSession = new RWLockReadSession(m_dictLocker))
     {
         return(m_dict.GetEnumerator());
     }
 }
Exemple #4
0
 public bool Contains(KeyValuePair <TisValidationMethod, TisValidationMethodResult> item)
 {
     using (RWLockReadSession lockSession = new RWLockReadSession(m_dictLocker))
     {
         return(m_dict.Contains(item));
     }
 }
Exemple #5
0
 public bool TryGetValue(TisValidationMethod key, out TisValidationMethodResult value)
 {
     using (RWLockReadSession lockSession = new RWLockReadSession(m_dictLocker))
     {
         return(m_dict.TryGetValue(key, out value));
     }
 }
Exemple #6
0
 public bool ContainsKey(TisValidationMethod key)
 {
     using (RWLockReadSession lockSession = new RWLockReadSession(m_dictLocker))
     {
         return(m_dict.ContainsKey(key));
     }
 }
Exemple #7
0
 public TisValidationMethodResult this[TisValidationMethod key]
 {
     get
     {
         using (RWLockReadSession lockSession = new RWLockReadSession(m_dictLocker))
         {
             return(m_dict[key]);
         }
     }
     set
     {
         using (RWLockWriteSession lockSession = new RWLockWriteSession(m_dictLocker))
         {
             m_dict[key] = value;
         }
     }
 }
        public virtual void Dispose(bool bDisposing)
        {
            if (bDisposing && !m_bDisposed)
            {
                if (m_oServiceProvidersCache != null)
                {
                    m_oServiceProvidersCache.OnLifetimeManagerActivate -=
                        new TisServiceProviderCache.LifetimeManagerEvent(OnLifetimeManagerActivate);

                    m_oServiceProvidersCache.OnLifetimeManagerDeactivate -=
                        new TisServiceProviderCache.LifetimeManagerEvent(OnLifetimeManagerDeactivate);

                    bool canStopServices;

                    using (RWLockReadSession lockSession = new RWLockReadSession(m_hostStatusLocker))
                    {
                        canStopServices = m_enStatus == HostStatus.Active || m_enStatus == HostStatus.Initializing;
                    }

                    if (canStopServices)
                    {
                        StopApplicationServices(
                            ALL_APPS    // All applications
                            );
                    }

                    m_oServiceProvidersCache.Dispose();
                }

                SetStatus(HostStatus.Inactive);

                if (bDisposing)
                {
                    GC.SuppressFinalize(this);
                }
            }

            m_bDisposed = true;
        }