RTI Connext C# API  6.1.0
Lifespan Class Reference

Specifies how long the data written by a Publication.DataWriter<T> is considered valid. More...

Inherits IEquatable< Lifespan >.

Public Member Functions

 Lifespan (Duration duration)
 Creates a new instance More...
 
Lifespan With (Action< LifespanBuilder > build)
 Creates a new Lifespan with a set of changes specified in an Action More...
 
override int GetHashCode ()
 Gets the hash code More...
 
override bool Equals (object other)
 Compares for equality More...
 
bool Equals (Lifespan other)
 Compares for equality More...
 

Properties

Duration Duration [get]
 Maximum duration for the data's validity. More...
 
static Lifespan Default [get]
 Singleton containing the default value of a Lifespan More...
 

Detailed Description

Specifies how long the data written by a Publication.DataWriter<T> is considered valid.

The full documentation is available in the C API: DDS_LifespanQosPolicy

Constructor & Destructor Documentation

◆ Lifespan()

Lifespan ( Duration  duration)

Creates a new instance

Parameters
durationThe value for Duration

Member Function Documentation

◆ Equals() [1/2]

bool Equals ( Lifespan  other)

Compares for equality

◆ Equals() [2/2]

override bool Equals ( object  other)

Compares for equality

◆ GetHashCode()

override int GetHashCode ( )

Gets the hash code

◆ With()

Lifespan With ( Action< LifespanBuilder build)

Creates a new Lifespan with a set of changes specified in an Action

Parameters
buildAn Action (typically a lambda function) that receives a modifiable object with the current values of this Lifespan.
Returns
A new Lifespan with the changes applied by the Action

Property Documentation

◆ Default

Lifespan Default
staticget

Singleton containing the default value of a Lifespan

◆ Duration

Maximum duration for the data's validity.

The full documentation is available in the C API: DDS_LifespanQosPolicy::duration