Show / Hide Table of Contents

Class IBlockMetadataExtensions

Convenient extension methods for IBlockMetadata.

Inheritance
Object
IBlockMetadataExtensions
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Libplanet.Types.Blocks
Assembly: Libplanet.Types.dll
Syntax
public static class IBlockMetadataExtensions

Methods

| Improve this Doc View Source

ValidateTimestamp(IBlockMetadata, DateTimeOffset)

Checks if the given metadata's Timestamp is valid. No-op if valid.

Declaration
public static void ValidateTimestamp(this IBlockMetadata metadata, DateTimeOffset currentTime)
Parameters
Type Name Description
IBlockMetadata metadata

The block metadata to validate.

DateTimeOffset currentTime

Explicitly specify the current time.

Exceptions
Type Condition
InvalidBlockTimestampException

Thrown when Timestamp is invalid. For example, if Timestamp is too far in the future compared to currentTime.

| Improve this Doc View Source

ValidateTimestamp(IBlockMetadata)

Checks if the given metadata's Timestamp is valid. No-op if valid.

Declaration
public static void ValidateTimestamp(this IBlockMetadata metadata)
Parameters
Type Name Description
IBlockMetadata metadata

The block metadata to validate.

Exceptions
Type Condition
InvalidBlockTimestampException

Thrown when Timestamp is invalid. For example, if Timestamp is too far in the future compared to the current time.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium