Class ArtifactBase<TUdi>
Provides a base class for all artifacts.
Inheritance
Namespace: Umbraco.Cms.Core.Deploy
Assembly: Umbraco.Core.dll
Syntax
public abstract class ArtifactBase<TUdi> : IArtifact, IArtifactSignature where TUdi : Udi
Type Parameters
Name | Description |
---|---|
TUdi | The UDI type. |
Constructors
View SourceArtifactBase(TUdi, Nullable<IEnumerable<ArtifactDependency>>)
Initializes a new instance of the ArtifactBase<TUdi> class.
Declaration
protected ArtifactBase(TUdi udi, IEnumerable<ArtifactDependency>? dependencies = null)
Parameters
Type | Name | Description |
---|---|---|
TUdi | udi | The UDI. |
System.Nullable<IEnumerable<ArtifactDependency>> | dependencies | The dependencies. |
Properties
View SourceAlias
Gets the alias.
Declaration
public string Alias { get; set; }
Property Value
Type | Description |
---|---|
System.String | The alias. |
Checksum
Gets the checksum of this artifact.
Declaration
public string Checksum { get; }
Property Value
Type | Description |
---|---|
System.String | The checksum. |
Remarks
The checksum depends on the artifact's properties, and on the identifiers of all its dependencies, but not on their checksums. So the checksum changes when any of the artifact's properties changes, or when the list of dependencies changes. But not if one of these dependencies change.
It is assumed that checksum collisions cannot happen ie that no two different artifact's states will ever produce the same checksum, so that if two artifacts have the same checksum then they are identical.
Dependencies
Gets the dependencies of this artifact.
Declaration
public IEnumerable<ArtifactDependency> Dependencies { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<ArtifactDependency> | The dependencies. |
Name
Gets the name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Udi
Declaration
public TUdi Udi { get; set; }
Property Value
Type | Description |
---|---|
TUdi |
Methods
View SourceGetChecksum()
Gets the checksum.
Declaration
protected abstract string GetChecksum()
Returns
Type | Description |
---|---|
System.String | The checksum. |
Explicit Interface Implementations
View SourceIArtifactSignature.Udi
Gets the entity unique identifier of this artifact.
Declaration
Udi IArtifactSignature.Udi { get; }
Returns
Type | Description |
---|---|
Udi | The udi. |
Remarks
The project identifier is independent from the state of the artifact, its data values, dependencies, anything. It never changes and fully identifies the artifact.
What an entity uses as a unique identifier will influence what we can transfer between environments. Eg content type "Foo" on one environment is not necessarily the same as "Foo" on another environment, if guids are used as unique identifiers. What is used should be documented for each entity, along with the consequences of the choice.