Show / Hide Table of Contents

Class ArrayMetadata

Provides a view of an Array's metadata.

Inheritance
object
ArrayMetadata
Implements
IDictionary<string, byte[]>
ICollection<KeyValuePair<string, byte[]>>
IEnumerable<KeyValuePair<string, byte[]>>
IEnumerable
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public class ArrayMetadata : IDictionary<string, byte[]>, ICollection<KeyValuePair<string, byte[]>>, IEnumerable<KeyValuePair<string, byte[]>>, IEnumerable

Constructors

| Edit this page View Source

ArrayMetadata(Array)

Creates an ArrayMetadata object from an Array.

Declaration
public ArrayMetadata(Array array)
Parameters
Type Name Description
Array array

The array to get the metadata from.

Fields

| Edit this page View Source

_array

The Array to get the metadata from.

Declaration
protected Array _array
Field Value
Type Description
Array

Properties

| Edit this page View Source

Count

Gets the number of elements contained in the ICollection<T>.

Declaration
public int Count { get; }
Property Value
Type Description
int

The number of elements contained in the ICollection<T>.

| Edit this page View Source

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
bool

true if the ICollection<T> is read-only; otherwise, false.

| Edit this page View Source

this[string]

Gets or sets the element with the specified key.

Declaration
public byte[] this[string key] { get; set; }
Parameters
Type Name Description
string key

The key of the element to get or set.

Property Value
Type Description
byte[]

The element with the specified key.

Exceptions
Type Condition
ArgumentNullException

key is null.

KeyNotFoundException

The property is retrieved and key is not found.

NotSupportedException

The property is set and the IDictionary<TKey, TValue> is read-only.

| Edit this page View Source

Keys

Gets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>.

Declaration
public ICollection<string> Keys { get; }
Property Value
Type Description
ICollection<string>

An ICollection<T> containing the keys of the object that implements IDictionary<TKey, TValue>.

| Edit this page View Source

Values

Gets an ICollection<T> containing the values in the IDictionary<TKey, TValue>.

Declaration
public ICollection<byte[]> Values { get; }
Property Value
Type Description
ICollection<byte[]>

An ICollection<T> containing the values in the object that implements IDictionary<TKey, TValue>.

Methods

| Edit this page View Source

Add(KeyValuePair<string, byte[]>)

Adds an item to the ICollection<T>.

Declaration
public void Add(KeyValuePair<string, byte[]> item)
Parameters
Type Name Description
KeyValuePair<string, byte[]> item

The object to add to the ICollection<T>.

Exceptions
Type Condition
NotSupportedException

The ICollection<T> is read-only.

| Edit this page View Source

Add(string, byte[])

Adds an element with the provided key and value to the IDictionary<TKey, TValue>.

Declaration
public void Add(string key, byte[] value)
Parameters
Type Name Description
string key

The object to use as the key of the element to add.

byte[] value

The object to use as the value of the element to add.

Exceptions
Type Condition
ArgumentNullException

key is null.

ArgumentException

An element with the same key already exists in the IDictionary<TKey, TValue>.

NotSupportedException

The IDictionary<TKey, TValue> is read-only.

| Edit this page View Source

Clear()

Gets a value indicating whether the ICollection<T> is read-only.

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

Contains(KeyValuePair<string, byte[]>)

Gets a value indicating whether the ICollection<T> is read-only.

Declaration
public bool Contains(KeyValuePair<string, byte[]> item)
Parameters
Type Name Description
KeyValuePair<string, byte[]> item
Returns
Type Description
bool

true if the ICollection<T> is read-only; otherwise, false.

| Edit this page View Source

ContainsKey(string)

Gets a value indicating whether the ICollection<T> is read-only.

Declaration
public bool ContainsKey(string key)
Parameters
Type Name Description
string key
Returns
Type Description
bool

true if the ICollection<T> is read-only; otherwise, false.

| Edit this page View Source

CopyTo(KeyValuePair<string, byte[]>[], int)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

Declaration
public void CopyTo(KeyValuePair<string, byte[]>[] array, int arrayIndex)
Parameters
Type Name Description
KeyValuePair<string, byte[]>[] array

The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.

int arrayIndex

The zero-based index in array at which copying begins.

Exceptions
Type Condition
ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.

