Пример #1
0
 private void Cache()
 {
     AccountMgr.log.Info("Chaching accaunts.");
     this.m_lock           = new ReaderWriterLockWrapper();
     this.m_lastResyncTime = new DateTime();
     this.Resync();
 }
        void RemoveExecutionOptions(string?assemblyFilename)
        {
            Guard.NotNull("Attempted to log messages for an XunitProjectAssembly without first setting AssemblyFilename", assemblyFilename);

            using (ReaderWriterLockWrapper.WriteLock())
                executionOptionsByAssembly.Remove(assemblyFilename);
        }
Пример #3
0
        protected Group(Character leader, byte maxGroupUnits)
        {
            // m_syncLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
            syncLock    = new ReaderWriterLockWrapper();
            m_subGroups = new SubGroup[maxGroupUnits];

            for (byte i = 0; i < maxGroupUnits; i++)
            {
                m_subGroups[i] = new SubGroup(this, i);
            }

            m_targetIcons = new EntityId[TargetIconCount];
            for (int i = 0; i < m_targetIcons.Length; i++)
            {
                m_targetIcons[i] = EntityId.Zero;
            }

            m_lootMethod        = LootMethod.GroupLoot;
            m_lootThreshold     = ItemQuality.Uncommon;
            m_DungeonDifficulty = 0;

            var member = AddMember(leader, false);

            Leader         = member;
            m_masterLooter = null;
            // update will follow when the 2nd guy joins
        }
Пример #4
0
        private void Cache()
        {
            log.Info("Chaching accaunts.");
            m_lock           = new ReaderWriterLockWrapper();
            m_lastResyncTime = default(DateTime);

            Resync();
        }
Пример #5
0
        private void Cache()
        {
            log.Info(resources.CachingAccounts);
            m_lock           = new ReaderWriterLockWrapper();
            m_lastResyncTime = default(DateTime);

            Resync();
        }
Пример #6
0
 /// <summary>
 /// Initializes a new <see cref="WeakDictionary{TKey,TValue}"/> with an existing lock.
 /// </summary>
 /// <param name="lock">An existing lock.</param>
 public WeakDictionary(ReaderWriterLockWrapper @lock)
 {
     if (@lock == null)
     {
         throw new ArgumentNullException("lock");
     }
     this.@lock = @lock;
 }
        void AddExecutionOptions(
            string?assemblyFilename,
            _ITestFrameworkExecutionOptions executionOptions)
        {
            Guard.NotNull("Attempted to log messages for an XunitProjectAssembly without first setting AssemblyFilename", assemblyFilename);

            using (ReaderWriterLockWrapper.WriteLock())
                executionOptionsByAssembly[assemblyFilename] = executionOptions;
        }
        /// <summary>
        /// Get the test framework options for the given assembly. If it cannot find them, then it
        /// returns a default set of options.
        /// </summary>
        /// <param name="assemblyFilename">The test assembly filename</param>
        /// <returns></returns>
        protected ITestFrameworkExecutionOptions GetExecutionOptions(string assemblyFilename)
        {
            ITestFrameworkExecutionOptions result;

            using (ReaderWriterLockWrapper.ReadLock())
                if (!executionOptionsByAssembly.TryGetValue(assemblyFilename, out result))
                    result = defaultExecutionOptions;

            return result;
        }
        /// <summary>
        /// Get the test framework options for the given assembly. If it cannot find them, then it
        /// returns a default set of options.
        /// </summary>
        /// <param name="assemblyFilename">The test assembly filename</param>
        protected _ITestFrameworkExecutionOptions GetExecutionOptions(string?assemblyFilename)
        {
            if (assemblyFilename != null)
            {
                using (ReaderWriterLockWrapper.ReadLock())
                    if (executionOptionsByAssembly.TryGetValue(assemblyFilename, out var result))
                    {
                        return(result);
                    }
            }

            return(defaultExecutionOptions);
        }
Пример #10
0
 protected Group(Character leader, byte maxGroupUnits)
 {
     syncLock    = new ReaderWriterLockWrapper();
     m_subGroups = new SubGroup[maxGroupUnits];
     for (byte groupUnitId = 0; (int)groupUnitId < (int)maxGroupUnits; ++groupUnitId)
     {
         m_subGroups[groupUnitId] = new SubGroup(this, groupUnitId);
     }
     m_targetIcons = new EntityId[8];
     for (int index = 0; index < m_targetIcons.Length; ++index)
     {
         m_targetIcons[index] = EntityId.Zero;
     }
     m_lootMethod        = LootMethod.GroupLoot;
     m_lootThreshold     = ItemQuality.Uncommon;
     m_DungeonDifficulty = 0U;
     Leader         = AddMember(leader, false);
     m_masterLooter = null;
 }
 void AddExecutionOptions(string assemblyFilename, ITestFrameworkExecutionOptions executionOptions)
 {
     using (ReaderWriterLockWrapper.WriteLock())
         executionOptionsByAssembly[assemblyFilename] = executionOptions;
 }
 void RemoveExecutionOptions(string assemblyFilename)
 {
     using (ReaderWriterLockWrapper.WriteLock())
         executionOptionsByAssembly.Remove(assemblyFilename);
 }
Пример #13
0
 /// <summary>
 /// Initializes a new <see cref="WeakDictionary{TKey,TValue}"/> with a new lock.
 /// </summary>
 public WeakDictionary()
 {
     this.@lock = new ReaderWriterLockWrapper(this);
 }