Share via


DynamicRecord Class

Represents a data record by using a custom type descriptor and the capabilities of the Dynamic Language Runtime (DLR).

Inheritance Hierarchy

System.Object
  System.Dynamic.DynamicObject
    WebMatrix.Data.DynamicRecord

Namespace:  WebMatrix.Data
Assembly:  WebMatrix.Data (in WebMatrix.Data.dll)

Syntax

'Declaration
Public NotInheritable Class DynamicRecord _
    Inherits DynamicObject _
    Implements ICustomTypeDescriptor
'Usage
Dim instance As DynamicRecord
public sealed class DynamicRecord : DynamicObject, 
    ICustomTypeDescriptor
public ref class DynamicRecord sealed : public DynamicObject, 
    ICustomTypeDescriptor
[<SealedAttribute>]
type DynamicRecord =  
    class 
        inherit DynamicObject 
        interface ICustomTypeDescriptor 
    end
public final class DynamicRecord extends DynamicObject implements ICustomTypeDescriptor

The DynamicRecord type exposes the following members.

Properties

  Name Description
Public property Columns Returns a list that contains the name of each column in the DynamicRecord instance.
Public property Item[Int32] Returns the value of a column in the DynamicRecord instance using the specified index.
Public property Item[String] Returns the value of a column in the DynamicRecord instance using the specified name.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Public method GetDynamicMemberNames Returns a list that contains the name of all dynamic members of the DynamicRecord instance. (Overrides DynamicObject.GetDynamicMemberNames().)
Public method GetHashCode (Inherited from Object.)
Public method GetMetaObject (Inherited from DynamicObject.)
Public method GetType (Inherited from Object.)
Public method ToString (Inherited from Object.)
Public method TryBinaryOperation (Inherited from DynamicObject.)
Public method TryConvert (Inherited from DynamicObject.)
Public method TryCreateInstance (Inherited from DynamicObject.)
Public method TryDeleteIndex (Inherited from DynamicObject.)
Public method TryDeleteMember (Inherited from DynamicObject.)
Public method TryGetIndex (Inherited from DynamicObject.)
Public method TryGetMember Gets the value of a DynamicRecord member using the specified name. (Overrides DynamicObject.TryGetMember(GetMemberBinder, Object%).)
Public method TryInvoke (Inherited from DynamicObject.)
Public method TryInvokeMember (Inherited from DynamicObject.)
Public method TrySetIndex (Inherited from DynamicObject.)
Public method TrySetMember (Inherited from DynamicObject.)
Public method TryUnaryOperation (Inherited from DynamicObject.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetAttributes Returns a list of custom attributes for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetClassName Returns the class name for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetComponentName Returns the name for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetConverter Returns the type converter for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetDefaultEvent Returns the default event for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetDefaultProperty Returns the default property for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEditor Returns an editor of the specified type for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEvents() Returns the events for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEvents(Attribute[]) Returns the events for this instance of a component by using the specified filter.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetProperties() Returns the properties for this instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetProperties(Attribute[]) Returns the properties for this instance of a component by using the specified filter.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetPropertyOwner Returns the object that contains the specified property.

Top

Remarks

The DynamicRecord class makes it possible to read data record values by using the familiar indexing and member-access syntax of the host language.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

WebMatrix.Data Namespace