private bool IsStepDefinition(IBindingMethod bindingMethod, Document activeDocument) { var vsBindingRegistryBuilder = new VsBindingRegistryBuilder(tracer); var stepDefinitionBinding = vsBindingRegistryBuilder.GetBindingsFromProjectItem(activeDocument.ProjectItem).FirstOrDefault(sdb => sdb.Method.MethodEquals(bindingMethod)); return(stepDefinitionBinding != null); }
protected override void Analyze(BindingFileInfo fileInfo, ProjectItem projectItem) { vsProjectScope.Tracer.Trace("Analyzing binding file: {0}", this, fileInfo.ProjectRelativePath); if (fileInfo.IsAssembly) { AnalyzeAssembly(fileInfo); } else { fileInfo.StepBindings = stepSuggestionBindingCollector.GetBindingsFromProjectItem(projectItem).ToArray(); fileInfo.LastChangeDate = VsxHelper.GetLastChangeDate(projectItem) ?? DateTime.MinValue; } }
protected override void Analyze(BindingFileInfo fileInfo, ProjectItem projectItem, out List <BindingFileInfo> relatedFiles) { relatedFiles = null; vsProjectScope.Tracer.Trace("Analyzing binding file: {0}", this, fileInfo.ProjectRelativePath); if (fileInfo.IsAssembly) { AnalyzeAssembly(fileInfo); } else { List <ProjectItem> relatedProjectItems; fileInfo.StepBindings = stepSuggestionBindingCollector.GetBindingsFromProjectItem(projectItem, out relatedProjectItems).ToArray(); relatedFiles = relatedProjectItems.Select(pi => FindFileInfo(VsxHelper.GetProjectRelativePath(pi))).Where(fi => fi != null).Distinct().ToList(); fileInfo.LastChangeDate = VsxHelper.GetLastChangeDate(projectItem) ?? DateTime.MinValue; } }