Exemplo n.º 1
0
        public ConfiguredDocument(Solution solution, DocumentId documentId, IEditorConfigProvider configProvider)
        {
            workspace = solution.Workspace;

            document = new Lazy <Document>(() =>
            {
                var result = solution.GetDocument(documentId);
                var config = configProvider.GetConfiguration(result);
                if (config != null)
                {
                    optionsToBeRestored = workspace.Options;
                    ConfigureWorkspaceForDocument(result, config);
                }

                return(result);
            });
        }
 public ConfiguredAdditionalDocument(Solution solution, DocumentId documentId, IEditorConfigProvider configProvider)
 {
     document      = new Lazy <TextDocument>(() => solution.GetAdditionalDocument(documentId));
     configuration = new Lazy <FileConfiguration>(() => configProvider.GetConfiguration(Value));
 }