コード例 #1
0
ファイル: FileSystemPage.cs プロジェクト: theolivenbaum/vrs
        /// <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);
        }
コード例 #2
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public AircraftListJsonPage(WebSite webSite) : base(webSite)
 {
 }
コード例 #3
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public Page(WebSite webSite)
 {
     _WebSite  = webSite;
     Responder = Factory.Singleton.Resolve <IResponder>();
 }
コード例 #4
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public ClosestAircraftJsonPage(WebSite webSite) : base(webSite)
 {
 }
コード例 #5
0
 public CorsPreflightPage(WebSite webSite) : base(webSite)
 {
 }
コード例 #6
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public ServerConfigJsonPage(WebSite webSite) : base(webSite)
 {
 }
コード例 #7
0
ファイル: AudioPage.cs プロジェクト: vishalishere/vrs
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public AudioPage(WebSite webSite) : base(webSite)
 {
 }
コード例 #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>();
 }
コード例 #9
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public AirportDataProxyPage(WebSite webSite) : base(webSite)
 {
     _AirportDataApi = Factory.Singleton.Resolve <IAirportDataDotCom>();
 }
コード例 #10
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 /// <param name="webSite"></param>
 public PolarPlotJsonPage(WebSite webSite) : base(webSite)
 {
     _FeedManager = Factory.Singleton.Resolve <IFeedManager>().Singleton;
 }
コード例 #11
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public TextPage(WebSite webSite) : base(webSite)
 {
     _IsMono = Factory.Singleton.Resolve <IRuntimeEnvironment>().Singleton.IsMono;
     RegisterStaticPages();
 }
コード例 #12
0
 /// <summary>
 /// Creates a new object.
 /// </summary>
 public FaviconPage(WebSite webSite) : base(webSite)
 {
     _Icon = BinaryResources.Copy("Images.Favicon.ico");
 }
コード例 #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;
 }
コード例 #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>();
 }