protected override Declaration FindTargetDeclaration(QualifiedSelection targetSelection) { var candidates = _declarationFinderProvider.DeclarationFinder .Members(targetSelection.QualifiedName) .Where(item => ModuleTypes.Contains(item.DeclarationType)); return(candidates.SingleOrDefault(item => item.QualifiedSelection.QualifiedName.Equals(targetSelection.QualifiedName))); }
protected override ExtractInterfaceModel InitializeModel(Declaration target) { if (target == null) { throw new TargetDeclarationIsNullException(); } if (!ModuleTypes.Contains(target.DeclarationType)) { throw new InvalidDeclarationTypeException(target); } return(new ExtractInterfaceModel(_declarationFinderProvider, target)); }