using System.Collections.Generic;
using Umbraco.Core.Models;
namespace Umbraco.Core.Deploy
{
///
/// Defines methods that can convert a grid cell value to / from an environment-agnostic string.
///
/// Grid cell 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.
public interface IGridCellValueConnector
{
///
/// Gets a value indicating whether the connector supports a specified grid editor view.
///
/// The grid editor view. It needs to be the view instead of the alias as the view is really what identifies what kind of connector should be used. Alias can be anything and you can have multiple different aliases using the same kind of view.
/// A value indicating whether the connector supports the grid editor view.
/// Note that can be string.Empty to indicate the "default" connector.
bool IsConnector(string view);
///
/// Gets the value to be deployed from the control value as a string.
///
/// The control containing the value.
/// The dependencies of the property.
/// The grid cell value to be deployed.
/// Note that
string GetValue(GridValue.GridControl gridControl, ICollection dependencies);
///
/// Allows you to modify the value of a control being deployed.
///
/// The control being deployed.
/// Follows the pattern of the property value connectors (). The SetValue method is used to modify the value of the .
void SetValue(GridValue.GridControl gridControl);
}
}