Class EventSiteRegistry

Class responsible for maitaining a register of sites participating in the event framework.

Inheritance
System.Object
EventSiteRegistry
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Events.Providers
Assembly: EPiServer.Events.dll
Version: 8.11.0
Syntax
public class EventSiteRegistry : IEventSiteRegistry

Constructors

EventSiteRegistry()

Declaration
public EventSiteRegistry()

Properties

Count

Gets the number of sites registered as subscribers with this EventSiteRegistry instance.

Declaration
public virtual 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
public virtual EventSite Publisher { get; }
Property Value
Type Description
EventSite

Subscribers

Gets all sites that has been registered as subscribers with this EventSiteRegistry instance.

Declaration
public virtual 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
public virtual 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
public virtual void Clear()

Remove(Guid)

Removes the site with the provided uniqueId from this EventSiteRegistry instance.

Declaration
public virtual 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.

Implements