Exemple #1
0
        public async Task GetSpecificEditorAsync_WhenNoDefaultProjectSpecificEditorProviders_ReturnsNull()
        {
            var editorProvider = IProjectSpecificEditorProviderFactory.ImplementGetSpecificEditorAsync();
            var provider       = CreateInstance();

            provider.ProjectSpecificEditorProviders.Add("NotDefault", editorProvider);

            var result = await provider.GetSpecificEditorAsync(@"C:\Foo.cs");

            Assert.Null(result);
        }
Exemple #2
0
        private static WindowsFormsEditorProvider CreateInstanceWithDefaultEditorProvider(string projectTree, IProjectSystemOptions options = null, Guid defaultEditorFactory = default)
        {
            var tree = ProjectTreeParser.Parse(projectTree);

            var defaultEditorProvider = IProjectSpecificEditorProviderFactory.ImplementGetSpecificEditorAsync(defaultEditorFactory);

            var provider = CreateInstance(projectTree: IPhysicalProjectTreeFactory.Create(currentTree: tree), options: options);

            provider.ProjectSpecificEditorProviders.Add("Default", defaultEditorProvider);

            return(provider);
        }