ITypeReflector.Set Method (ITypeDescriptor, ITypeDescriptor, Object, Object)
Sets the specified value in the specified parent object.
Namespace: Microsoft.BusinessData.Infrastructure
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
Sub Set ( _
typeDescriptor As ITypeDescriptor, _
instanceRootTypeDescriptor As ITypeDescriptor, _
ByRef instance As Object, _
value As Object _
)
'Usage
Dim instance As ITypeReflector
Dim typeDescriptor As ITypeDescriptor
Dim instanceRootTypeDescriptor As ITypeDescriptor
Dim instance As Object
Dim value As Object
instance.Set(typeDescriptor, instanceRootTypeDescriptor, _
instance, value)
void Set(
ITypeDescriptor typeDescriptor,
ITypeDescriptor instanceRootTypeDescriptor,
ref Object instance,
Object value
)
Parameters
typeDescriptor
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorThe TypeDescriptor that corresponds to the specified value.
instanceRootTypeDescriptor
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorThe TypeDescriptor that corresponds to the parent object.
instance
Type: System.ObjectThe parent object.
value
Type: System.ObjectThe value to set.
Remarks
The value could be of a primitive type, value type, or a reference type. The TypeDescriptor that represents the parent object must not have the IsCollection flag set.
Instances of objects in the Business Data Connectivity object model are tied to the Metadata Store they are obtained from. Using instances tied to one Metadata Store with the instances from another Metadata Store will cause data corruption and other unexpected behavior. For more information, see DatabaseBackedMetadataCatalog, FileBackedMetadataCatalog, and RemoteSharedFileBackedMetadataCatalog.