我正在寫一個C#類庫,其中包含許多功能類都相同的類。我需要提供關於每個類中的函數參數的XML註釋,這些註釋非常詳細,但在大多數情況下是相同的。有沒有重用XML註釋的方法,所以我不必在我的程序集中重複這些XML參數定義?C#XML評論重用
這是我班的一個示例:
public class IsodoseControl : TestModule
{
/// <summary>
/// Verify a control on Isodose dialog
/// </summary>
/// <param name="args"> **<-- WHAT I DON'T WANT TO KEEP REPEATING**
/// Arguments: [Property, Condition, Expected Value, Tolerance]
/// Properties: STATE, VALUE, LABEL
/// Conditions: Exists, DoesNotExist, IsEnabled, IsDisabled, ...
/// Expected Value (optional): blah blah
/// Tolerance (optional): blah blah blah
/// </param>
public VerifResult VerifyIsodoseControl(string[] args)
{
...
}
}
public class BeamControl : TestModule
{
/// <summary>
/// Verify a control on Beam dialog
/// </summary>
/// <param name="args"> **<-- WHAT I DON'T WANT TO KEEP REPEATING**
/// Arguments: [Property, Condition, Expected Value, Tolerance]
/// Properties: STATE, VALUE, LABEL
/// Conditions: Exists, DoesNotExist, IsEnabled, IsDisabled, ...
/// Expected Value (optional): blah blah
/// Tolerance (optional): blah blah blah
/// </param>
public VerifResult VerifyBeamControl(string[] args)
{
...
}
}
感謝