-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathStubSerialized.cs
More file actions
24 lines (21 loc) · 853 Bytes
/
StubSerialized.cs
File metadata and controls
24 lines (21 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace Polly.Specs.Helpers.Caching;
/// <summary>
/// An intentionally naive class to be the simplest thing possible to support tests around serializing cache providers. This serialization does nothing but wrap the object to be serialized.
/// </summary>
/// <typeparam name="TOriginal">The type of the item being 'serialized'.</typeparam>
internal class StubSerialized<TOriginal>
{
public TOriginal? Original;
public StubSerialized(TOriginal? original) =>
Original = original;
}
/// <summary>
/// An intentionally naive class to be the simplest thing possible to support tests around serializing cache providers. This serialization does nothing but wrap the object to be serialized.
/// </summary>
internal class StubSerialized : StubSerialized<object>
{
public StubSerialized(object? obj)
: base(obj)
{
}
}