public AssemblyReferenceViewModel(Assembly assembly, IReplExecutor replExecutor)
 {
     this.assembly = assembly;
     assemblyName = assembly.GetName();
     Available = true;
     this.replExecutor = replExecutor;
 }
        public AssemblyReferencesViewModel(IReplExecutor replExecutor)
        {
            this.replExecutor = replExecutor;
            DisplayName = "Loaded References";

            replExecutor.AssemblyReferencesChanged += ReplExecutorOnAssemblyReferencesChanged;
            Reload();
        }
        public AssemblyReferenceViewModel(string filePath, IReplExecutor replExecutor)
        {
            if (filePath.EndsWith(".dll") || filePath.EndsWith(".exe"))
            {
                this.filePath = filePath; //PathHelper.ToRelativePath(replExecutor.WorkspaceDirectory, filePath);
                assemblyName = new AssemblyName(Path.GetFileNameWithoutExtension(filePath));
                FullPath = PathHelper.ToAbsolutePath(Environment.CurrentDirectory, this.filePath);
                Available = File.Exists(FullPath);
            }
            else
            {
                this.filePath = filePath;
                assemblyName = new AssemblyName(filePath);
                Available = true;
            }

            this.replExecutor = replExecutor;
        }
Esempio n. 4
0
        public void SetWorkspaceDirectory(string dir)
        {
            if (!String.IsNullOrEmpty(WorkspaceDirectory))
            {
                //run teardown script
                //try to save the layout
                SaveLayout();
            }

            replExecutor = null;
            WorkspaceDirectory = dir;

            if (!String.IsNullOrEmpty(WorkspaceDirectory))
            {
                WorkspaceDirectory = Path.GetFullPath(WorkspaceDirectory);
                //create executor
                replExecutor = replExecutorFactory.Create(WorkspaceDirectory);
                //restore layout
                LoadLayout();

                //load libs

                //run startup scripts
            }

            NotifyOfPropertyChange(() => WorkspaceDirectory);
            NotifyOfPropertyChange(() => ReplExecutor);
        }
Esempio n. 5
0
 public void Initialize(IReplExecutor replExecutor)
 {
     Execute.OnUIThread(() => internalRepl.Initialize(replExecutor));
 }
Esempio n. 6
0
 public void Initialize(IReplExecutor replExecutor)
 {
     //unhook old executor
     this.replExecutor = replExecutor;
     this.textEditor.Completion = replExecutor.ReplCompletion;
     Clear();
     textEditor.IsEnabled = true;
 }