Table of Contents

Class FlagWithTimestamp

Namespace
ActivityPub.Types.Util
Assembly
ActivityPub.Types.dll

A value that can be a boolean flag or a DateTime timestamp. For example, Closed.

[JsonConverter(typeof(FlagWithTimestampConverter))]
public class FlagWithTimestamp
Inheritance
FlagWithTimestamp
Inherited Members

Fields

_timestamp

private DateTime? _timestamp

Field Value

DateTime?

_value

private bool _value

Field Value

bool

Properties

Timestamp

The timestamp of this flag, is present. If set to a value, then Timestamp will automatically change to true. If set to null, then Timestamp will automatically change to false.

public DateTime? Timestamp { get; set; }

Property Value

DateTime?

Value

The boolean value of this flag. Will be true if Timestamp has a value. If set to false, then Timestamp will also be set to null.

public bool Value { get; set; }

Property Value

bool

Operators

implicit operator bool(FlagWithTimestamp)

Returns the value of Value.

public static implicit operator bool(FlagWithTimestamp flag)

Parameters

flag FlagWithTimestamp

Returns

bool

implicit operator DateTime?(FlagWithTimestamp)

Returns the value of Timestamp;

public static implicit operator DateTime?(FlagWithTimestamp flag)

Parameters

flag FlagWithTimestamp

Returns

DateTime?

implicit operator FlagWithTimestamp(bool)

Creates a flag with the specified value for Value.

public static implicit operator FlagWithTimestamp(bool value)

Parameters

value bool

Returns

FlagWithTimestamp

implicit operator FlagWithTimestamp(DateTime)

Creates a flag with the specified value for Timestamp.

public static implicit operator FlagWithTimestamp(DateTime timestamp)

Parameters

timestamp DateTime

Returns

FlagWithTimestamp