Class FormatBase
A custom binding to be used with a DataTableBase.
Inheritance
Namespace: GDX.DataTables.DataBinding
Syntax
public abstract class FormatBase
Methods
| Improve this Doc View SourceGetBindingTimestamp(String)
Get the latest timestamp for the binding format.
Declaration
public abstract DateTime GetBindingTimestamp(string uri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | uri | The binding Uri. |
Returns
| Type | Description |
|---|---|
| System.DateTime | A UTC timestamp. |
GetFilePreferredExtension()
Get the preferred file extension for this format
Declaration
public abstract string GetFilePreferredExtension()
Returns
| Type | Description |
|---|---|
| System.String | An extension, with period. |
Remarks
If an on-disk format.
GetFriendlyName()
Get the user-friendly name of the format.
Declaration
public abstract string GetFriendlyName()
Returns
| Type | Description |
|---|---|
| System.String | Returns the name of the format. |
GetImportDialogExtensions()
Get the information needed for a system level dialog to populate with this format.
Declaration
public abstract string[] GetImportDialogExtensions()
Returns
| Type | Description |
|---|---|
| System.String[] |
IsFileHeader(String)
Does the file header match what we expect it to be for this format?
Declaration
public abstract bool IsFileHeader(string headerContent)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | headerContent | A small read section of the file used to evaluate the header content. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true/false if it is the expected header. |
Remarks
This should be overloaded as always false for remote formats (think Google Sheets).
IsOnDiskFormat()
Is this format expected to be on a local disk?
Declaration
public abstract bool IsOnDiskFormat()
Returns
| Type | Description |
|---|---|
| System.Boolean | true/false |
IsUri(String)
Does the binding Uri match what we would expect for this platform?
Declaration
public abstract bool IsUri(string uri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | uri | The binding Uri. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true/false if it matches as expected. |
Pull(String, UInt64, Int32)
Get an updated data set to apply to the DataTableBase.
Declaration
public abstract SerializableTable Pull(string uri, ulong currentDataVersion, int currentStructuralVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | uri | The URI to access data from, an absolute path if on local disk. |
| System.UInt64 | currentDataVersion | The data version known to Unity. |
| System.Int32 | currentStructuralVersion | The structural version known to Unity. |
Returns
| Type | Description |
|---|---|
| SerializableTable | A built out representation of the data. |
Push(String, SerializableTable)
Pushes a set of data onto the binding.
Declaration
public abstract bool Push(string uri, SerializableTable serializableTable)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | uri | The URI to send data to, an absolute path if on local disk. |
| SerializableTable | serializableTable | The full data set. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true/false was successful. |