I am trying to customize the PostSharp RunOutOfProcessAttribute aspect so that it applies to:
- all public methods
- any method marked with
DoSpecialFunctionAttribute , regardless of the accessibility of the participant (public / protected / private / whatever).
So far, my RunOutOfProcessAttribute is defined as follows:
[Serializable] [MulticastAttributeUsage(MulticastTargets.Method, TargetMemberAttributes = MulticastAttributes.Public)] [AttributeUsage(AttributeTargets.Class)] public class RunOutOfProcessAttribute : MethodInterceptionAspect { public override void OnInvoke(MethodInterceptionArgs args) { ... } }
MulticastAttributeUsageAttribute should already meet criterion 1 above, but I donโt know how to fulfill criterion 2, not just duplicating the behavior of the existing aspect into a new attribute.
How can I apply this aspect to any method marked with DoSpecialFunctionAttribute , regardless of the accessibility of the participant (public / protected / private / whatever)?
source share