protected override Action <ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress) { var addStub = new AddRhinoStub(_myReference.GetName(), _myReferenceExpression, _anchor); addStub.Execute(); return(tc => { }); }
protected override void AddStub(ICSharpArgument cSharpArgument, IArgumentsOwner reference, string recommendedName) { var referenceExpression = cSharpArgument.Value as IReferenceExpression; var anchor = reference.GetContainingNode<IBlock>(); var containingMethod = anchor.Parent as IMethodDeclaration; if (containingMethod == null) return; if (!containingMethod.Attributes.Select(x => x.Name.QualifiedName).Any(x => x == "SetUp" || x == "Test" || x == "TestCase")) return; var addStub = new AddRhinoStub(recommendedName, referenceExpression, anchor); addStub.Execute(); }