コード例 #1
0
 /// <summary>
 /// Initializes the shared dictionary.
 /// </summary>
 /// <param name="comparer">Comparre for keys</param>
 /// <param name="Runtime">BugFindingRuntime</param>
 public MockSharedDictionary(IEqualityComparer <TKey> comparer, BugFindingRuntime Runtime)
 {
     this.Runtime = Runtime;
     if (comparer != null)
     {
         DictionaryMachine = Runtime.CreateMachine(typeof(SharedDictionaryMachine <TKey, TValue>),
                                                   SharedDictionaryEvent.InitEvent(comparer));
     }
     else
     {
         DictionaryMachine = Runtime.CreateMachine(typeof(SharedDictionaryMachine <TKey, TValue>));
     }
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MockSharedDictionary{TKey, TValue}"/> class.
 /// </summary>
 public MockSharedDictionary(IEqualityComparer <TKey> comparer, SystematicTestingRuntime runtime)
 {
     this.Runtime = runtime;
     if (comparer != null)
     {
         this.DictionaryMachine = this.Runtime.CreateMachine(
             typeof(SharedDictionaryMachine <TKey, TValue>),
             SharedDictionaryEvent.InitEvent(comparer));
     }
     else
     {
         this.DictionaryMachine = this.Runtime.CreateMachine(typeof(SharedDictionaryMachine <TKey, TValue>));
     }
 }