Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 asp.net mvc 中获取操作过滤器的功能,您可以在方法执行和发布方法调用之前调用和操作操作参数以更新/查看返回类型数据,但在标准 c# 类库类方法中?
这听起来很像面向方面的编程。PostSharp是一个可以帮助您实现目标的工具示例。一个常见的例子是有一个类 auto-implement INotifyPropertyChanged,这很无聊或乏味,或者在方法调用之前和之后吐出一堆日志语句,而无需在代码中手动编写该工具。
INotifyPropertyChanged
希望这能让你走上正轨。