Ejemplo n.º 1
0
 public AutomaticRepeatReQuest(IGuranteedDelivery guranteedDelivery, ISchedular schedular, IHarakaDb harakaDb)
 {
     _guranteedDelivery           = guranteedDelivery;
     _schedular                   = schedular;
     _harakaDb                    = harakaDb;
     DictionaryWithSortedMessages = new Dictionary <string, SortedList <int, ExtendedPacketInformation> >();
     _messagesToPacket            = new Dictionary <string, ConcurrentQueue <Tuple <string, Message> > >();
 }
Ejemplo n.º 2
0
        public PhotosController(ISchedular repo, IMapper mapper,
                                IOptions <CloudinarySetting> cloudinaryConfig)
        {
            _repo             = repo;
            _mapper           = mapper;
            _cloudinaryConfig = cloudinaryConfig;
            // create account for transfer of photos
            Account acc = new Account(
                _cloudinaryConfig.Value.CloudName,
                _cloudinaryConfig.Value.ApiKey,
                _cloudinaryConfig.Value.ApiSecret
                );

            _cloudinary = new Cloudinary(acc);
        }
Ejemplo n.º 3
0
        public PingPong(IUdpCommunication udpCommunication, ISchedular schedular, IAntiEntropy antiEntropy, IJsonConfigurator jsonConfigurator, IClock clock)
        {
            _schedular        = schedular;
            _antiEntropy      = antiEntropy;
            _jsonConfigurator = jsonConfigurator;
            _clock            = clock;
            _udpCommunication = udpCommunication;

            _latencyInMs = _jsonConfigurator.GetSettings().AntiEntropyMilliseonds / 10; //Todo: find real latency

            foreach (var broker in _jsonConfigurator.GetSettings().Brokers)
            {
                _brokers.Add(new BrokerInformation
                {
                    Active        = true,
                    PrimaryNumber = broker.PrimaryNumber,
                    Port          = broker.Port,
                    Ipadress      = broker.Ipadress
                });
            }
        }
Ejemplo n.º 4
0
 public MessagesController(ISchedular repo, IMapper mapper)
 {
     _mapper = mapper;
     _repo   = repo;
 }
Ejemplo n.º 5
0
 public UsersController(ISchedular repo, IMapper mapper)
 {
     _mapper = mapper;
     _repo   = repo;
 }