Interface IEventSiteRegistry
Represents a service responsible for maitaining a register of sites involved in the event framework.
Namespace: EPiServer.Events.Providers
Assembly: EPiServer.Events.dll
Version: 8.11.0Syntax
public interface IEventSiteRegistry
Properties
Count
Gets the number of sites registered as subscribers with this EventSiteRegistry instance.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Publisher
Gets the site that has been registered as a publisher with this EventSiteRegistry instance. If no publisher has been registered this property returns null.
Declaration
EventSite Publisher { get; }
Property Value
Type | Description |
---|---|
EventSite |
Subscribers
Gets all sites that has been registered as subscribers with this EventSiteRegistry instance.
Declaration
IEnumerable<EventSite> Subscribers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EventSite> |
Methods
Add(EventSite, RegistrationType)
Registers the provided site with this EventSiteRegistry instance. Only one site per application domain can be registered with the RegistrationType.EventPublisher value. It is this site's identity that is used when an instance of an Event uses this class to raise a remote event.
Declaration
void Add(EventSite site, RegistrationType registrationType)
Parameters
Type | Name | Description |
---|---|---|
EventSite | site | The site to add to the register. |
RegistrationType | registrationType | The type of registration to use. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown if a site already has been registered as an publisher or if the site is already registered as a subscriber. |
Clear()
Removes all registered sites from this EventSiteRegistry instance.
Declaration
void Clear()
Remove(Guid)
Removes the site with the provided uniqueId
from this EventSiteRegistry instance.
Declaration
bool Remove(Guid uniqueId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uniqueId | The unique id representing the remote site. |
Returns
Type | Description |
---|---|
System.Boolean | True if the site was found and removed; otherwise false. |