Class Context
Represents a TileDB context.
Implements
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class Context : IDisposable
Constructors
| Edit this page View SourceContext()
Creates a Context.
Declaration
public Context()
Context(Config)
Declaration
public Context(Config config)
Parameters
Type | Name | Description |
---|---|---|
Config | config | The context's config. |
Methods
| Edit this page View SourceCancelTasks()
Cancels the asynchronous tasks associated with this Context.
Declaration
public void CancelTasks()
Config()
Declaration
public Config Config()
Returns
Type | Description |
---|---|
Config |
Dispose()
Disposes the Context.
Declaration
public void Dispose()
Remarks
Calling this method on the context returned by GetDefault() will have no effect.
GetChildObjects(string, WalkOrderType?)
Returns the TileDB objects contained in uri
.
Declaration
public List<(string Uri, ObjectType ObjectType)> GetChildObjects(string uri, WalkOrderType? walkOrder)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI to check. |
WalkOrderType? | walkOrder | The order to recursively visit the objects.
Setting this parameter to null will visit only
the top-level objects of |
Returns
Type | Description |
---|---|
List<(string Uri, ObjectType ObjectType)> | A List<T> with the URIs of each TileDB object in |
Remarks
This method ignores any file system object that is not TileDB-related.
GetDefault()
Gets the default Context.
Declaration
public static Context GetDefault()
Returns
Type | Description |
---|---|
Context |
GetObjectType(string)
Returns the TileDB object type for a given resource path.
Declaration
public ObjectType GetObjectType(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The path to check. |
Returns
Type | Description |
---|---|
ObjectType | The type of the object in |
IsFileSystemSupported(FileSystemType)
Checks whether the given FileSystemType is supported.
Declaration
public bool IsFileSystemSupported(FileSystemType fileSystem)
Parameters
Type | Name | Description |
---|---|---|
FileSystemType | fileSystem | The file system type to check. |
Returns
Type | Description |
---|---|
bool |
LastError()
Gets the last error message associated with this Context.
Declaration
public string LastError()
Returns
Type | Description |
---|---|
string |
MoveObject(string, string)
Moves a TileDB resource (group or array).
Declaration
public void MoveObject(string oldUri, string newUri)
Parameters
Type | Name | Description |
---|---|---|
string | oldUri | The resource's old directory. |
string | newUri | The resource's new directory. |
RemoveObject(string)
Deletes a TileDB resource (group or array).
Declaration
public void RemoveObject(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The resource's path. |
SetTag(string, string)
Sets a string key-value “tag” on the given context.
Declaration
public void SetTag(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
string | key | The tag's key. |
string | value | The tag's value. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
Stats()
Gets a JSON string with statistics about the context.
Declaration
public string Stats()
Returns
Type | Description |
---|---|
string |
VisitChildObjects<T>(string, WalkOrderType?, Func<string, ObjectType, T, bool>, T)
Visits the TileDB objects contained in uri
.
Declaration
public void VisitChildObjects<T>(string uri, WalkOrderType? walkOrder, Func<string, ObjectType, T, bool> callback, T callbackArg)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI to check. |
WalkOrderType? | walkOrder | The order to recursively visit the objects.
Setting this parameter to null will visit only
the top-level objects of |
Func<string, ObjectType, T, bool> | callback | A callback that gets called for each TileDB object that got found.
It accepts its URI, its ObjectType and |
T | callbackArg | An argument that will be passed to |
Type Parameters
Name | Description |
---|---|
T | The type of |
Remarks
This method ignores any file system object that is not TileDB-related.