Class ServiceConnectorExtensions
Extension methods adding backwards-compatability between IServiceConnector and IServiceConnector2.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Deploy
Assembly: Umbraco.Core.dll
Syntax
public static class ServiceConnectorExtensions
Remarks
These extension methods will be removed in Umbraco 13.
Methods
View SourceGetArtifact(IServiceConnector, Object, IContextCache)
Gets an artifact.
Declaration
public static IArtifact GetArtifact(this IServiceConnector connector, object entity, IContextCache contextCache)
Parameters
Type | Name | Description |
---|---|---|
IServiceConnector | connector | The connector. |
System.Object | entity | The entity. |
IContextCache | contextCache | The context cache. |
Returns
Type | Description |
---|---|
IArtifact | The corresponding artifact. |
Remarks
This extension method tries to make use of the IContextCache on types also implementing IServiceConnector2.
GetArtifact(IServiceConnector, Udi, IContextCache)
Gets an artifact.
Declaration
public static IArtifact GetArtifact(this IServiceConnector connector, Udi udi, IContextCache contextCache)
Parameters
Type | Name | Description |
---|---|---|
IServiceConnector | connector | The connector. |
Udi | udi | The entity identifier of the artifact. |
IContextCache | contextCache | The context cache. |
Returns
Type | Description |
---|---|
IArtifact | The corresponding artifact, or null. |
Remarks
This extension method tries to make use of the IContextCache on types also implementing IServiceConnector2.