ProjectLoad Method (String, LoadOptions, ActionLoadStatus, CodeObject) |
Load the specified
Project file and all child code files directly (without a
Solution).
Namespace:
Nova.CodeDOM
Assembly:
Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax public static Project Load(
string fileName,
LoadOptions loadOptions = LoadOptions.Complete,
Action<LoadStatus, CodeObject> statusCallback = null
)
Parameters
- fileName
- Type: SystemString
The project ('.csproj') file. - loadOptions (Optional)
- Type: Nova.CodeDOMLoadOptions
Determines various optional processing. - statusCallback (Optional)
- Type: SystemActionLoadStatus, CodeObject
Status callback for monitoring progress.
Return Value
Type:
ProjectThe resulting
Project object.
Remarks
Loading a Project directly goes through the following steps:
- Parse the Project file, creating a Project object and loading the lists of References and code files (CodeUnits).
- Resolve all References for the project.
- Load all referenced assemblies.
- Load all types from all referenced assemblies.
- Parse all code files.
- Resolve all symbolic references in all code files.
The 'LoadOnly' option stops this process after parsing the Project file and resolving References, which is useful
if only the project file itself is being viewed, analyzed, or edited. The 'DoNotResolve' option skips resolving
symbolic references, which is useful if that step is not required, such as when only formatting code or calculating
metrics which don't rely on resolved references.
See Also