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(); }
public RandomNumberGenerator(ICorrelationFactory <CorrelationId> seedFactory) { _rnd = new Random(seedFactory.GetNextCorrelation().GetHashCode()); }