This class contains information for store change events. No specifics will be given as to which data item(s) were changed, but the store (type, scope, language) is available. Property DataEventsFired indicate if detailed data events have already been fired for the data store change. In situations where data was changed in the physical store by another process, detailed events cannot be fired and you need to rely on the StoreChange event to do cache flushed etc.

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

Syntax

C#
public class StoreEventArgs : EventArgs
Visual Basic
Public Class StoreEventArgs _
	Inherits EventArgs
Visual C++
public ref class StoreEventArgs : public EventArgs

Examples

CopyC#
void MyMethod()
{
   DataEvents<IMyDataType>().OnStoreChange += new StoreEventHandler(DataEvents_StoreChanged);

   using (DataConnection connection = new DataConnection())
   {
      IMyDataType myDataType = DataConnection.New<IMyDataType>();
      myDataType.Name = "Foo";

      connection.Add<IMyDataType>(myDataType); // This will fire the event - changes are made to the store!
   }
}


void DataEvents_StoreChanged(object sender, StoreEventArgs storeEventArgs)
{        
   Type dataType = storeEventArgs.DataType; // This will be the type that changed
   PublicationScope scope = storeEventArgs.PublicationScope; // The scope the event happened in - published vs. administrated
   CultureInfo locale = storeEventArgs.Locale; // The culture (language) the event happened in
   bool dataEventsFired = storeEventArgs.DataEventsFired; // True is detailed data item events have fired. False if a store reload happened and detailed events cannot be fired.
}

Inheritance Hierarchy

System..::..Object
  System..::..EventArgs
    Composite.Data..::..StoreEventArgs

See Also