public DomainFacade(IStorageProvider storageProvider, string baseUri, ILanguageContainerService languageContainerService) { _storageProvider = storageProvider; LanguageContainerService = languageContainerService; TryRestoreLanguageName(); _grid = new Grid(); _toolManager = new ToolManager(); _historyManager = new HistoryManager(); _hintsProvider = new HintsProvider(); _storageManager = new StorageManager(storageProvider); _shareManager = new ShareManager(baseUri); _pasteManager = new PasteManager(); _solver = new BruteForceSolver(); _gridGenerator = new PredefinedGridGenerator(); _colorManager = new ColorManager(); _gameTimerManager = new GameTimerManager(); _modalStateManager = new(); _modalStateManager.OnModalStateChanged += HandleModalStateChanged; SetModalState(ModalState.Loading); Load(); StartAutoSave(TimeSpan.FromSeconds(2)); }
public string GetRawPaste(string id) { return(PasteManager.GetPaste(id).PasteData); }
public ActionResult DisplayPaste(string id) { Paste p = PasteManager.GetPaste(id); return(View("DisplayPage", p)); }
public string Index(Paste p) { string pasteId = PasteManager.StorePaste(p); return(Request.Url.Scheme + "://" + Request.Url.Authority + "/Home/DisplayPaste/" + pasteId); }