Record Class

DTF API

Copy image CopyHover image
Deployment Tools Foundation Record Class
The Record object is a container for holding and transferring a variable number of values. Fields within the record are numerically indexed and can contain strings, integers, streams, and null values. Record fields are indexed starting with 1. Field 0 is a special format field.
Declaration Syntax
C# Visual Basic Visual C++ F#
public class Record : InstallerHandle
Public Class Record
	Inherits InstallerHandle
public ref class Record : public InstallerHandle
type Record =  
    class
        inherit InstallerHandle
    end
Members
All Members Constructors Methods Properties



Icon Member Description
Record(Int32)
Creates a new record object with the requested number of fields.

Record(array<Object>[]()[][])
Creates a new record object, providing values for an arbitrary number of fields.

Clear()()()()
Sets all fields in a record to null.

Close()()()()
Closes the handle. After closing a handle, further method calls may throw an InvalidHandleException.
(Inherited from InstallerHandle.)
CreateObjRef(Type)
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Dispose()()()()
Closes the handle. After closing a handle, further method calls may throw an InvalidHandleException.
(Inherited from InstallerHandle.)
Dispose(Boolean)
Closes the handle. After closing a handle, further method calls may throw an InvalidHandleException.
(Inherited from InstallerHandle.)
Equals(Object)
Tests whether this handle object is equal to another handle object. Two handle objects are equal if their types are the same and their native integer handles are the same.
(Inherited from InstallerHandle.)
FieldCount
Gets the number of fields in a record.

Finalize()()()()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
FormatString
Gets or sets field 0 of the Record, which is the format string.

FromHandle(IntPtr, Boolean)
Creates a new Record object from an integer record handle.

GetDataSize(Int32)
Gets the length of a record field. The count does not include the terminating null.

GetDataSize(String)
Gets the length of a record field. The count does not include the terminating null.

GetHashCode()()()()
Gets a hash value for the handle object.
(Inherited from InstallerHandle.)
GetInteger(Int32)
Gets a field value as an integer.

GetInteger(String)
Gets a field value as an integer.

GetLifetimeService()()()()
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
GetNullableInteger(Int32)
Gets a field value as an integer.

GetNullableInteger(String)
Gets a field value as an integer.

GetStream(Int32, String)
Reads a record stream field into a file.

GetStream(String, String)
Reads a record stream field into a file.

GetStream(Int32)
Gets a record stream field.

GetStream(String)
Gets a record stream field.

GetString(Int32)
Gets a field value as a string.

GetString(String)
Gets a field value as a string.

GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Handle
Gets the native integer handle.
(Inherited from InstallerHandle.)
InitializeLifetimeService()()()()
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
IsClosed
Checks if the handle is closed. When closed, method calls on the handle object may throw an InvalidHandleException.
(Inherited from InstallerHandle.)
IsFormatStringInvalid
IsFormatStringInvalid is set from several View methods that invalidate the FormatString and used to determine behavior during Record.ToString().

IsNull(Int32)
Reports whether a record field is null.

IsNull(String)
Reports whether a record field is null.

Item[([( String])])
Gets or sets a record field value.

Item[([( Int32])])
Gets or sets a record field value.

MemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
SetInteger(Int32, Int32)
Sets the value of a field to an integer.

SetInteger(String, Int32)
Sets the value of a field to an integer.

SetNullableInteger(Int32, Nullable<(Of <<'(Int32>)>>))
Sets the value of a field to a nullable integer.

SetNullableInteger(String, Nullable<(Of <<'(Int32>)>>))
Sets the value of a field to a nullable integer.

SetStream(Int32, String)
Sets a record stream field from a file. Stream data cannot be inserted into temporary fields.

SetStream(String, String)
Sets a record stream field from a file. Stream data cannot be inserted into temporary fields.

SetStream(Int32, Stream)
Sets a record stream field from a Stream object. Stream data cannot be inserted into temporary fields.

SetStream(String, Stream)
Sets a record stream field from a Stream object. Stream data cannot be inserted into temporary fields.

SetString(Int32, String)
Sets the value of a field to a string.

SetString(String, String)
Sets the value of a field to a string.

ToString()()()()
Gets a formatted string representation of the Record.
(Overrides Object.ToString()()()().)
ToString(IFormatProvider)
Gets a formatted string representation of the Record, optionally using a Session to format properties.

ToString(String) Obsolete.
Gets a formatted string representation of the Record.

ToString(String, IFormatProvider) Obsolete.
Gets a formatted string representation of the Record, optionally using a Session to format properties.

Remarks

Most methods on the Record class have overloads that allow using either a number or a name to designate a field. However note that field names only exist when the Record is directly returned from a query on a database. For other records, attempting to access a field by name will result in an InvalidOperationException.

Inheritance Hierarchy

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)