Exemple #1
0
 public MainWindow(IEventAggregator eventAggregator)
 {
     _eventAggregator = eventAggregator;
     _locationReader  = ServiceFactory.GeLocationReader();
     InitializeComponent();
     DataContext = new MainWindowViewModel(GetReader(), _eventAggregator);
 }
        public IndexModel(IMatchingConfiguration configuration, ILocationReader locationReader, IPostcodeImporter postcodeImporter)
        {
            _configuration    = configuration;
            _locationReader   = locationReader;
            _postcodeImporter = postcodeImporter;

            GoogleMapsApiKey = configuration.GoogleMapsApiKey;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LocationApiController"/> class.
        /// </summary>
        /// <param name="locationLoader">The location loader.</param>
        /// <exception cref="System.ArgumentNullException">locationLoader</exception>
        public LocationApiController(ILocationReader locationLoader)
        {
            if (locationLoader == null)
            {
                throw new ArgumentNullException(nameof(locationLoader));
            }

            _locationLoader = locationLoader;
        }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DapperEventWriter"/> class.
 /// </summary>
 /// <param name="resolver">The resolver.</param>
 /// <exception cref="System.ArgumentNullException"></exception>
 public DapperEventWriter(IConnectionStringResolver resolver, ILocationReader locationLoader)
 {
     if (resolver == null)
     {
         throw new ArgumentNullException(nameof(resolver));
     }
     if (locationLoader == null)
     {
         throw new ArgumentNullException(nameof(locationLoader));
     }
     _resolver       = resolver;
     _locationLoader = locationLoader;
 }
        private static List <LocationModel> GetLocations()
        {
            if (_locationReader == null)
            {
                _locationReader = DependencyResolver.Current.GetService <ILocationReader>();
            }

            if (_locationReader != null)
            {
                return(_locationReader.GetLocations());
            }

            return(new List <LocationModel>());
        }
Exemple #6
0
 public FMR_BusinessValidator(ILocationReader locationReader, ILeadReader leadReader)
 {
     _locationReader = locationReader;
     _leadReader     = leadReader;
 }
Exemple #7
0
 public AddLocationViewModel(ILocationReader locationReader, IEventAggregator eventAggregator)
 {
     _reader          = locationReader;
     _eventAggregator = eventAggregator;
     Cities           = new ObservableCollection <Location>();
 }
 public BusinessValidatorSelector(ICampaignReader campaignReader, ILocationReader locationReader, ILeadReader leadReader)
 {
     _campaignReader = campaignReader;
     _locationReader = locationReader;
     _leadReader     = leadReader;
 }
Exemple #9
0
 public CustomerFinder(ILocationReader locationReader, IDistanceCalculator distanceCalculator)
 {
     this.locationReader     = locationReader;
     this.distanceCalculator = distanceCalculator;
 }
Exemple #10
0
 public AddLocationWindow(ILocationReader reader, IEventAggregator eventAggregator)
 {
     InitializeComponent();
     DataContext = new AddLocationViewModel(reader, eventAggregator);
 }