public GenerateTypeTestState( string initial, bool isLine, string projectToBeModified, string typeName, string existingFileName, string languageName) : this(projectToBeModified, typeName, existingFileName, languageName == LanguageNames.CSharp ? isLine ? CSharpWorkspaceFactory.CreateWorkspaceFromFile(initial, exportProvider : s_exportProvider) : CSharpWorkspaceFactory.CreateWorkspace(initial, exportProvider : s_exportProvider) : isLine ? VisualBasicWorkspaceFactory.CreateWorkspaceFromFile(initial, exportProvider : s_exportProvider) : VisualBasicWorkspaceFactory.CreateWorkspace(initial, exportProvider : s_exportProvider)) { }
private static TestWorkspace CreateWorkspaceFromFile(string source, string language, string rootNamespace) { if (language == LanguageNames.CSharp) { return(CSharpWorkspaceFactory.CreateWorkspaceFromFile(source)); } else { return(VisualBasicWorkspaceFactory.CreateWorkspaceFromFile( source, compilationOptions: new VisualBasic.VisualBasicCompilationOptions( OutputKind.DynamicallyLinkedLibrary, rootNamespace: rootNamespace))); } }
public ChangeSignatureTestState(string markup, string languageName, ParseOptions parseOptions = null) : this(languageName == LanguageNames.CSharp ? CSharpWorkspaceFactory.CreateWorkspaceFromFile(markup, exportProvider : s_exportProvider, parseOptions : (CSharpParseOptions)parseOptions) : VisualBasicWorkspaceFactory.CreateWorkspaceFromFile(markup, exportProvider : s_exportProvider, parseOptions : parseOptions, compilationOptions : new VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary))) { }
private static TestWorkspace CreateWorkspaceFromFile(string file, bool isVisualBasic, ParseOptions parseOptions, CompilationOptions compilationOptions) { return(isVisualBasic ? VisualBasicWorkspaceFactory.CreateWorkspaceFromFile(file, (VB.VisualBasicParseOptions)parseOptions, (VB.VisualBasicCompilationOptions)compilationOptions) : CSharpWorkspaceFactory.CreateWorkspaceFromFile(file, (CS.CSharpParseOptions)parseOptions, (CS.CSharpCompilationOptions)compilationOptions)); }
public ExtractInterfaceTestState(string markup, string languageName, CompilationOptions compilationOptions) : this(languageName == LanguageNames.CSharp ? CSharpWorkspaceFactory.CreateWorkspaceFromFile(markup, exportProvider : ExportProvider, compilationOptions : compilationOptions as CSharpCompilationOptions) : VisualBasicWorkspaceFactory.CreateWorkspaceFromFile(markup, exportProvider : ExportProvider, compilationOptions : compilationOptions)) { }