This interface defines a model that represents a container. Implement it to simplify the processing of incoming
IContainerMessages.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public interface IContainerModel
Public Interface IContainerModel
public interface class IContainerModel
Members
All Members | Methods | ||||
Icon | Member | Description |
---|---|---|
AddElement(String) |
Called to indicate that you should add (append) an element with the given subject to the container.
| |
InsertElement(String, Int32) |
Called to indicate that you should insert an element with the given subject at the given position within the container.
| |
RemoveElement(String) |
Called to indicate that you should remove the element with the given subject from the container.
| |
RemoveElementsWithPrefix(String) |
Called to indicate that you should remove all elements from the container that have a subject that matches the specified prefix.
|
Remarks
Note: You do not have to use this interface to process IContainerMessages. You can instead use the basic approach, as explained in Operations.
To use the IContainerModel interface:
- Create a class that implements IContainerModel and represents (models) a container.
- In the callback method ContainerUpdated(ISubscription, IPeer, IContainerMessage), iterate through the IContainerOperations and call UpdateContainer(IContainerModel).
- Each call to UpdateContainer(IContainerModel) invokes the appropriate method on your implementation of IContainerModel.