Class SpdxLicenseAttribute
Marks an element with the corresponding SPDX license.
Implements
Inherited Members
Namespace: TheXDS.MCART.Attributes
Assembly: MCART.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Module|AttributeTargets.Class)]
public sealed class SpdxLicenseAttribute : LicenseAttributeBase, IValueAttribute<string>
Constructors
| Edit this page View SourceSpdxLicenseAttribute(string)
Marks the element with a custom SPDX license expression.
Declaration
public SpdxLicenseAttribute(string spdxShortIdentifier)
Parameters
Type | Name | Description |
---|---|---|
string | spdxShortIdentifier | License identifier according to the SPDX standard. |
SpdxLicenseAttribute(SpdxLicenseId)
Marks the element with a specific SPDX license.
Declaration
public SpdxLicenseAttribute(SpdxLicenseId license)
Parameters
Type | Name | Description |
---|---|---|
SpdxLicenseId | license | License with which to mark the element. |
Properties
| Edit this page View SourceId
Gets the short name of the license.
Declaration
public SpdxLicenseId? Id { get; }
Property Value
Type | Description |
---|---|
SpdxLicenseId? |
Methods
| Edit this page View SourceGetLicense(object)
Gets a license associated with this attribute.
Declaration
public override License GetLicense(object context)
Parameters
Type | Name | Description |
---|---|---|
object | context | Object from which this attribute was extracted. |
Returns
Type | Description |
---|---|
License | A license associated with this attribute. |