Esempio n. 1
0
        private void CreateOrLoadHistory()
        {
            if (selection == null)
            {
                Debug.LogError("Selection must be loaded or created before creating navigation");
                return;
            }

            var filePath = GetPersistentFilePath(selection.key + "-Navigation.json");

            if (File.Exists(filePath))
            {
                try
                {
                    var json = File.ReadAllText(filePath);
                    this.navigation = JsonUtility.FromJson <ILNavigatorHistory>(json);
                }
                catch
                {
                    // ignored
                }
            }

            if (navigation != null)
            {
                return;
            }

            var start = new ILNavigatorNavEntry(this.selection.selectedAssembly, this.selection.selectedType, this.selection.selectedMethod);

            this.navigation = new ILNavigatorHistory(start);
            this.SaveHistory();
        }
Esempio n. 2
0
 public ILNavigatorHistory(ILNavigatorNavEntry start)
 {
     this.history.Add(start);
     this.index = 0;
 }