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 null. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the artifacts are identical. |
Remarks
ServiceConnectorBase{TArtifact} provides a very basic default implementation.
Explode(UdiRange, List<Udi>)
Explodes a range into UDIs.
Declaration
void Explode(UdiRange range, List<Udi> udis)
Parameters
Type | Name | Description |
---|---|---|
UdiRange | range | The range. |
List<Udi> | udis | The list of UDIs where to add the new UDIs. |
Remarks
Also, it's cool to have a method named Explode. Kaboom!
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 null. |
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. |
Process(ArtifactDeployState, IDeployContext, Int32)
Processes an artifact.
Declaration
void Process(ArtifactDeployState dart, IDeployContext context, int pass)
Parameters
Type | Name | Description |
---|---|---|
ArtifactDeployState | dart | The mapped artifact. |
IDeployContext | context | The deploy context. |
System.Int32 | pass | The processing pass number. |
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 mapped artifact. |