Added XML doc specifying that closures will cause issues with WeakActions
(Messenger, RelayCommand, Binding).
This commit is contained in:
Родитель
201c3e0384
Коммит
0f60739e36
|
@ -58,7 +58,8 @@ namespace GalaSoft.MvvmLight.Command
|
|||
/// Initializes a new instance of the RelayCommand class that
|
||||
/// can always execute.
|
||||
/// </summary>
|
||||
/// <param name="execute">The execution logic.</param>
|
||||
/// <param name="execute">The execution logic. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <exception cref="ArgumentNullException">If the execute argument is null.</exception>
|
||||
public RelayCommand(Action execute)
|
||||
: this(execute, null)
|
||||
|
@ -68,9 +69,11 @@ namespace GalaSoft.MvvmLight.Command
|
|||
/// <summary>
|
||||
/// Initializes a new instance of the RelayCommand class.
|
||||
/// </summary>
|
||||
/// <param name="execute">The execution logic.</param>
|
||||
/// <param name="execute">The execution logic. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <param name="canExecute">The execution status logic.</param>
|
||||
/// <exception cref="ArgumentNullException">If the execute argument is null.</exception>
|
||||
/// <exception cref="ArgumentNullException">If the execute argument is null. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </exception>
|
||||
public RelayCommand(Action execute, Func<bool> canExecute)
|
||||
{
|
||||
if (execute == null)
|
||||
|
|
|
@ -55,7 +55,8 @@ namespace GalaSoft.MvvmLight.Command
|
|||
/// Initializes a new instance of the RelayCommand class that
|
||||
/// can always execute.
|
||||
/// </summary>
|
||||
/// <param name="execute">The execution logic.</param>
|
||||
/// <param name="execute">The execution logic. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <exception cref="ArgumentNullException">If the execute argument is null.</exception>
|
||||
public RelayCommand(Action<T> execute)
|
||||
: this(execute, null)
|
||||
|
@ -65,8 +66,10 @@ namespace GalaSoft.MvvmLight.Command
|
|||
/// <summary>
|
||||
/// Initializes a new instance of the RelayCommand class.
|
||||
/// </summary>
|
||||
/// <param name="execute">The execution logic.</param>
|
||||
/// <param name="canExecute">The execution status logic.</param>
|
||||
/// <param name="execute">The execution logic. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <param name="canExecute">The execution status logic. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <exception cref="ArgumentNullException">If the execute argument is null.</exception>
|
||||
public RelayCommand(Action<T> execute, Func<T, bool> canExecute)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// for.</typeparam>
|
||||
/// <param name="recipient">The recipient that will receive the messages.</param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
void Register<TMessage>(object recipient, Action<TMessage> action);
|
||||
|
||||
/// <summary>
|
||||
|
@ -58,7 +59,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// get the message. Similarly, messages sent without any token, or with a different
|
||||
/// token, will not be delivered to that recipient.</param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
void Register<TMessage>(object recipient, object token, Action<TMessage> action);
|
||||
|
||||
/// <summary>
|
||||
|
@ -91,7 +93,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// and ExecuteOrderMessage to the recipient that registered.</para>
|
||||
/// </param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
void Register<TMessage>(object recipient, object token, bool receiveDerivedMessagesToo, Action<TMessage> action);
|
||||
|
||||
/// <summary>
|
||||
|
@ -118,7 +121,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// and ExecuteOrderMessage to the recipient that registered.</para>
|
||||
/// </param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
void Register<TMessage>(object recipient, bool receiveDerivedMessagesToo, Action<TMessage> action);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -95,7 +95,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// for.</typeparam>
|
||||
/// <param name="recipient">The recipient that will receive the messages.</param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
public virtual void Register<TMessage>(object recipient, Action<TMessage> action)
|
||||
{
|
||||
Register(recipient, null, false, action);
|
||||
|
@ -125,7 +126,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// and ExecuteOrderMessage to the recipient that registered.</para>
|
||||
/// </param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
public virtual void Register<TMessage>(object recipient, bool receiveDerivedMessagesToo, Action<TMessage> action)
|
||||
{
|
||||
Register(recipient, null, receiveDerivedMessagesToo, action);
|
||||
|
@ -148,7 +150,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// get the message. Similarly, messages sent without any token, or with a different
|
||||
/// token, will not be delivered to that recipient.</param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
public virtual void Register<TMessage>(object recipient, object token, Action<TMessage> action)
|
||||
{
|
||||
Register(recipient, token, false, action);
|
||||
|
@ -184,7 +187,8 @@ namespace GalaSoft.MvvmLight.Messaging
|
|||
/// and ExecuteOrderMessage to the recipient that registered.</para>
|
||||
/// </param>
|
||||
/// <param name="action">The action that will be executed when a message
|
||||
/// of type TMessage is sent.</param>
|
||||
/// of type TMessage is sent. IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
public virtual void Register<TMessage>(
|
||||
object recipient,
|
||||
object token,
|
||||
|
|
|
@ -223,7 +223,9 @@ namespace GalaSoft.MvvmLight.Helpers
|
|||
/// values).
|
||||
/// </summary>
|
||||
/// <param name="convert">A func that will be called with the source
|
||||
/// property's value, and will return the target property's value.</param>
|
||||
/// property's value, and will return the target property's value.
|
||||
/// IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <returns>The Binding instance.</returns>
|
||||
public Binding<TSource, TTarget> ConvertSourceToTarget(Func<TSource, TTarget> convert)
|
||||
{
|
||||
|
@ -239,7 +241,9 @@ namespace GalaSoft.MvvmLight.Helpers
|
|||
/// values).
|
||||
/// </summary>
|
||||
/// <param name="convertBack">A func that will be called with the source
|
||||
/// property's value, and will return the target property's value.</param>
|
||||
/// property's value, and will return the target property's value.
|
||||
/// IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <returns>The Binding instance.</returns>
|
||||
/// <remarks>This method is inactive on OneTime or OneWay bindings.</remarks>
|
||||
public Binding<TSource, TTarget> ConvertTargetToSource(Func<TTarget, TSource> convertBack)
|
||||
|
@ -694,7 +698,9 @@ namespace GalaSoft.MvvmLight.Helpers
|
|||
/// Defines an action that will be executed every time that the binding value
|
||||
/// changes.
|
||||
/// </summary>
|
||||
/// <param name="callback">The action that will be executed when the binding changes.</param>
|
||||
/// <param name="callback">The action that will be executed when the binding changes.
|
||||
/// IMPORTANT: Note that closures are not supported at the moment
|
||||
/// due to the use of WeakActions (see http://stackoverflow.com/questions/25730530/). </param>
|
||||
/// <returns>The Binding instance.</returns>
|
||||
/// <exception cref="InvalidOperationException">When WhenSourceChanges is called on
|
||||
/// a binding which already has a target property set.</exception>
|
||||
|
|
Загрузка…
Ссылка в новой задаче