Adds a source code file to this documentation set. Creates an instance of the correct subclass of SourceFile based on the extension of a given source file name.
Parent Type: DocumentationSet
Namespace: DwellNet.CodeDoc
Assembly: CodeDocApi.dll
| C# |
|
public SourceFile AddSourceFile ( ) |
sourceFileAbsolutePath
The value to initialize the SourceFile.SourceFileAbsolutePath property to.
sourceFileRelativePath
The value to initialize the SourceFile.SourceFileRelativePath property to.
assemblyName
Specifies the name of the assembly that contains the code compiled from these source files, or null to specify none. If specified, the assembly name is included in topic HTML.
The subclass of SourceFile that was created to represent the specified source file. The returned object is added to this documentation set.
| Exception type | Condition |
| ArgumentException | The file name extension of sourceFileAbsolutePath and sourceFileRelativePath isn't supported, or these two arguments have different exensions. In the former case, the exception message provides further information for the user. |
The programming language of the source file is determined based on the file name extension of sourceFileAbsolutePath and sourceFileRelativePath (which must be the same for both files). Currently, only C# source files, with an extension of ".cs", are supported.