C# 클래스 Microsoft.Practices.Prism.Events.EventBase

Defines a base class to publish and subscribe to events.
파일 보기 프로젝트 열기: xperiandri/PortablePrism 1 사용 예제들

공개 메소드들

메소드 설명
Contains ( SubscriptionToken token ) : bool

Returns if there is a subscriber matching SubscriptionToken.

InitializeDispatcher ( Lazy dispatcher ) : void

Initializes Dispatcher.

Can be run only once.

Unsubscribe ( SubscriptionToken token ) : void

Removes the subscriber matching the SubscriptionToken.

보호된 메소드들

메소드 설명
InternalPublish ( ) : void

Calls all the execution strategies exposed by the list of IEventSubscription.

Before executing the strategies, this class will prune all the subscribers from the list that return a Action{T} when calling the IEventSubscription.GetExecutionStrategy method.

InternalSubscribe ( IEventSubscription eventSubscription ) : SubscriptionToken

Adds the specified IEventSubscription to the subscribers' collection.

Adds the subscription to the internal list and assigns it a new SubscriptionToken.

비공개 메소드들

메소드 설명
PruneAndReturnStrategies ( ) : List>

메소드 상세

Contains() 공개 메소드

Returns if there is a subscriber matching SubscriptionToken.
public Contains ( SubscriptionToken token ) : bool
token SubscriptionToken The returned by while subscribing to the event.
리턴 bool

InitializeDispatcher() 공개 정적인 메소드

Initializes Dispatcher.
Can be run only once.
public static InitializeDispatcher ( Lazy dispatcher ) : void
dispatcher Lazy
리턴 void

InternalPublish() 보호된 메소드

Calls all the execution strategies exposed by the list of IEventSubscription.
Before executing the strategies, this class will prune all the subscribers from the list that return a Action{T} when calling the IEventSubscription.GetExecutionStrategy method.
protected InternalPublish ( ) : void
리턴 void

InternalSubscribe() 보호된 메소드

Adds the specified IEventSubscription to the subscribers' collection.
Adds the subscription to the internal list and assigns it a new SubscriptionToken.
protected InternalSubscribe ( IEventSubscription eventSubscription ) : SubscriptionToken
eventSubscription IEventSubscription The subscriber.
리턴 SubscriptionToken

Unsubscribe() 공개 메소드

Removes the subscriber matching the SubscriptionToken.
public Unsubscribe ( SubscriptionToken token ) : void
token SubscriptionToken The returned by while subscribing to the event.
리턴 void