Esempio n. 1
0
        /// <summary>
        /// Creates a new object.
        /// </summary>
        public FileSystemPage(WebSite webSite) : base(webSite)
        {
            var runtime         = Factory.Singleton.Resolve <IRuntimeEnvironment>().Singleton;
            var defaultSiteRoot = new SiteRoot()
            {
                Folder   = String.Format("{0}{1}", Path.Combine(runtime.ExecutablePath, "Web"), Path.DirectorySeparatorChar),
                Priority = 0,
            };

            var checksumsFileName = Path.Combine(runtime.ExecutablePath, "Checksums.txt");

            if (!File.Exists(checksumsFileName))
            {
                throw new FileNotFoundException($"Cannot find {checksumsFileName}");
            }
            defaultSiteRoot.Checksums.AddRange(ChecksumFile.Load(File.ReadAllText(checksumsFileName), enforceContentChecksum: true));

            AddSiteRoot(defaultSiteRoot);
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public AircraftListJsonPage(WebSite webSite) : base(webSite)
 {
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public Page(WebSite webSite)
 {
     _WebSite  = webSite;
     Responder = Factory.Singleton.Resolve <IResponder>();
 }
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public ClosestAircraftJsonPage(WebSite webSite) : base(webSite)
 {
 }
Esempio n. 5
0
 public CorsPreflightPage(WebSite webSite) : base(webSite)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public ServerConfigJsonPage(WebSite webSite) : base(webSite)
 {
 }
Esempio n. 7
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public AudioPage(WebSite webSite) : base(webSite)
 {
 }
Esempio n. 8
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public DirectoryEntryJsonPage(WebSite webSite) : base(webSite)
 {
     _FeedManager            = Factory.Singleton.Resolve <IFeedManager>().Singleton;
     _ApplicationInformation = Factory.Singleton.Resolve <IApplicationInformation>();
 }
Esempio n. 9
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public AirportDataProxyPage(WebSite webSite) : base(webSite)
 {
     _AirportDataApi = Factory.Singleton.Resolve <IAirportDataDotCom>();
 }
Esempio n. 10
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public PolarPlotJsonPage(WebSite webSite) : base(webSite)
 {
     _FeedManager = Factory.Singleton.Resolve <IFeedManager>().Singleton;
 }
Esempio n. 11
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public TextPage(WebSite webSite) : base(webSite)
 {
     _IsMono = Factory.Singleton.Resolve <IRuntimeEnvironment>().Singleton.IsMono;
     RegisterStaticPages();
 }
Esempio n. 12
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public FaviconPage(WebSite webSite) : base(webSite)
 {
     _Icon = BinaryResources.Copy("Images.Favicon.ico");
 }
Esempio n. 13
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public ImagePage(WebSite webSite) : base(webSite)
 {
     _Graphics           = Factory.Singleton.Resolve <IWebSiteGraphics>().Singleton;
     _PictureManager     = Factory.Singleton.Resolve <IAircraftPictureManager>().Singleton;
     _PictureFolderCache = Factory.Singleton.Resolve <IAutoConfigPictureFolderCache>().Singleton.DirectoryCache;
 }
Esempio n. 14
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public ReportRowsJsonPage(WebSite webSite) : base(webSite)
 {
     _PictureManager     = Factory.Singleton.Resolve <IAircraftPictureManager>().Singleton;
     _PictureFolderCache = Factory.Singleton.Resolve <IAutoConfigPictureFolderCache>().Singleton.DirectoryCache;
     _CallsignParser     = Factory.Singleton.Resolve <ICallsignParser>();
 }