示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mock{TKey, TValue}"/> class.
 /// </summary>
 internal Mock(ActorExecutionContext.Mock context, IEqualityComparer <TKey> comparer)
     : base(null)
 {
     this.Context = context;
     if (comparer != null)
     {
         this.DictionaryActor = context.CreateActor(
             typeof(SharedDictionaryActor <TKey, TValue>),
             SharedDictionaryEvent.InitializeEvent(comparer));
     }
     else
     {
         this.DictionaryActor = context.CreateActor(typeof(SharedDictionaryActor <TKey, TValue>));
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mock{TKey, TValue}"/> class.
 /// </summary>
 internal Mock(ControlledRuntime runtime, IEqualityComparer <TKey> comparer)
     : base(null)
 {
     this.Runtime = runtime;
     if (comparer != null)
     {
         this.DictionaryActor = this.Runtime.CreateActor(
             typeof(SharedDictionaryActor <TKey, TValue>),
             SharedDictionaryEvent.InitializeEvent(comparer));
     }
     else
     {
         this.DictionaryActor = this.Runtime.CreateActor(typeof(SharedDictionaryActor <TKey, TValue>));
     }
 }