This is the data item that is the subject of the event fired.
Namespace: Composite.DataAssembly: Composite (in Composite.dll) Version: 3.2.4497.34829
Syntax
| C# |
|---|
public IData Data { get; } |
| Visual Basic |
|---|
Public ReadOnly Property Data As IData
Get |
| Visual C++ |
|---|
public:
property IData^ Data {
IData^ get ();
} |
Examples
CopyC#
void MyMethod()
{
DataEvents<IMyDataType>().OnBeforeAdd += new DataEventHandler(DataEvents_OnBeforeAdd);
using (DataConnection connection = new DataConnection())
{
IMyDataType myDataType = DataConnection.New<IMyDataType>();
myDataType.Name = "Foo";
connection.Add<IMyDataType>(myDataType);
}
}
void DataEvents_OnBeforeAdd(object sender, DataEventArgs dataEventArgs)
{
IData myData = dataEventArgs.Data;
}
See Also