Class SpdxLicense
Represents a license registered within the Software Package Data Exchange (SPDX) standards.
Inherited Members
Namespace: TheXDS.MCART.Resources
Assembly: MCART.dll
Syntax
public class SpdxLicense : License, INameable, IEquatable<SpdxLicense>
Properties
| Edit this page View SourceSpdxShortName
Gets the short identifier of the license.
Declaration
public string SpdxShortName { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceEquals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
| Edit this page View SourceEquals(SpdxLicense)
Checks equality between two instances of the SpdxLicense class.
Declaration
public bool Equals(SpdxLicense other)
Parameters
Type | Name | Description |
---|---|---|
SpdxLicense | other | The other object to compare. |
Returns
Type | Description |
---|---|
bool | true if both instances are considered equal, false otherwise. |
FromId(SpdxLicenseId)
Gets an instance of SpdxLicense that represents a
license with the specified id
.
Declaration
public static SpdxLicense FromId(SpdxLicenseId id)
Parameters
Type | Name | Description |
---|---|---|
SpdxLicenseId | id | Id of the license to get. |
Returns
Type | Description |
---|---|
SpdxLicense | An instance of the SpdxLicense class that represents a
license with the specified |
FromName(string)
Gets an instance of SpdxLicense that represents a license with the specified name.
Declaration
public static SpdxLicense FromName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the license to get. |
Returns
Type | Description |
---|---|
SpdxLicense | An instance of the SpdxLicense class that represents a license with the specified name. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |