Wiki

Clone wiki

C# RuleDocs / IDocumented

Home

#IDocumented This interface indicates that the class has documentation generation capabilities; and has only one requirement.

###RuleData CreateDocumentation() This method will have the class instance generate an intermediary class (RuleData) that gathers the documentation data that will be used to generate the final documentation.

##QuickStart There are four main methods we need to use when creating documentation:

###public static RuleData Construct<T>(string name, string description, T caller)

This is used to construct the RuleData instance that contains basic documentation in the current class.

###public RuleData AddData<T>(string key, T value)

This will add one piece of data to the RuleData instance. The passed in value will be converted to a string. The value will be associated with the key.

###public RuleData AddChild(IDocumented rule) ###public RuleData AddChild<T>(T rule)

These two methods create documentation for the instances contained by the current class. The RuleData they return contains the documentation for the child. This allows the current rule to call AddData() on the child class if it wishes to do so.

See RuleData for more information on the above methods.

See Example for an example using these methods.

Updated