Table of Contents

SetTimestamp Method

Definition

Namespace
Savvyio
Assemblies
Savvyio.Core.dll
Source
src/Savvyio.Core/MetadataExtensions.cs

SetTimestamp<T>(T, DateTime?)

Assigns a new timestamp (UtcNow value) to the request.

public static T SetTimestamp<T>(this T request, DateTime? utcTimestamp = null) where T : IMetadata

Parameters

request T

The IMetadata to extend.

utcTimestamp DateTime?

The optional DateTime value expressed as the Coordinated Universal Time (UTC).

Returns

T

A reference to request after the operation has completed.

Type Parameters

T

The model that implements the IMetadata interface.

Exceptions

ArgumentException

utcTimestamp (when set) was not expressed as the Coordinated Universal Time (UTC).