コードテンプレートを作成するときにリフレクションを使用することは可能ですか?
Visual Stuudioの&&演算子で区切られたクラス内のすべてのプライベートフィールドのリストを返すコードテンプレートを作成できるかどうかを考えていましたか?
たとえば、VSエディターで「getAllPrivates &&」と入力すると(またはショートカットキーを押すと)、次のように返されます。
private bool _privateFiel1 = false;
private bool _privateFiel2 = true;
private bool _privateFiel3 = false;
private bool _privateFiel4 = false;
private bool _privateFiel5 = true;
// Here I press the shortcut or call the code-template and get his:
_privateFiel1 && _privateFiel2 && _privateFiel3 && _privateFiel4 && _privateFiel5