Interface IServiceConnector
Connects to an Umbraco service.
Namespace: Umbraco.Cms.Core.Deploy
Assembly: Umbraco.Core.dll
Syntax
public interface IServiceConnector : IDiscoverable
Methods
View SourceCompare(IArtifact, IArtifact, Nullable<ICollection<Difference>>)
Compares two artifacts.
Declaration
bool Compare(IArtifact art1, IArtifact art2, ICollection<Difference>? differences = null)
Parameters
Type | Name | Description |
---|---|---|
IArtifact | art1 | The first artifact. |
IArtifact | art2 | The second artifact. |
System. |
differences | A collection of differences to append to, if not |
Returns
Type | Description |
---|---|
System. |
A boolean value indicating whether the artifacts are identical. |
ExpandRangeAsync(UdiRange, CancellationToken)
Expands an UDI range into UDIs.
Declaration
virtual async IAsyncEnumerable<Udi> ExpandRangeAsync(UdiRange range, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Udi |
range | The UDI range. |
Cancellation |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
IAsync |
Returns an |
Explode(UdiRange, List<Udi>)
Explodes/expands an UDI range into UDIs.
Declaration
void Explode(UdiRange range, List<Udi> udis)
Parameters
Type | Name | Description |
---|---|---|
Udi |
range | The UDI range. |
List<Udi> | udis | The list of UDIs where to add the exploded/expanded UDIs. |
GetArtifact(Object, IContextCache)
Gets an artifact.
Declaration
IArtifact GetArtifact(object entity, IContextCache contextCache)
Parameters
Type | Name | Description |
---|---|---|
System. |
entity | The entity. |
IContext |
contextCache | The context cache. |
Returns
Type | Description |
---|---|
IArtifact | The corresponding artifact. |
GetArtifact(Udi, IContextCache)
Gets an artifact.
Declaration
IArtifact GetArtifact(Udi udi, IContextCache contextCache)
Parameters
Type | Name | Description |
---|---|---|
Udi | udi | The entity identifier of the artifact. |
IContext |
contextCache | The context cache. |
Returns
Type | Description |
---|---|
IArtifact | The corresponding artifact or |
GetArtifactAsync(Object, IContextCache, CancellationToken)
Gets an artifact.
Declaration
virtual Task<IArtifact> GetArtifactAsync(object entity, IContextCache contextCache, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
entity | The entity. |
IContext |
contextCache | The context cache. |
Cancellation |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IArtifact> | A task that represents the asynchronous operation. The task result contains the corresponding artifact. |
GetArtifactAsync(Udi, IContextCache, CancellationToken)
Gets an artifact.
Declaration
virtual Task<IArtifact> GetArtifactAsync(Udi udi, IContextCache contextCache, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Udi | udi | The entity identifier of the artifact. |
IContext |
contextCache | The context cache. |
Cancellation |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IArtifact> | A task that represents the asynchronous operation. The task result contains the corresponding artifact or |
GetRange(String, String, String)
Gets a named range for specified entity type, identifier and selector.
Declaration
NamedUdiRange GetRange(string entityType, string sid, string selector)
Parameters
Type | Name | Description |
---|---|---|
System. |
entityType | The entity type. |
System. |
sid | The identifier. |
System. |
selector | The selector. |
Returns
Type | Description |
---|---|
Named |
The named range for the specified entity type, identifier and selector. |
Remarks
This is temporary. At least we thought it would be, in sept. 2016. What day is it now?
At the moment our UI has a hard time returning proper UDIs, mainly because Core's tree do not manage GUIDs but only integers... so we have to provide a way to support it. The string id here can be either a real string (for string UDIs) or an "integer as a string", using the value "-1" to indicate the "root" i.e. an open UDI.
GetRange(Udi, String)
Gets a named range for a specified UDI and selector.
Declaration
NamedUdiRange GetRange(Udi udi, string selector)
Parameters
Type | Name | Description |
---|---|---|
Udi | udi | The UDI. |
System. |
selector | The selector. |
Returns
Type | Description |
---|---|
Named |
The named range for the specified UDI and selector. |
GetRangeAsync(String, String, String, CancellationToken)
Gets a named range for specified entity type, identifier and selector.
Declaration
virtual Task<NamedUdiRange> GetRangeAsync(string entityType, string sid, string selector, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
entityType | The entity type. |
System. |
sid | The identifier. |
System. |
selector | The selector. |
Cancellation |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<Named |
A task that represents the asynchronous operation. The task result contains the named range for the specified entity type, identifier and selector. |
Remarks
This is temporary. At least we thought it would be, in sept. 2016. What day is it now?
At the moment our UI has a hard time returning proper UDIs, mainly because Core's tree do not manage GUIDs but only integers... so we have to provide a way to support it. The string id here can be either a real string (for string UDIs) or an "integer as a string", using the value "-1" to indicate the "root" i.e. an open UDI.
GetRangeAsync(Udi, String, CancellationToken)
Gets a named range for a specified UDI and selector.
Declaration
virtual Task<NamedUdiRange> GetRangeAsync(Udi udi, string selector, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Udi | udi | The UDI. |
System. |
selector | The selector. |
Cancellation |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<Named |
A task that represents the asynchronous operation. The task result contains the named range for the specified UDI and selector. |
Process(ArtifactDeployState, IDeployContext, Int32)
Processes an artifact.
Declaration
void Process(ArtifactDeployState dart, IDeployContext context, int pass)
Parameters
Type | Name | Description |
---|---|---|
Artifact |
dart | The state of the artifact being deployed. |
IDeploy |
context | The deploy context. |
System. |
pass | The processing pass number. |
ProcessAsync(ArtifactDeployState, IDeployContext, Int32, CancellationToken)
Processes an artifact.
Declaration
virtual Task ProcessAsync(ArtifactDeployState state, IDeployContext context, int pass, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Artifact |
state | The state of the artifact being deployed. |
IDeploy |
context | The deploy context. |
System. |
pass | The processing pass number. |
Cancellation |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
ProcessInit(IArtifact, IDeployContext)
Initializes processing for an artifact.
Declaration
ArtifactDeployState ProcessInit(IArtifact art, IDeployContext context)
Parameters
Type | Name | Description |
---|---|---|
IArtifact | art | The artifact. |
IDeploy |
context | The deploy context. |
Returns
Type | Description |
---|---|
Artifact |
The state of an artifact being deployed. |
ProcessInitAsync(IArtifact, IDeployContext, CancellationToken)
Initializes processing for an artifact.
Declaration
virtual Task<ArtifactDeployState> ProcessInitAsync(IArtifact artifact, IDeployContext context, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IArtifact | artifact | The artifact. |
IDeploy |
context | The deploy context. |
Cancellation |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<Artifact |
A task that represents the asynchronous operation. The task result contains the state of an artifact being deployed. |