nuget パッケージから Postsharp 2.1 をインストールしてから、Phil Haack の NullGuard パッケージをインストールしました。
[EnsureNonNullAspect] アスペクトをクラスまたはメソッド レベルで追加すると、すぐに次のコンパイラ警告が表示されます。
Warning 1 Missing optimization information on method'
NullGuard.PostSharp.EnsureNonNullAspect.OnEntry(
PostSharp.Aspects.MethodExecutionArgs)'.
This information is computed automatically by PostSharp.
Make sure that assembly NullGuard.PostSharp is processed by PostSharp
Warning 2 Missing optimization information on method
'NullGuard.PostSharp.EnsureNonNullAspect.OnExit(
PostSharp.Aspects.MethodExecutionArgs)'.
This information is computed automatically by PostSharp.
Make sure that assembly NullGuard.PostSharp is processed by PostSharp
これは心配する必要がないかもしれませんが、次のようになります。
a) Google のどこにも答えが見つからないというコンパイラの警告が嫌いです。
b) 心配することかもしれません。
どんな助けでも大歓迎です。
乾杯!
トッド。