実行時にオブジェクト参照下で操作を追跡できるかどうか(コピー、アクセスなど)が不思議です。例えば 、私は次のコードをデバッグする場合:実行時のオブジェクト参照のトラッキング
private static void Main(string[] args)
{
// Creating new object and reference.
var myList = new List<int>();
// a) Copying a reference to method.
UpdateList(myList);
}
private static void UpdateList(IList<int> list)
{
// b) Copying the reference.
var localList = list;
// c) Accessing the object through copied reference.
localList.Add(1);
// d) Copying a reference to method.
int count = GetListElementsCount(localList);
}
private static int GetListElementsCount(IList<int> list)
{
// Another reference access.
// Breakpoint here.
return list.Count;
}
を、私はそれ(、B、C、D)に行われたlist
引数の起源や変化に目を通すことができ、GetListElementsCount
にブレークポイントを置きますか? RoslynコンパイラはこれにいくつかのC#APIを提供していますか?
ありがとうございます。
のhttpキー=メソッド呼び出しを作成するための
。 io /#Microsoft.CodeAnalysis/Compilation/DataFlowAnalysis.cs – SLaks