Example #1
0
        public LocalSite(IHostFileService hostFileService, IProxyService proxyService, IIPService ipService, DirectoryInfo path, string siteUrl)
        {
            this.hostFileService = hostFileService;
            this.proxyService    = proxyService;
            this.ipService       = ipService;

            this.Path = path.FullName;
            this.Url  = siteUrl;

            initialize();
        }
Example #2
0
        public LocalSite(IHostFileService hostFileService, IProxyService proxyService, IIPService ipService, DirectoryInfo path, string siteUrl, IPAddress ip)
        {
            this.hostFileService = hostFileService;
            this.proxyService    = proxyService;
            this.ipService       = ipService;

            this.Path = path.FullName;
            this.Url  = siteUrl;
            this.IP   = ip;

            initialize(ip.ToString());
        }
Example #3
0
        public MainViewModel(IHostFileService hostFileService, IProxyService proxyService, IIPService ipService, ILocalSiteFactory localSiteFactory, ISiteArchive siteArchive)
        {
            this.hostFileService  = hostFileService;
            this.proxyService     = proxyService;
            this.ipService        = ipService;
            this.localSiteFactory = localSiteFactory;
            this.siteArchive      = siteArchive;
            IsServing             = true;

            var sites = ReadSitesConfig();

            if (sites == null)
            {
                ActiveSites = new ObservableCollection <LocalSite>();
            }
            else
            {
                ActiveSites = new ObservableCollection <LocalSite>(sites);
            }
            OpenUrlCommand    = new RelayCommand <string>(OpenUrl);
            RemoveSiteCommand = new RelayCommand <LocalSite>(RemoveSite);
            QuitCommand       = new RelayCommand(Quit);
            AddSiteCommand    = new RelayCommand(AddSite);
        }
Example #4
0
 public LocalSiteFactory(IHostFileService hostFileService, IProxyService proxyService, IIPService ipService)
 {
     this.hostFileService = hostFileService;
     this.proxyService    = proxyService;
     this.ipService       = ipService;
 }