This class is sued to parse Visual Studio generated XML containing class documentation, and use this to lookup summary comments on class members, so they can be used as tool-tips at runtime. This class requires some very specific setup is done for it to function properly. It requires that an XML file containing the documentation be present, either in the asset folder, or embedded within a DLL. The name of the xml file name is either extracted from provided type's assembly name, or from a member in that type named "XMLTooltipFileNameHint" (which is accessed via reflection).
Static Public Member Functions | |
static string | GetClassMemberNodeFromXMLinDLL (System.Reflection.Assembly containingAssm, string nameSpace, string XmlFileNameinDLL, string classNameMemberName, string nodeName, bool removeWhitespace=true, bool removeCRLF=true) |
Will attempt to extract the classNameMemberName xml Summary data from the file embedded in the dll that defines the provided containingAssm Assembly. Automatically unzips contents of files that end with the ".gzip" extension. | |
static string | GetClassMemberNodeFromXMLinFile (string XmlFilePathAndName, string classNameMemberName, string nodeName, bool removeWhitespace=true, bool removeCRLF=true) |
Assumes the XML file required is present in the asset folder, logs an error if not found. Finds, in the file, the member with the specified name, and returns the xml summary element found for it. If Unable to find the specified XmlNode, it will return a string explaining where the lookup failed. | |
static string | GetDocNodeForField (System.Reflection.FieldInfo field, string nodeName, bool removeWhitespace=true, bool removeCRLF=true) |
Given a fieldInfo, computes the path information for and invokes the appropriate GetClassMemberSummaryFromXMLinXXXX function. | |
static string | GetLabelForField (this System.Type declaringType, string fieldName) |
The specified fieldName is used to find a field in the provided Type. It uses this fieldInfo to invoke the GetToolTipForField function that takes a FieldInfo parameter for further extraction. | |
static string | GetToolTipForField (this System.Type declaringType, string fieldName) |
The specified fieldName is used to find a field in the provided Type. It uses this fieldInfo to invoke the GetToolTipForField function that takes a FieldInfo parameter for further extraction. | |
static void | RegisterClassWithXMLTooltipFile (System.Type typeToRegister, string filePath) |
Classes found in DLL's will automatically look for the appropriate XML files. Use this function when the class you want the tool tips for is NOT in a dll. For example, when you have generated XML documentation, that you would like to use in the same project. | |