internal DirectiveCollectionViewModel(ProjectSnapshot project) { _project = project; Directives = new ObservableCollection <DirectiveItemViewModel>(); var feature = _project.GetProjectEngine().EngineFeatures.OfType <IRazorDirectiveFeature>().FirstOrDefault(); foreach (var directive in feature?.Directives ?? Array.Empty <DirectiveDescriptor>()) { Directives.Add(new DirectiveItemViewModel(directive)); } }
public override Task <TagHelperResolutionResult> GetTagHelpersAsync(ProjectSnapshot project, CancellationToken cancellationToken = default) { if (project == null) { throw new ArgumentNullException(nameof(project)); } if (project.Configuration == null || project.WorkspaceProject == null) { return(Task.FromResult(TagHelperResolutionResult.Empty)); } return(GetTagHelpersAsync(project, project.GetProjectEngine())); }