We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Aspect(Scope.Global)] [Injection(typeof(WriteConsoleAttribute))] [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public class WriteConsoleAttribute : Attribute { [Advice(Kind.After, Targets = Target.Setter)] public void WriteLine([Argument(Source.Arguments)] Object[] args) { Console.WriteLine(String.Join(';', args)); } }
private Int32 _lineCount; public Int32 LineCount { get => _lineCount; [WriteConsole] set { if (_lineCount != value) { _lineCount = value; LineBet = value * BetPerLine; } } }
The text was updated successfully, but these errors were encountered:
In this case I assume (I can't check right now) it treats setter as a method. So you can either
Anyway, it is workaround. This should be fixed. Thanks for the report
Sorry, something went wrong.
fixed #80 and #79
8ec85b9
fixed in 2.0.1
setter and getter are methods, so if you want to inject like this
[WriteConsole] set
you need to have your advice target set to Method
[Advice(Kind.After, Targets = Target.Method)]
No branches or pull requests
The text was updated successfully, but these errors were encountered: