This is the type of the data item that is the subject of the event fired.

Namespace: Composite.Data
Assembly: Composite (in Composite.dll) Version: 6.1.6325.31818

Syntax

C#
public Type DataType { get; }
Visual Basic
Public ReadOnly Property DataType As Type
	Get
Visual C++
public:
property Type^ DataType {
	Type^ 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); // This will fire the event!
   }
}


void DataEvents_OnBeforeAdd(object sender, DataEventArgs dataEventArgs)
{        
   Type type = dataEventArgs.DataType; // This will be the type of myDataType instance. E.i. IMyDataType
}

See Also