IntelliTraceを使用すると、メソッドへの参照によって渡された文字列の出力と、同じイベント(またはまったく)のメソッドの結果を見ることができません。IntelliTraceの引数リファレンスによる参照
方法例:
<DiagnosticEventSpecification>
<CategoryId>stackoverflow.test.application</CategoryId>
<SettingsName _locID="settingsName.Test.Application.Reference">VerifyIDFromBackEnd called</SettingsName>
<SettingsDescription _locID="settingsDescription.Test.Application.Reference">VerifyIDFromBackEnd was called</SettingsDescription>
<Bindings>
<Binding onReturn="false">
<ModuleSpecificationId>stackoverflow.test.application</ModuleSpecificationId>
<MethodName>ByReferenceTestMethod</MethodName>
<MethodId>Test.Application.TestClass.ByReferenceTestMethod(System.ArgumentException,System.String&):System.Boolean</MethodId>
<ShortDescription _locID="shortDescription.Test.Application.Reference.called">Method 'ByReferenceTestMethod' called</ShortDescription>
<LongDescription _locID="longDescription.Test.Application.Reference.called">ByReferenceTestMethod called with ArgumentException parameter name "{0}" and message "{1}"</LongDescription>
<TypeName>Test.Application.TestClass</TypeName>
<DataQueries>
<DataQuery index="1" maxSize="2048" type="String" name="Exception parameter" _locID="dataquery.Test.Application.Reference.exception.Paramname" query="m_paramName" />
<DataQuery index="1" maxSize="2048" type="String" name="Exception message" _locID="dataquery.Test.Application.Reference.exc5eption.Message" _locAttrData="name" query="_message" />
</DataQueries>
</Binding>
<Binding onReturn="true">
<ModuleSpecificationId>stackoverflow.test.application</ModuleSpecificationId>
<MethodName>ByReferenceTestMethod</MethodName>
<MethodId>Test.Application.TestClass.ByReferenceTestMethod(System.Exception,System.String&):System.Boolean</MethodId>
<ShortDescription _locID="shortDescription.Test.Application.Reference.result">Method 'ByReferenceTestMethod' completed</ShortDescription>
<LongDescription _locID="longDescription.Test.Application.Reference.result">ByReferenceTestMethod returned result "{0}" with an unknown referenceArgument</LongDescription>
<TypeName>Test.Application.TestClass</TypeName>
<DataQueries>
<DataQuery index="-1" maxSize="0" type="Boolean" name="Reference Result" _locID="dataquery.Test.Application.Reference.result" _locAttrData="name" query="" />
</DataQueries>
</Binding>
</Bindings>
</DiagnosticEventSpecification>
collectionplan.xml例では、参照引数参照して動作していない:
<LongDescription _locID="longDescription.Test.Application.Reference.result">ByReferenceTestMethod returned result "{0}" with referenceArgument "{1}"</LongDescription>
<TypeName>Test.Application.TestClass</TypeName>
<DataQueries>
<DataQuery index="-1" maxSize="0" type="Boolean" name="Reference Result" _locID="dataquery.Test.Application.Reference.result" _locAttrData="name" query="" />
<DataQuery index="2" maxSize="4096" type="String" name="referenceArgument" _locID="dataquery.Test.Application.Reference.Reference.Value" _locAttrData="name" query="" />
</DataQueries>
この参照引数参照することなく作業
public bool ByReferenceTestMethod(System.ArgumentNullException exception, ref string referenceArgument)
{
referenceArgument = string.Format("referenceArgument{0}", exception.Message);
return true;
}
collectionplan.xml例解決されたマーカーのないLongDescriptionを表示し、I chメッセージ自体がまったく表示されない順序を設定します。
私は理解しているので、メソッドが戻るまでイベントが評価されないため、onResult = "true"のときにrefが表示されるはずです。 onResult = "false"データクエリで同じ引数を使用すると、メソッドによって値が設定される前に評価されます。
私は間違っていますか?