SolutionLoad Method (String, LoadOptions, ActionLoadStatus, CodeObject) |
Load the specified
Solution file, including all child
Projects and code files.
Namespace:
Nova.CodeDOM
Assembly:
Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax public static Solution Load(
string fileName,
LoadOptions loadOptions = LoadOptions.Complete,
Action<LoadStatus, CodeObject> statusCallback = null
)
Parameters
- fileName
- Type: SystemString
The solution (".sln") file. - loadOptions (Optional)
- Type: Nova.CodeDOMLoadOptions
Determines various optional processing. - statusCallback (Optional)
- Type: SystemActionLoadStatus, CodeObject
Status callback for monitoring progress.
Return Value
Type:
SolutionThe resulting
Solution object, or null if the file didn't exist.
Remarks
A 'Complete' load of a Solution goes through the following steps:
- Parse the Solution file, creating a Solution object and a list of ProjectEntry objects.
- Parse each Project file, creating a Project object and loading the lists of References and code files (CodeUnits).
- Resolve all References for each project, and determine the project dependencies.
- Load all referenced assemblies for each project (in dependency order).
- Load all types from all referenced assemblies for each project (in dependency order).
- Parse all code files for each project (in dependency order), first loading all types from any referenced projects.
- Resolve all symbolic references in all code files for each project (in dependency order).
The 'LoadOnly' option stops this process after parsing the Solution and Project files and resolving References, which
is useful if only the solution and/or project files are 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