Class KeyColumn
Represents a column in a Google Sheets that can be used to map the row to a StringTableEntry.
Inherited Members
Namespace: UnityEditor.Localization.Plugins.Google.Columns
Syntax
[Serializable]
public class KeyColumn : SheetColumn, IPullKeyColumn
Fields
ColumnHeader
The default name to use for the column is "Key".
Declaration
public const string ColumnHeader = "Key"
Field Value
Type | Description |
---|---|
String |
Properties
PushFields
Controls which cell fields to synchronize.
Declaration
public override PushFields PushFields { get; }
Property Value
Type | Description |
---|---|
PushFields |
Overrides
Methods
PullBegin(StringTableCollection)
Called when starting a pull to allow a column to initialize itself.
Declaration
public override void PullBegin(StringTableCollection collection)
Parameters
Type | Name | Description |
---|---|---|
StringTableCollection | collection | The collection to update from the Google Sheet. |
Overrides
PullCellData(SharedTableData.SharedTableEntry, String, String)
Called to update the StringTableCollection using the provided cell data.
Declaration
public override void PullCellData(SharedTableData.SharedTableEntry keyEntry, string cellValue, string cellNote)
Parameters
Type | Name | Description |
---|---|---|
SharedTableData.SharedTableEntry | keyEntry | The entry being updated for this cell. |
String | cellValue | The cell value or |
String | cellNote | The cell note or |
Overrides
PullKey(String, String)
Provides the entry that the current row represents.
Declaration
public SharedTableData.SharedTableEntry PullKey(string cellValue, string cellNote)
Parameters
Type | Name | Description |
---|---|---|
String | cellValue | The value in the cell for the column. |
String | cellNote | The value in the notes field for the column. |
Returns
Type | Description |
---|---|
SharedTableData.SharedTableEntry | The entry for the current row or |
Implements
PushBegin(StringTableCollection)
Called when starting a push to allow a column to initialize itself.
Declaration
public override void PushBegin(StringTableCollection collection)
Parameters
Type | Name | Description |
---|---|---|
StringTableCollection | collection | The collection to push to a Google Sheet. |
Overrides
PushCellData(SharedTableData.SharedTableEntry, IList<StringTableEntry>, out String, out String)
Extracts the data that should populate the columns cell for the row associated with the Key.
Declaration
public override void PushCellData(SharedTableData.SharedTableEntry keyEntry, IList<StringTableEntry> tableEntries, out string value, out string note)
Parameters
Type | Name | Description |
---|---|---|
SharedTableData.SharedTableEntry | keyEntry | The Key that represents the row in the spreadsheet. |
IList<StringTableEntry> | tableEntries | The StringTableEntry for the current SharedTableData.SharedTableEntry. The order of the tables will match the source StringTableCollection, If a table does not contain data for the current key then a null entry will be used. |
String | value | The value to be used for the cell. This can be null if PushFields is Note or the cell should be empty. |
String | note | The value to be used for the cell note. This can be null if PushFields is Value or if there should not be a note for this cell. |
Overrides
PushHeader(StringTableCollection, out String, out String)
Sets the column title and optional note. These values are always set regardless of the value of PushFields.
Declaration
public override void PushHeader(StringTableCollection collection, out string header, out string headerNote)
Parameters
Type | Name | Description |
---|---|---|
StringTableCollection | collection | |
String | header | The title to use for the column header. |
String | headerNote | Optional note that can be added to the header. |