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 SourceFromArtifact(String, IPropertyType, Object, IContextCache)
Gets the content property value corresponding to a deploy property value.
Declaration
object FromArtifact(string value, IPropertyType propertyType, object currentValue, IContextCache contextCache)
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. |
Returns
Type | Description |
---|---|
System.Object | The content property value. |
FromArtifactAsync(String, IPropertyType, Object, IContextCache, CancellationToken)
Gets the content property value corresponding to a deploy property value.
Declaration
virtual 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. |
ToArtifact(Object, IPropertyType, ICollection<ArtifactDependency>, IContextCache)
Gets the deploy property value corresponding to a content property value, and gather dependencies.
Declaration
string ToArtifact(object value, IPropertyType propertyType, ICollection<ArtifactDependency> dependencies, IContextCache contextCache)
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. |
Returns
Type | Description |
---|---|
System.String | The deploy property value. |
ToArtifactAsync(Object, IPropertyType, ICollection<ArtifactDependency>, IContextCache, CancellationToken)
Gets the deploy property value corresponding to a content property value, and gather dependencies.
Declaration
virtual 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. |