namespace Umbraco.Core.Deploy { /// /// Represent the state of an artifact being deployed. /// public abstract class ArtifactDeployState { /// /// Creates a new instance of the class from an artifact and an entity. /// /// The type of the artifact. /// The type of the entity. /// The artifact. /// The entity. /// The service connector deploying the artifact. /// The next pass number. /// A deploying artifact. public static ArtifactDeployState Create(TArtifact art, TEntity entity, IServiceConnector connector, int nextPass) where TArtifact : IArtifact { return new ArtifactDeployState(art, entity, connector, nextPass); } /// /// Gets the artifact. /// public IArtifact Artifact { get { return GetArtifactAsIArtifact(); } } /// /// Gets the artifact as an . /// /// The artifact, as an . /// This is because classes that inherit from this class cannot override the Artifact property /// with a property that specializes the return type, and so they need to 'new' the property. protected abstract IArtifact GetArtifactAsIArtifact(); /// /// Gets or sets the service connector in charge of deploying the artifact. /// public IServiceConnector Connector { get; set; } /// /// Gets or sets the next pass number. /// public int NextPass { get; set; } } }