Megosztás a következőn keresztül:


TableEntity Class

Definition

A generic dictionary-like ITableEntity type which defines an arbitrary set of properties on an entity as key-value pairs.

public sealed class TableEntity : Azure.Data.Tables.ITableEntity, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>
type TableEntity = class
    interface ITableEntity
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
Public NotInheritable Class TableEntity
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object)), ITableEntity
Inheritance
TableEntity
Implements

Remarks

This type can be used with any of the generic entity interaction methods in TableClient where entity model type flexibility is desired. For example, if your table contains a jagged schema, or you need to precisely update a subset of properties in a Merge mode operation.

Constructors

TableEntity()

Creates an instance of the TableEntity class without any properties initialized.

TableEntity(IDictionary<String,Object>)

Initializes a new instance of the TableEntity class with properties specified in values.

TableEntity(String, String)

Initializes a new instance of the TableEntity class with the specified partition key and row key.

Properties

Count

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

ETag

Gets or sets the entity's ETag.

Item[String]

Gets or sets the entity's property, given the name of the property.

Keys

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

PartitionKey

The partition key is a unique identifier for the partition within a given table and forms the first part of an entity's primary key.

RowKey

The row key is a unique identifier for an entity within a given partition. Together, the PartitionKey and RowKey uniquely identify an entity within a table.

Timestamp

The Timestamp property is a DateTimeOffset value that is maintained on the server side to record the time an entity was last modified. The Table service uses the Timestamp property internally to provide optimistic concurrency. The value of Timestamp is a monotonically increasing value, meaning that each time the entity is modified, the value of Timestamp increases for that entity. This property should not be set on insert or update operations (the value will be ignored).

Methods

Add(String, Object)

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

Clear()

Removes all items from the ICollection<T>.

ContainsKey(String)

Determines whether the IDictionary<TKey,TValue> contains an element with the specified key.

GetBinary(String)

Get the value of a TableEntity's Byte property called key.

GetBinaryData(String)

Get the value of a TableEntity's BinaryData property called key.

GetBoolean(String)

Get the value of a TableEntity's String property called key.

GetDateTime(String)

Get the value of a TableEntity's DateTime property called key.

GetDateTimeOffset(String)

Get the value of a TableEntity's DateTimeOffset property called key.

GetDouble(String)

Get the value of a TableEntity's Double property called key.

GetGuid(String)

Get the value of a TableEntity's Guid property called key.

GetInt32(String)

Get the value of a TableEntity's Int32 property called key.

GetInt64(String)

Get the value of a TableEntity's Int64 property called key.

GetString(String)

Get the value of a TableEntity's String property called key.

Remove(String)

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

TryGetValue(String, Object)

Gets the value associated with the specified key.

Explicit Interface Implementations

ICollection<KeyValuePair<String,Object>>.Add(KeyValuePair<String,Object>)

Adds an item to the ICollection<T>.

ICollection<KeyValuePair<String,Object>>.Contains(KeyValuePair<String,Object>)

Determines whether the ICollection<T> contains a specific value.

ICollection<KeyValuePair<String,Object>>.CopyTo(KeyValuePair<String,Object>[], Int32)

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

ICollection<KeyValuePair<String,Object>>.IsReadOnly

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

ICollection<KeyValuePair<String,Object>>.Remove(KeyValuePair<String,Object>)

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

IDictionary<String,Object>.Values

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

IEnumerable.GetEnumerator()

Gets the enumerator for the TableEntity properties.

IEnumerable<KeyValuePair<String,Object>>.GetEnumerator()

Gets the enumerator for the TableEntity properties.

Extension Methods

GetValueOrAdd<TKey,TValue>(IDictionary<TKey,TValue>, TKey, Func<TKey,TValue>)

Gets or adds the value associated with specified key.

GetValueOrDefault<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

Gets the value associated with specified key.

AsFormattedString<TKey,TValue>(IDictionary<TKey,TValue>)

Applies to