Class XmlDocumentationProvider
- Namespace
- ICSharpCode.Decompiler.Documentation
- Assembly
- ICSharpCode.Decompiler.dll
Provides documentation from an .xml file (as generated by the Microsoft C# compiler).
public class XmlDocumentationProvider : IDeserializationCallback, IDocumentationProvider
- Inheritance
-
XmlDocumentationProvider
- Implements
- Inherited Members
Remarks
This class first creates an in-memory index of the .xml file, and then uses that to read only the requested members. This way, we avoid keeping all the documentation in memory. The .xml file is only opened when necessary, the file handle is not kept open all the time. If the .xml file is changed, the index will automatically be recreated.
Constructors
XmlDocumentationProvider(string)
Creates a new XmlDocumentationProvider.
public XmlDocumentationProvider(string fileName)
Parameters
fileName
stringName of the .xml file.
Exceptions
- IOException
Error reading from XML file (or from redirected file)
- XmlException
Invalid XML file
Methods
GetDocumentation(IEntity)
Get the documentation for the specified member.
public string GetDocumentation(IEntity entity)
Parameters
entity
IEntity
Returns
GetDocumentation(string)
Get the documentation for the member with the specified documentation key.
public string GetDocumentation(string key)
Parameters
key
string
Returns
OnDeserialization(object)
public virtual void OnDeserialization(object sender)
Parameters
sender
object