forked from Dirkster99/AvalonDock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace RelayCommand to a WeakReference,Fix some memory leaks,but thi…
…s commit can not fix this Error Dirkster99#171
- Loading branch information
Showing
11 changed files
with
1,175 additions
and
77 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
source/Components/AvalonDock/Commands/IExecuteWithObject.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
namespace AvalonDock.Commands | ||
{ | ||
/// <summary> | ||
/// Interface IExecuteWithObject | ||
/// </summary> | ||
internal interface IExecuteWithObject | ||
{ | ||
#region Public Properties | ||
|
||
/// <summary> | ||
/// The target of the WeakAction. | ||
/// </summary> | ||
/// <value>The target.</value> | ||
object Target | ||
{ | ||
get; | ||
} | ||
|
||
#endregion Public Properties | ||
|
||
#region Public Methods | ||
|
||
/// <summary> | ||
/// Executes an action. | ||
/// </summary> | ||
/// <param name="parameter">A parameter passed as an object, | ||
/// to be casted to the appropriate type.</param> | ||
void ExecuteWithObject(object parameter); | ||
|
||
/// <summary> | ||
/// Deletes all references, which notifies the cleanup method | ||
/// that this entry must be deleted. | ||
/// </summary> | ||
void MarkForDeletion(); | ||
|
||
#endregion Public Methods | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
source/Components/AvalonDock/Commands/IExecuteWithObjectAndResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace AvalonDock.Commands | ||
{ | ||
/// <summary> | ||
/// Interface IExecuteWithObjectAndResult | ||
/// </summary> | ||
internal interface IExecuteWithObjectAndResult | ||
{ | ||
#region Public Methods | ||
|
||
/// <summary> | ||
/// Executes a Func and returns the result. | ||
/// </summary> | ||
/// <param name="parameter">A parameter passed as an object, | ||
/// to be casted to the appropriate type.</param> | ||
/// <returns>The result of the operation.</returns> | ||
object ExecuteWithObject(object parameter); | ||
|
||
#endregion Public Methods | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.