Exemplo n.º 1
0
        public CsvEditSharpWorkspace(ICsvEditSharpConfigurationHost host, IList <string> errorMessages)
        {
            this.host          = host;
            this.errorMessages = errorMessages;

            workspace = new AdhocWorkspace(MefHostServices.Create(MefHostServices.DefaultAssemblies));

            var projectId = ProjectId.CreateNewId();

            documentId = DocumentId.CreateNewId(projectId);

            projectInfo = ProjectInfo.Create(
                projectId, VersionStamp.Create(), "CsvEditorConfig", "CsvEditorConfig", LanguageNames.CSharp, isSubmission: true)
                          .WithMetadataReferences(
                referenceTypes
                .Select(t => t.Assembly.Location)
                .Distinct()
                .Select(file => MetadataReference.CreateFromFile(file)).ToArray())
                          .WithCompilationOptions(
                new CSharpCompilationOptions(
                    OutputKind.DynamicallyLinkedLibrary,
                    usings: referenceTypes.Select(t => t.Namespace).Distinct()));
        }
Exemplo n.º 2
0
 public CsvEditSharpWorkspace(ICsvEditSharpConfigurationHost host, IList <string> errorMessages)
 {
     _host          = host;
     _errorMessages = errorMessages;
 }