Exemplo n.º 1
0
 Program()
 {
     _clock                       = new UtcClock();
     _dnsProvider                 = new DnsProvider();
     _hashingService              = new Md5HashingService();
     _msgSerializer               = new MessageSerializer();
     _nodeSocketFactory           = new InProcNodeSocketFactory();
     _correlationFactory          = new CorrelationIdFactory();
     _actionTimerFactory          = new ActionTimerFactory();
     _expiryCalculator            = new ExpiryTimeCalculator(_clock);
     _random                      = new RandomNumberGenerator(_correlationFactory);
     _marshallerFactory           = new NodeMarshallerFactory(_msgSerializer);
     _communicationManagerFactory = new CommunicationManagerFactory();
 }
Exemplo n.º 2
0
 public RandomNumberGenerator(ICorrelationFactory <CorrelationId> seedFactory)
 {
     _rnd = new Random(seedFactory.GetNextCorrelation().GetHashCode());
 }