Class PackageDependency
A reference to a package either internal (directly to a Package inside the same solution) or external (to a package distributed on the store).
[DataContract("PackageDependency")]
public sealed class PackageDependency : PackageReferenceBase, IEquatable<PackageDependency>
- Inheritance
-
PackageDependency
- Implements
- Inherited Members
Constructors
PackageDependency()
Initializes a new instance of the PackageDependency class.
public PackageDependency()
Remarks
This constructor is used only for serialization.
PackageDependency(string, PackageVersionRange)
Initializes a new instance of the PackageDependency class.
public PackageDependency(string name, PackageVersionRange version)
Parameters
name
stringThe name.
version
PackageVersionRangeThe version.
Properties
Name
Gets or sets the package name Id.
[DataMember(10)]
public string Name { get; set; }
Property Value
- string
The name.
Remarks
The setter should only be used during serialization.
Version
Gets or sets the version.
[DataMember(20)]
public PackageVersionRange Version { get; set; }
Property Value
- PackageVersionRange
The version.
Methods
Clone()
Clones this instance.
public PackageDependency Clone()
Returns
- PackageDependency
PackageDependency.
Equals(PackageDependency)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(PackageDependency other)
Parameters
other
PackageDependencyAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
public override string ToString()
Returns
Operators
operator ==(PackageDependency, PackageDependency)
public static bool operator ==(PackageDependency left, PackageDependency right)
Parameters
left
PackageDependencyright
PackageDependency
Returns
operator !=(PackageDependency, PackageDependency)
public static bool operator !=(PackageDependency left, PackageDependency right)
Parameters
left
PackageDependencyright
PackageDependency