Class KeyMetadataColumn<TMetadata>
Implementation of SheetColumn that can be used to sync IMetadata that is part of SharedTableData. For a version that supports Table Metadata see LocaleMetadataColumn<TMetadata>.
Inherited Members
Namespace: UnityEditor.Localization.Plugins.Google.Columns
Syntax
public abstract class KeyMetadataColumn<TMetadata> : SheetColumn where TMetadata : IMetadata
Type Parameters
Name | Description |
---|---|
TMetadata |
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)
Declaration
public override void PullCellData(SharedTableData.SharedTableEntry keyEntry, string cellValue, string cellNote)
Parameters
Type | Name | Description |
---|---|---|
SharedTableData.SharedTableEntry | keyEntry | |
String | cellValue | |
String | cellNote |
Overrides
PullMetadata(SharedTableData.SharedTableEntry, TMetadata, String, String)
Called during PullIntoStringTableCollection(Int32, StringTableCollection, IList<SheetColumn>, Boolean, ITaskReporter, Boolean) to extract data from a Google Spreadsheet column cell and convert it into IMetadata.
Declaration
public abstract void PullMetadata(SharedTableData.SharedTableEntry keyEntry, TMetadata metadata, string cellValue, string cellNote)
Parameters
Type | Name | Description |
---|---|---|
SharedTableData.SharedTableEntry | keyEntry | The entry for this column row. |
TMetadata | metadata | The metadata to populate with the cell value and/or note. |
String | cellValue | The cell value from the Google Spreadsheet column. |
String | cellNote | The cell note if one exists from the Google Spreadsheet column. |
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)
Declaration
public override void PushCellData(SharedTableData.SharedTableEntry keyEntry, IList<StringTableEntry> tableEntries, out string value, out string note)
Parameters
Type | Name | Description |
---|---|---|
SharedTableData.SharedTableEntry | keyEntry | |
IList<StringTableEntry> | tableEntries | |
String | value | |
String | note |
Overrides
PushMetadata(TMetadata, out String, out String)
Called during PushStringTableCollection(Int32, StringTableCollection, IList<SheetColumn>, ITaskReporter) or PushStringTableCollectionAsync(Int32, StringTableCollection, IList<SheetColumn>, ITaskReporter). Used to extract values from IMetadata and convert them into a value and/or note that can be part of a Google Spreadsheet column cell.
Declaration
public abstract void PushMetadata(TMetadata metadata, out string value, out string note)
Parameters
Type | Name | Description |
---|---|---|
TMetadata | metadata | The metadata to update. |
String | value | The value that should appear in the Google Spreadsheet column cell. |
String | note | The value that should appear in the Google Spreadsheet column as a note. Return null to not include a note. |