Code Examples Analyzer Class
Analyzes code examples by executing exemplified code
and capturing output and error information.
Definition
Namespace: Novacta.Documentation.CodeExamples
Assembly: Novacta.Documentation.CodeExamples (in Novacta.Documentation.CodeExamples.dll) Version: 2.0.0+d0711904e187765f05e6dc698044fce33381798b
Assembly: Novacta.Documentation.CodeExamples (in Novacta.Documentation.CodeExamples.dll) Version: 2.0.0+d0711904e187765f05e6dc698044fce33381798b
C#
public class CodeExamplesAnalyzerVB
Public Class CodeExamplesAnalyzerC++
public ref class CodeExamplesAnalyzerF#
type CodeExamplesAnalyzer = class end- Inheritance
- Object CodeExamplesAnalyzer
Remarks
This class is responsible for analyzing code examples by executing them and capturing the output and error information.
Syncrhonous and asynchronous code examples are supported, provided that they implement the ICodeExample interface, or the IAsyncCodeExample one, respectively.
To analyze synchronous code examples, method Run(Boolean, Assembly) must be called from a synchronous context; to analyze asynchronous code examples, method RunAsync(Boolean, Assembly) must be called.
Constructors
| CodeExamplesAnalyzer | Initializes a new instance of the CodeExamplesAnalyzer class with the specified default namespace and code base. |
Properties
| CodeBase | Gets or sets the root path of the directory tree where code example files are stored. |
| DefaultNamespace | Gets or sets the default namespace of the project which includes the example source code files. |
Methods
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| Run(Boolean) |
Runs synchronous code examples
defined in the entry
assembly for the running application,
and writes to files their console outputs together with
the corresponding source code, if available.
|
| Run(Boolean, Assembly) | Runs synchronous code examples defined in the specified assembly, if any, or in the entry assembly otherwise, and writes to files their console outputs together with the corresponding source code, if available. |
| RunAsync | Runs asynchronous code examples defined in the specified assembly, if any, or in the entry assembly otherwise, and writes to files their console outputs together with the corresponding source code, if available. |
| ToString | Returns a string that represents the current object. (Inherited from Object) |