public MainPageViewModel(IFileStorageService fileStorageService, IGoogleAnalytics analytics)
		{
			this.fileStorageService = fileStorageService;
			this.analytics = analytics;

			Items = new ObservableCollection<ItemViewModel>();

			if (!IsDataLoaded)
			{
				LoadData();
				IsDataLoaded = true;
			}
			visioClient = new VisioClient(this.fileStorageService);
		}
예제 #2
0
 /// <summary>
 /// Extra constructor mainly created for unit testing purposes.
 /// </summary>
 /// <param name="appSettings"></param>
 /// <param name="directory"></param>
 /// <param name="dictaatFactory"></param>
 /// <param name="context"></param>
 public DictaatRepository(
     IOptions <ConfigVariables> appSettings,
     IGoogleAnalytics analyticsRepo,
     IDictaatFactory dictaatFactory,
     WebdictaatContext context)
 {
     _directoryRoot      = appSettings.Value.DictaatRoot;
     _pagesDirectory     = appSettings.Value.PagesDirectory;
     _dictatenDirectory  = appSettings.Value.DictatenDirectory;
     _templatesDirectory = appSettings.Value.TemplatesDirectory;
     _analyticsRepo      = analyticsRepo;
     _context            = context;
     _dictaatFactory     = dictaatFactory;
     _pathHelper         = new PathHelper(appSettings.Value);
 }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="appSettings"></param>
        /// <param name="directory"></param>
        /// <param name="dictaatFactory"></param>
        /// <param name="context"></param>
        public DictaatRepository(
            IOptions <ConfigVariables> appSettings,
            IGoogleAnalytics analyticsRepo,
            IDirectory directory,
            IFile file,
            Core.IJson json,
            WebdictaatContext context)
        {
            _directoryRoot      = appSettings.Value.DictaatRoot;
            _pagesDirectory     = appSettings.Value.PagesDirectory;
            _dictatenDirectory  = appSettings.Value.DictatenDirectory;
            _templatesDirectory = appSettings.Value.TemplatesDirectory;
            var menuConfigName = appSettings.Value.MenuConfigName;

            _analyticsRepo = analyticsRepo;
            _directory     = directory;
            _context       = context;

            //best place to build the factory
            _dictaatFactory = new DictaatFactory(appSettings.Value, directory, file, json);
            _pathHelper     = new PathHelper(appSettings.Value);
        }
 public UniversalAnalytics()
 {
     _googleAnalytics = new GoogleAnalytics();
     _yandexAnalytics = new YandexDirect();
 }
 public UniversalAnalytics(IGoogleAnalytics googleBehaviour, IYandexDirect yandexBehaviour)
 {
     _googleAnalytics = googleBehaviour;
     _yandexAnalytics = yandexBehaviour;
 }
예제 #6
0
 public AnalyticsEventHandler(IGoogleAnalytics googleAnalytics)
 {
     _googleAnalytics = googleAnalytics;
 }
예제 #7
0
 public GoController(IQueryBus queryBus, IGoogleAnalytics googleAnalytics)
 {
     _googleAnalytics = googleAnalytics;
     _queryBus        = queryBus;
 }