Interface IValueConnector
Defines methods that can convert a property value to and from an environment-agnostic string.
Namespace: Umbraco.Cms.Core.Deploy
Assembly: Umbraco.Core.dll
Syntax
public interface IValueConnector
Remarks
Property values may contain values such as content identifiers, that would be local to one environment and need to be converted in order to be deployed. Connectors also deal with serializing and deserializing the content value to an environment-agnostic string.
Properties
View SourcePropertyEditorAliases
Gets the property editor aliases that the value converter supports by default.
Declaration
IEnumerable<string> PropertyEditorAliases { get; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> | The property editor aliases. |
Methods
View SourceFromArtifactAsync(String, IPropertyType, Object, IContextCache, CancellationToken)
Gets the content property value corresponding to a deploy property value.
Declaration
Task<object> FromArtifactAsync(string value, IPropertyType propertyType, object currentValue, IContextCache contextCache, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The deploy property value. |
IPropertyType | propertyType | The value property type |
System.Object | currentValue | The current content property value. |
IContextCache | contextCache | The context cache. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<System.Object> | A task that represents the asynchronous operation. The task result contains the content property value. |
ToArtifactAsync(Object, IPropertyType, ICollection<ArtifactDependency>, IContextCache, CancellationToken)
Gets the deploy property value corresponding to a content property value, and gather dependencies.
Declaration
Task<string> ToArtifactAsync(object value, IPropertyType propertyType, ICollection<ArtifactDependency> dependencies, IContextCache contextCache, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The content property value. |
IPropertyType | propertyType | The value property type |
ICollection<ArtifactDependency> | dependencies | The content dependencies. |
IContextCache | contextCache | The context cache. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<System.String> | A task that represents the asynchronous operation. The task result contains the deploy property value. |