| Edit this page View Source

DeleteMetadata(string)

Deletes a metadata from the Array.

Declaration
public void DeleteMetadata(string key)
Parameters
Type Name Description
string key

The metadata's ket.

| Edit this page View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<string, byte[]>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<string, byte[]>>

An enumerator that can be used to iterate through the collection.

| Edit this page View Source

GetMetadata(string)

Gets string-typed metadata from the Array.

Declaration
public string GetMetadata(string key)
Parameters
Type Name Description
string key

The metadata's key.

Returns
Type Description
string
| Edit this page View Source

GetMetadataFromIndex<T>(ulong)

Gets the Array's metadata key and value by index.

Declaration
public (string key, T[] data) GetMetadataFromIndex<T>(ulong index) where T : struct
Parameters
Type Name Description
ulong index

The metadata's index. Must be between zero and MetadataNum() minus one.

Returns
Type Description
(string key, T[] data)

A tuple with the metadata's key and value.

Type Parameters
Name Description
T

The metadata's type.

| Edit this page View Source

GetMetadata<T>(string)

Gets metadata from the Array.

Declaration
public T[] GetMetadata<T>(string key) where T : struct
Parameters
Type Name Description
string key

The metadata's key.

Returns
Type Description
T[]

An array with the metadata values.

Type Parameters
Name Description
T

The metadata's type.

| Edit this page View Source

HasMetadata(string)

Checks whether a metadata with a given key exists in the Array.

Declaration
public (bool has_key, DataType datatype) HasMetadata(string key)
Parameters
Type Name Description
string key

The metadata's key

Returns
Type Description
(bool has_key, DataType datatype)

A tuple of whether the metadata exists, and its type.

| Edit this page View Source

MetadataKeys()

Gets the Array's metadata keys.

Declaration
public string[] MetadataKeys()
Returns
Type Description
string[]
| Edit this page View Source

MetadataNum()

Gets the number of metadata of the Array.

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

PutMetadata(string, string)

Puts a string-typed metadata to the Array.

Declaration
public void PutMetadata(string key, string value)
Parameters
Type Name Description
string key

THe metadata's key.

string value

The metadata's value.

| Edit this page View Source

PutMetadata<T>(string, T)

Puts a single-value metadata to the Array.

Declaration
public void PutMetadata<T>(string key, T v) where T : struct
Parameters
Type Name Description
string key

THe metadata's key.

T v

The metadata's value.

Type Parameters
Name Description
T

The metadata's type.

| Edit this page View Source

PutMetadata<T>(string, T[])

Puts a multi-value metadata to the Array.

Declaration
public void PutMetadata<T>(string key, T[] data) where T : struct
Parameters
Type Name Description
string key

THe metadata's key.

T[] data

The metadata's value.

Type Parameters
Name Description
T

The metadata's type.

| Edit this page View Source

Remove(KeyValuePair<string, byte[]>)

Removes the first occurrence of a specific object from the ICollection<T>.

Declaration
public bool Remove(KeyValuePair<string, byte[]> item)
Parameters
Type Name Description
KeyValuePair<string, byte[]> item

The object to remove from the ICollection<T>.

Returns
Type Description
bool

true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.

Exceptions
Type Condition
NotSupportedException

The ICollection<T> is read-only.

| Edit this page View Source

Remove(string)

Removes the element with the specified key from the IDictionary<TKey, TValue>.

Declaration
public bool Remove(string key)
Parameters
Type Name Description
string key

The key of the element to remove.

Returns
Type Description
bool

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary<TKey, TValue>.

Exceptions
Type Condition
ArgumentNullException

key is null.

NotSupportedException

The IDictionary<TKey, TValue> is read-only.

| Edit this page View Source

TryGetValue(string, out byte[])

Gets the value associated with the specified key.

Declaration
public bool TryGetValue(string key, out byte[] value)
Parameters
Type Name Description
string key

The key whose value to get.

byte[] value

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns
Type Description
bool

true if the object that implements IDictionary<TKey, TValue> contains an element with the specified key; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

key is null.

Implements

IDictionary<TKey, TValue>
ICollection<T>
IEnumerable<T>
IEnumerable
  • Edit this page
  • View Source
In this article
Back to top Copyright © 2018-2023 TileDB Inc.