Ejemplo n.º 1
0
 public IconUploadRequest(IConnectionFactory ConnectionFactory, IWebsiteState WebsiteState,
                          IIconValidatorService IconValidatorService, IFileReceiver FileReceiver)
     : base(ConnectionFactory, WebsiteState)
 {
     this.IconValidatorService = IconValidatorService;
     this.FileReceiver         = FileReceiver;
 }
Ejemplo n.º 2
0
        public static GridState BuildCurrentGridState(this IConnection connection, IWebsiteState websiteState)
        {
            GridState oldGrid = new GridState()
            {
                Size = websiteState.ActiveIconGridSize
            };

            oldGrid.Cells = connection.ActiveGridIcons();
            return(oldGrid);
        }
Ejemplo n.º 3
0
        private void EnsureLastGridBuildTimeFileExists()
        {
            IWebsiteState ws = Services.Get <IWebsiteState>();

            if (File.Exists(ws.LastGridBuildTimePath))
            {
                string datetimeStr = File.ReadAllText(ws.LastGridBuildTimePath);
                ws.LastGridBuildTime = DateTime.Parse(datetimeStr);
            }
            else
            {
                // set automatically saves to file
                ws.LastGridBuildTime = DateTime.MinValue;
            }
        }
Ejemplo n.º 4
0
        private void EnsureGridSizeFileExists()
        {
            IWebsiteState ws = Services.Get <IWebsiteState>();

            if (File.Exists(ws.IconGridSizePath))
            {
                string json = File.ReadAllText(ws.IconGridSizePath);
                ws.ActiveIconGridSize = JsonConvert.DeserializeObject <GridSize>(json);
            }
            else
            {
                // set automatically saves to file
                ws.ActiveIconGridSize = GridSize.BuildDefault();
            }
        }
Ejemplo n.º 5
0
 public GridUpdateRequest(IConnectionFactory ConnectionFactory,
                          IWebsiteState WebsiteState, IIconValidatorService IconValidatorService)
     : base(ConnectionFactory, WebsiteState)
 {
     this.IconValidatorService = IconValidatorService;
 }
 public LastGridBuildTimeRequest(IWebsiteState WebsiteState)
 {
     this.WebsiteState = WebsiteState;
 }
Ejemplo n.º 7
0
 public GridSizeRequest(IWebsiteState WebsiteState)
 {
     this.WebsiteState = WebsiteState;
 }
Ejemplo n.º 8
0
 public GridBuildRequest(IConnectionFactory ConnectionFactory, IWebsiteState WebsiteState)
     : base(ConnectionFactory, WebsiteState)
 {
 }
Ejemplo n.º 9
0
 public CommonDependent2(IConnectionFactory ConnectionFactory, IWebsiteState WebsiteState) : base(ConnectionFactory)
 {
     this.WebsiteState = WebsiteState;
 }