Class VsReference
Data model that presents a visual studio reference that has been loaded.
Inherited Members
Namespace: CodeFactory.VisualStudio
Assembly: CodeFactory.VisualStudio.dll
Syntax
public abstract class VsReference : VsModel, IVsReference, IVsModel, IModel<VisualStudioModelType>
Constructors
| Improve this Doc View SourceVsReference(bool, bool, IReadOnlyList<ModelException<VisualStudioModelType>>, string, string, ProjectReferenceType, IReadOnlyList<string>)
Constructor for the base class VsModel
Declaration
protected VsReference(bool isLoaded, bool hasErrors, IReadOnlyList<ModelException<VisualStudioModelType>> modelErrors, string name, string filePath, ProjectReferenceType type, IReadOnlyList<string> aliases)
Parameters
Type | Name | Description |
---|---|---|
bool | isLoaded | Flag that determines if the model is loaded. |
bool | hasErrors | Flag that determines if errors occurred while loading the model. |
IReadOnlyList<ModelException<VisualStudioModelType>> | modelErrors | The list of errors that occurred if any. |
string | name | The name of the model. |
string | filePath | The fully qualified file path to the reference |
ProjectReferenceType | type | The type of reference that is set for the project. |
IReadOnlyList<string> | aliases | Readonly list of the aliases assigned to this reference. |
Properties
| Improve this Doc View SourceAliases
Readonly list of the aliases assigned to this reference.
Declaration
public IReadOnlyList<string> Aliases { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
FilePath
The fully qualified path to the source reference.
Declaration
public string FilePath { get; }
Property Value
Type | Description |
---|---|
string |
HasAliases
Flag that determines if the reference has aliases.
Declaration
public bool HasAliases { get; }
Property Value
Type | Description |
---|---|
bool |
Type
The type of the project reference.
Declaration
public ProjectReferenceType Type { get; }
Property Value
Type | Description |
---|---|
ProjectReferenceType |
Methods
| Improve this Doc View SourceGetReferencedProjectAsync()
Gets the VsProject model for the project that represents this reference.
Declaration
public abstract Task<VsProject> GetReferencedProjectAsync()
Returns
Type | Description |
---|---|
Task<VsProject> | The loaded project model or null if the reference does not support a project based reference. |