diff options
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/Bindings/StandardReplayProtectionBindingElement.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/Bindings/StandardReplayProtectionBindingElement.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/Bindings/StandardReplayProtectionBindingElement.cs b/src/DotNetOpenAuth.Core/Messaging/Bindings/StandardReplayProtectionBindingElement.cs index 6c062d6..65c7882 100644 --- a/src/DotNetOpenAuth.Core/Messaging/Bindings/StandardReplayProtectionBindingElement.cs +++ b/src/DotNetOpenAuth.Core/Messaging/Bindings/StandardReplayProtectionBindingElement.cs @@ -15,7 +15,14 @@ namespace DotNetOpenAuth.Messaging.Bindings { /// A binding element that checks/verifies a nonce message part. /// </summary> internal class StandardReplayProtectionBindingElement : IChannelBindingElement { + /// <summary> + /// A reusable, precompleted task that can be returned many times to reduce GC pressure. + /// </summary> private static readonly Task<MessageProtections?> NullTask = Task.FromResult<MessageProtections?>(null); + + /// <summary> + /// A reusable, precompleted task that can be returned many times to reduce GC pressure. + /// </summary> private static readonly Task<MessageProtections?> CompletedReplayProtectionTask = Task.FromResult<MessageProtections?>(MessageProtections.ReplayProtection); /// <summary> |