/// <summary> /// Przywraca zmianę. /// </summary> public void Redo() { if (CanRedo) { IUndoableRedoable action = redoStack.Pop(); action.Redo(); undoStack.Push(action); } CanUndo = IsUndoAvailable(); CanRedo = IsRedoAvailable(); }
static void Main(string[] args) { CommandProcessor processor = new CommandProcessor(true); ElevatorGroup group = new ElevatorGroup(3, 12); RollingStack <int?> stack = new RollingStack <int?>(50); Console.WriteLine($"Rolling Stack:\tMaxSize: {stack.MaxSize}\tSize: {stack.Size}\tCount: {stack.Count()}"); for (int i = 1; i <= 55; i++) { if (stack.Push(i)) { Console.WriteLine("Stack trimmed."); } Console.WriteLine($"Rolling Stack:\tMaxSize: {stack.MaxSize}\tSize: {stack.Size}\tCount: {stack.Count()}"); } for (int i = 1; i <= 55; i++) { int? val = stack.Pop(); string s; if (val == null) { s = "null"; } else { s = val.ToString(); } Console.WriteLine(s); } var files = JArray.Parse( System.IO.File.ReadAllText( "C:\\Go\\src\\gitlab.hylandqa.net\\skelemen\\cryptanalysis\\output\\report.json")); //JsonConvert.DeserializeObject<Models.Files>(System.IO.File.ReadAllText("C:\\Go\\src\\gitlab.hylandqa.net\\skelemen\\cryptanalysis\\output\\report.json")); IEnumerable <Models.File> list = files.ToObject <IEnumerable <Models.File> >(); //list.GetEnumerator().MoveNext() foreach (Models.File file in list) { Console.WriteLine(file.Path); } Console.WriteLine("Finished."); Console.ReadKey(); }