コード例 #1
0
ファイル: RecordMethods.cs プロジェクト: csuffyy/MrAdvice
 public void Advise(MethodInfoAdviceContext context)
 {
     var methodInfo = context.TargetMethod as MethodInfo;
     if (methodInfo != null)
         MethodInfos.Add(methodInfo);
 }
コード例 #2
0
 public void Advise(MethodInfoAdviceContext context)
 {
     var methodInfo = context.TargetMethod as MethodInfo;
     if (methodInfo != null && methodInfo.ReturnType != (typeof(void)))
         throw new InvalidOperationException("ExclusiveUpdate can only be applied to void methods");
 }