Prism
The CompositeCommand composes one or more ICommands.
Initializes a new instance of .
Initializes a new instance of .
Indicates when the command activity is going to be monitored.
Adds a command to the collection and signs up for the event of it.
If this command is set to monitor command activity, and
implements the interface, this method will subscribe to its
event.
The command to register.
Removes a command from the collection and removes itself from the event of it.
The command to unregister.
Forwards to the registered commands and returns
if all of the commands return .
Data used by the command.
If the command does not require data to be passed, this object can be set to .
if all of the commands return ; otherwise, .
Occurs when any of the registered commands raise .
Forwards to the registered commands.
Data used by the command.
If the command does not require data to be passed, this object can be set to .
Evaluates if a command should execute.
The command to evaluate.
A value indicating whether the command should be used
when evaluating and .
If this command is set to monitor command activity, and
implements the interface,
this method will return if the command's
property is ; otherwise it always returns .
Gets the list of all the registered commands.
A list of registered commands.
This returns a copy of the commands subscribed to the CompositeCommand.
Raises on the UI thread so every
command invoker can requery to check if the
can execute.
Handler for IsActiveChanged events of registered commands.
The sender.
EventArgs to pass to the event.
An whose delegates do not take any parameters for and .
Creates a new instance of with the to invoke on execution.
The to invoke when is called.
Creates a new instance of with the to invoke on execution
and a to query for determining if the command can execute.
The to invoke when is called.
The to invoke when is called
Executes the command.
Determines if the command can be executed.
Returns if the command can execute,otherwise returns .
Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications.
The object type containing the property specified in the expression.
The property expression. Example: ObservesProperty(() => PropertyName).
The current instance of DelegateCommand
Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications.
The property expression. Example: ObservesCanExecute(() => PropertyName).
The current instance of DelegateCommand
An whose delegates can be attached for and .
Creates a new instance of a , specifying both the execute action and the can execute function.
The to execute when is invoked.
The to invoked when is invoked.
Occurs when changes occur that affect whether or not the command should execute.
Raises so every
command invoker can requery .
Raises so every command invoker
can requery to check if the command can execute.
Note that this will trigger the execution of once for each invoker.
Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications.
The object type containing the property specified in the expression.
The property expression. Example: ObservesProperty(() => PropertyName).
Gets or sets a value indicating whether the object is active.
if the object is active; otherwise .
Fired if the property changes.
This raises the event.
An whose delegates can be attached for and .
Parameter type.
The constructor deliberately prevents the use of value types.
Because ICommand takes an object, having a value type for T would cause unexpected behavior when CanExecute(null) is called during XAML initialization for command bindings.
Using default(T) was considered and rejected as a solution because the implementor would not be able to distinguish between a valid and defaulted values.
Instead, callers should support a value type by using a nullable value type and checking the HasValue property before using the Value property.
public MyClass()
{
this.submitCommand = new DelegateCommand<int?>(this.Submit, this.CanSubmit);
}
private bool CanSubmit(int? customerId)
{
return (customerId.HasValue && customers.Contains(customerId.Value));
}
Initializes a new instance of .
Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate.
will always return true.
Initializes a new instance of .
Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate.
Delegate to execute when CanExecute is called on the command. This can be null.
When both and ar .
Executes the command and invokes the provided during construction.
Data used by the command.
Determines if the command can execute by invoked the provided during construction.
Data used by the command to determine if it can execute.
if this command can be executed; otherwise, .
Observes a property that implements INotifyPropertyChanged, and automatically calls DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications.
The type of the return value of the method that this delegate encapulates
The property expression. Example: ObservesProperty(() => PropertyName).
The current instance of DelegateCommand
Observes a property that is used to determine if this command can execute, and if it implements INotifyPropertyChanged it will automatically call DelegateCommandBase.RaiseCanExecuteChanged on property changed notifications.
The property expression. Example: ObservesCanExecute(() => PropertyName).
The current instance of DelegateCommand
Extends to invoke the delegate in a background thread.
Creates a new instance of .
A reference to a delegate of type .
When or are .
When the target of is not of type .
Invokes the specified in an asynchronous thread by using a .
The action to execute.
Extends to invoke the delegate in a background thread.
The type to use for the generic and types.
Creates a new instance of .
A reference to a delegate of type .
A reference to a delegate of type .
When or are .
When the target of is not of type ,
or the target of is not of type .
Invokes the specified in an asynchronous thread by using a .
The action to execute.
The payload to pass while invoking it.
Generic arguments class to pass to event handlers that need to receive data.
The type of data to pass.
Initializes the DataEventArgs class.
Information related to the event.
Gets the information related to the event.
Information related to the event.
Represents a reference to a that may contain a
to the target. This class is used
internally by the Prism Library.
Initializes a new instance of .
The original to create a reference for.
If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target.
If the passed is not assignable to .
Gets the (the target) referenced by the current object.
if the object referenced by the current object has been garbage collected; otherwise, a reference to the referenced by the current object.
Extends to invoke the delegate
in a specific .
Creates a new instance of .
A reference to a delegate of type .
The synchronization context to use for UI thread dispatching.
When or are .
When the target of is not of type .
Invokes the specified asynchronously in the specified .
The action to execute.
Extends to invoke the delegate
in a specific .
The type to use for the generic and types.
Creates a new instance of .
A reference to a delegate of type .
A reference to a delegate of type .
The synchronization context to use for UI thread dispatching.
When or are .
When the target of is not of type ,
or the target of is not of type .
Invokes the specified asynchronously in the specified .
The action to execute.
The payload to pass while invoking it.
Implements .
Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same returns the same event instance.
The type of event to get. This must inherit from .
A singleton instance of an event object of type .
Defines a base class to publish and subscribe to events.
Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching
Gets the list of current subscriptions.
The current subscribers.
Adds the specified to the subscribers' collection.
The subscriber.
The that uniquely identifies every subscriber.
Adds the subscription to the internal list and assigns it a new .
Calls all the execution strategies exposed by the list of .
The arguments that will be passed to the listeners.
Before executing the strategies, this class will prune all the subscribers from the
list that return a when calling the
method.
Removes the subscriber matching the .
The returned by while subscribing to the event.
Returns if there is a subscriber matching .
The returned by while subscribing to the event.
if there is a that matches; otherwise .
Provides a way to retrieve a to execute an action depending
on the value of a second filter predicate that returns true if the action should execute.
Creates a new instance of .
A reference to a delegate of type .
When or are .
When the target of is not of type .
Gets the target that is referenced by the .
An or if the referenced target is not alive.
Gets or sets a that identifies this .
A token that identifies this .
Gets the execution strategy to publish this event.
An with the execution strategy, or if the is no longer valid.
If is no longer valid because it was
garbage collected, this method will return .
Otherwise it will return a delegate that evaluates the and if it
returns will then call . The returned
delegate holds a hard reference to the target
delegates. As long as the returned delegate is not garbage collected,
the references delegates won't get collected either.
Invokes the specified synchronously when not overridden.
The action to execute.
An is thrown if is null.
Provides a way to retrieve a to execute an action depending
on the value of a second filter predicate that returns true if the action should execute.
The type to use for the generic and types.
Creates a new instance of .
A reference to a delegate of type .
A reference to a delegate of type .
When or are .
When the target of is not of type ,
or the target of is not of type .
Gets the target that is referenced by the .
An or if the referenced target is not alive.
Gets the target that is referenced by the .
An or if the referenced target is not alive.
Gets or sets a that identifies this .
A token that identifies this .
Gets the execution strategy to publish this event.
An with the execution strategy, or if the is no longer valid.
If or are no longer valid because they were
garbage collected, this method will return .
Otherwise it will return a delegate that evaluates the and if it
returns will then call . The returned
delegate holds hard references to the and target
delegates. As long as the returned delegate is not garbage collected,
the and references delegates won't get collected either.
Invokes the specified synchronously when not overridden.
The action to execute.
The payload to pass while invoking it.
An is thrown if is null.
Represents a reference to a .
Gets the referenced object.
A instance if the target is valid; otherwise .
Defines an interface to get instances of an event type.
Gets an instance of an event type.
The type of event to get.
An instance of an event object of type .
Defines a contract for an event subscription to be used by .
Gets or sets a that identifies this .
A token that identifies this .
Gets the execution strategy to publish this event.
An with the execution strategy, or if the is no longer valid.
Defines a class that manages publication and subscription to events.
Subscribes a delegate to an event that will be published on the .
will maintain a to the target of the supplied delegate.
The delegate that gets executed when the event is published.
A that uniquely identifies the added subscription.
The PubSubEvent collection is thread-safe.
Subscribes a delegate to an event.
PubSubEvent will maintain a to the Target of the supplied delegate.
The delegate that gets executed when the event is raised.
Specifies on which thread to receive the delegate callback.
A that uniquely identifies the added subscription.
The PubSubEvent collection is thread-safe.
Subscribes a delegate to an event that will be published on the .
The delegate that gets executed when the event is published.
When , the keeps a reference to the subscriber so it does not get garbage collected.
A that uniquely identifies the added subscription.
If is set to , will maintain a to the Target of the supplied delegate.
If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior.
The PubSubEvent collection is thread-safe.
Subscribes a delegate to an event.
The delegate that gets executed when the event is published.
Specifies on which thread to receive the delegate callback.
When , the keeps a reference to the subscriber so it does not get garbage collected.
A that uniquely identifies the added subscription.
If is set to , will maintain a to the Target of the supplied delegate.
If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior.
The PubSubEvent collection is thread-safe.
Publishes the .
Removes the first subscriber matching from the subscribers' list.
The used when subscribing to the event.
Returns if there is a subscriber matching .
The used when subscribing to the event.
if there is an that matches; otherwise .
Defines a class that manages publication and subscription to events.
The type of message that will be passed to the subscribers.
Subscribes a delegate to an event that will be published on the .
will maintain a to the target of the supplied delegate.
The delegate that gets executed when the event is published.
A that uniquely identifies the added subscription.
The PubSubEvent collection is thread-safe.
Subscribes a delegate to an event.
PubSubEvent will maintain a to the Target of the supplied delegate.
The delegate that gets executed when the event is raised.
Specifies on which thread to receive the delegate callback.
A that uniquely identifies the added subscription.
The PubSubEvent collection is thread-safe.
Subscribes a delegate to an event that will be published on the .
The delegate that gets executed when the event is published.
When , the keeps a reference to the subscriber so it does not get garbage collected.
A that uniquely identifies the added subscription.
If is set to , will maintain a to the Target of the supplied delegate.
If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior.
The PubSubEvent collection is thread-safe.
Subscribes a delegate to an event.
The delegate that gets executed when the event is published.
Specifies on which thread to receive the delegate callback.
When , the keeps a reference to the subscriber so it does not get garbage collected.
A that uniquely identifies the added subscription.
If is set to , will maintain a to the Target of the supplied delegate.
If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior.
The PubSubEvent collection is thread-safe.
Subscribes a delegate to an event.
The delegate that gets executed when the event is published.
Specifies on which thread to receive the delegate callback.
When , the keeps a reference to the subscriber so it does not get garbage collected.
Filter to evaluate if the subscriber should receive the event.
A that uniquely identifies the added subscription.
If is set to , will maintain a to the Target of the supplied delegate.
If not using a WeakReference ( is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior.
The PubSubEvent collection is thread-safe.
Publishes the .
Message to pass to the subscribers.
Removes the first subscriber matching from the subscribers' list.
The used when subscribing to the event.
Returns if there is a subscriber matching .
The used when subscribing to the event.
if there is an that matches; otherwise .
Subscription token returned from on subscribe.
Initializes a new instance of .
Indicates whether the current object is equal to another object of the same type.
if the current object is equal to the parameter; otherwise, .
An object to compare with this object.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current .
The parameter is null.2
Serves as a hash function for a particular type.
A hash code for the current .
2
Disposes the SubscriptionToken, removing the subscription from the corresponding .
Specifies on which thread a subscriber will be called.
The call is done on the same thread on which the was published.
The call is done on the UI thread.
The call is done asynchronously on a background thread.
Interface that defines if the object instance is active
and notifies when the activity changes.
Gets or sets a value indicating whether the object is active.
if the object is active; otherwise .
Notifies that the value for property has changed.
Defines values for the categories used by .
Debug category.
Exception category.
Informational category.
Warning category.
Implementation of that logs into a message into the Debug.Listeners collection.
Write a new log entry with the specified category and priority.
Message body to log.
Category of the entry.
The priority of the entry.
Implementation of that does nothing. This
implementation is useful when the application does not need logging
but there are infrastructure pieces that assume there is a logger.
This method does nothing.
Message body to log.
Category of the entry.
The priority of the entry.
Defines a simple logger façade to be used by the Prism Library.
Write a new log entry with the specified category and priority.
Message body to log.
Category of the entry.
The priority of the entry.
Defines values for the priorities used by .
No priority specified.
High priority entry.
Medium priority entry.
Low priority entry.
Implementation of to simplify models.
Occurs when a property value changes.
Checks if a property already matches a desired value. Sets the property and
notifies listeners only when necessary.
Type of the property.
Reference to a property with both getter and setter.
Desired value for the property.
Name of the property used to notify listeners. This
value is optional and can be provided automatically when invoked from compilers that
support CallerMemberName.
True if the value was changed, false if the existing value matched the
desired value.
Checks if a property already matches a desired value. Sets the property and
notifies listeners only when necessary.
Type of the property.
Reference to a property with both getter and setter.
Desired value for the property.
Name of the property used to notify listeners. This
value is optional and can be provided automatically when invoked from compilers that
support CallerMemberName.
Action that is called after the property value has been changed.
True if the value was changed, false if the existing value matched the
desired value.
Raises this object's PropertyChanged event.
Name of the property used to notify listeners. This
value is optional and can be provided automatically when invoked from compilers
that support .
Notifies listeners that a property value has changed.
Name of the property used to notify listeners. This
value is optional and can be provided automatically when invoked from compilers
that support .
Raises this object's PropertyChanged event.
The PropertyChangedEventArgs
Raises this object's PropertyChanged event.
The type of the property that has a new value
A Lambda expression representing the property that has a new value.
Manages validation errors for an object, notifying when the error state changes.
The type of the error object.
Initializes a new instance of the class.
The action that invoked if when errors are added for an object./>
event.
Gets a value indicating whether the object has validation errors.
Gets the validation errors for a specified property.
The name of the property.
The validation errors of type for the property.
Clears the errors for the property indicated by the property expression.
The property type.
The expression indicating a property.
container.ClearErrors(()=>SomeProperty);
Clears the errors for a property.
The name of th property for which to clear errors.
container.ClearErrors("SomeProperty");
Sets the validation errors for the specified property.
The property type for which to set errors.
The indicating the property.
The list of errors to set for the property.
Sets the validation errors for the specified property.
If a change is detected then the errors changed event is raised.
The name of the property.
The new validation errors.
Provides support for extracting property information based on a property expression.
Extracts the property name from a property expression.
The object type containing the property specified in the expression.
The property expression (e.g. p => p.PropertyName)
The name of the property.
Thrown if the is null.
Thrown when the expression is:
Not a
The does not represent a property.
Or, the property is static.
Extracts the property name from a LambdaExpression.
The LambdaExpression
The name of the property.
Thrown if the is null.
Thrown when the expression is:
The does not represent a property.
Or, the property is static.
The ViewModelLocationProvider class locates the view model for the view that has the AutoWireViewModelChanged attached property set to true.
The view model will be located and injected into the view's DataContext. To locate the view, two strategies are used: First the ViewModelLocationProvider
will look to see if there is a view model factory registered for that view, if not it will try to infer the view model using a convention based approach.
This class also provide methods for registering the view model factories,
and also to override the default view model factory and the default view type to view model type resolver.
A dictionary that contains all the registered factories for the views.
A dictionary that contains all the registered ViewModel types for the views.
The default view model factory which provides the ViewModel type as a parameter.
ViewModelfactory that provides the View instance and ViewModel type as parameters.
Default view type to view model type resolver, assumes the view model is in same assembly as the view type, but in the "ViewModels" namespace.
Sets the default view model factory.
The view model factory which provides the ViewModel type as a parameter.
Sets the default view model factory.
The view model factory that provides the View instance and ViewModel type as parameters.
Sets the default view type to view model type resolver.
The view type to view model type resolver.
Automatically looks up the viewmodel that corresponds to the current view, using two strategies:
It first looks to see if there is a mapping registered for that view, if not it will fallback to the convention based approach.
The dependency object, typically a view.
The call back to use to create the binding between the View and ViewModel
Gets the view model for the specified view.
The view that the view model wants.
The ViewModel that corresponds to the view passed as a parameter.
Gets the ViewModel type for the specified view.
The View that the ViewModel wants.
The ViewModel type that corresponds to the View.
Registers the ViewModel factory for the specified view type.
The View
The ViewModel factory.
Registers the ViewModel factory for the specified view type name.
The name of the view type.
The ViewModel factory.
Registers a ViewModel type for the specified view type.
The View
The ViewModel
Registers a ViewModel type for the specified view.
The View type name
The ViewModel type
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to Cannot register a CompositeCommand in itself..
Looks up a localized string similar to Cannot register the same command twice in the same CompositeCommand..
Looks up a localized string similar to {1}: {2}. Priority: {3}. Timestamp:{0:u}..
Looks up a localized string similar to Neither the executeMethod nor the canExecuteMethod delegates can be null..
Looks up a localized string similar to T for DelegateCommand<T> is not an object nor Nullable..
Looks up a localized string similar to To use the UIThread option for subscribing, the EventAggregator must be constructed on the UI thread..
Looks up a localized string similar to Invalid Delegate Reference Type Exception.
Looks up a localized string similar to The entity does not contain a property with that name.
Looks up a localized string similar to The member access expression does not access a property..
Looks up a localized string similar to The expression is not a member access expression..
Looks up a localized string similar to The referenced property is a static property..