Show / Hide Table of Contents

Class Context

Represents a TileDB context.

Inheritance
object
Context
Implements
IDisposable
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class Context : IDisposable

Constructors

| Edit this page View Source

Context()

Creates a Context.

Declaration
public Context()
| Edit this page View Source

Context(Config)

Creates a Context with an associated Config.

Declaration
public Context(Config config)
Parameters
Type Name Description
Config config

The context's config.

Methods

| Edit this page View Source

CancelTasks()

Cancels the asynchronous tasks associated with this Context.

Declaration
public void CancelTasks()
| Edit this page View Source

Config()

Gets the Context's Config().

Declaration
public Config Config()
Returns
Type Description
Config
| Edit this page View Source

Dispose()

Disposes the Context.

Declaration
public void Dispose()
Remarks

Calling this method on the context returned by GetDefault() will have no effect.

| Edit this page View Source

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 uri.

Returns
Type Description
List<(string Uri, ObjectType ObjectType)>

A List<T> with the URIs of each TileDB object in uri, along with its ObjectType.

Remarks

This method ignores any file system object that is not TileDB-related.

| Edit this page View Source

GetDefault()

Gets the default Context.

Declaration
public static Context GetDefault()
Returns
Type Description
Context
| Edit this page View Source

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 uri or Invalid if it is not a TileDB object.

| Edit this page View Source

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
| Edit this page View Source

LastError()

Gets the last error message associated with this Context.

Declaration
public string LastError()
Returns
Type Description
string
| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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

key or value are null or empty.

| Edit this page View Source

Stats()

Gets a JSON string with statistics about the context.

Declaration
public string Stats()
Returns
Type Description
string
| Edit this page View Source

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 uri.

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 callbackArg.

T callbackArg

An argument that will be passed to callback.

Type Parameters
Name Description
T

The type of callbackArg.

Remarks

This method ignores any file system object that is not TileDB-related.

See Also
GetChildObjects(string, WalkOrderType?)

Implements

IDisposable
  • Edit this page
  • View Source
In this article
Back to top Copyright © 2018-2023 TileDB Inc.