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.Nullable<ICollection<Difference>> | differences | A collection of differences to append to, if not |
Returns
Type | Description |
---|---|
System.Boolean | 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 |
---|---|---|
UdiRange | range | The UDI range. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<Udi> | 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 |
---|---|---|
UdiRange | 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.Object | entity | The entity. |
IContextCache | 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. |
IContextCache | 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.Object | entity | The entity. |
IContextCache | contextCache | The context cache. |
CancellationToken | 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. |
IContextCache | contextCache | The context cache. |
CancellationToken | 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.String | entityType | The entity type. |
System.String | sid | The identifier. |
System.String | selector | The selector. |
Returns
Type | Description |
---|---|
NamedUdiRange | 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.String | selector | The selector. |
Returns
Type | Description |
---|---|
NamedUdiRange | 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.String | entityType | The entity type. |
System.String | sid | The identifier. |
System.String | selector | The selector. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<NamedUdiRange> | 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.String | selector | The selector. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<NamedUdiRange> | 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 |
---|---|---|
ArtifactDeployState | dart | The state of the artifact being deployed. |
IDeployContext | context | The deploy context. |
System.Int32 | 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 |
---|---|---|
ArtifactDeployState | state | The state of the artifact being deployed. |
IDeployContext | context | The deploy context. |
System.Int32 | pass | The processing pass number. |
CancellationToken | 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. |
IDeployContext | context | The deploy context. |
Returns
Type | Description |
---|---|
ArtifactDeployState | 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. |
IDeployContext | context | The deploy context. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ArtifactDeployState> | A task that represents the asynchronous operation. The task result contains the state of an artifact being deployed. |