-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error handling for strategy for object reinitialisation.
Switch to modern code analysis.
- Loading branch information
Showing
14 changed files
with
137 additions
and
14 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
Binary file not shown.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace PoolSharp | ||
{ | ||
/// <summary> | ||
/// Event arguments for the <see cref="PoolBase{T}.ReinitialiseError"/> event. | ||
/// </summary> | ||
/// <typeparam name="T">The type of value stored in the pool and being reinitialised.</typeparam> | ||
public class ReinitialiseErrorEventArgs<T> : EventArgs | ||
{ | ||
private readonly Exception _Exception; | ||
private readonly T _Item; | ||
|
||
/// <summary> | ||
/// Full constructor. | ||
/// </summary> | ||
/// <param name="exception">The exception that was thrown from the reinitialisation callback.</param> | ||
/// <param name="item">The item that was being reinitialised when the exception were thrown.</param> | ||
public ReinitialiseErrorEventArgs(Exception exception, T item) | ||
{ | ||
_Exception = exception; | ||
_Item = item; | ||
} | ||
|
||
/// <summary> | ||
/// The exception that was thrown from the reinitialisation callback. | ||
/// </summary> | ||
public Exception Exception => _Exception; | ||
|
||
/// <summary> | ||
/// The item that was being reinitialised when the exception were thrown. | ||
/// </summary> | ||
public T Item => _Item; | ||
} | ||
} |
Binary file not shown.
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
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