PressureSample Class

A sample of a pressure source (https://w3c.github.io/compute-pressure/#dfn-pressure-source-sample), returned by a PressureSourceProvider.

public sealed class PressureSample : IEquatable<PressureSample>
Implements

Constructors

NameDescription
PressureSample(PressureState)A sample of a pressure source (https://w3c.github.io/compute-pressure/#dfn-pressure-source-sample), returned by a PressureSourceProvider.

PressureSample(PressureState)

ComputePressure.cs

A sample of a pressure source (https://w3c.github.io/compute-pressure/#dfn-pressure-source-sample), returned by a PressureSourceProvider.

public PressureSample(PressureState State)

Parameters

State PressureState
The pressure state of the source.

Properties

NameDescription
OwnContributionEstimateGets the estimated contribution of the web site to the pressure of the source, between 0 and 1 (https://w3c.github.io/compute-pressure/#the-owncontributionestimate-attribute), or null when it is unknown. The default is null.
StateThe pressure state of the source.

OwnContributionEstimate

ComputePressure.cs

Gets the estimated contribution of the web site to the pressure of the source, between 0 and 1 (https://w3c.github.io/compute-pressure/#the-owncontributionestimate-attribute), or null when it is unknown. The default is null.

public double? OwnContributionEstimate { get; init; }

Property value

double?

The pressure state of the source.

public PressureState State { get; init; }

Property value

PressureState

Methods

NameDescription
Deconstruct(PressureState)
Equals(PressureSample?)
Equals(object?)
GetHashCode()
ToString()

Deconstruct(PressureState)

public void Deconstruct(out PressureState State)

Parameters

State PressureState

No documentation is available.

Equals overloads

Equals(PressureSample?)

public bool Equals(PressureSample? other)
Parameters
other PressureSample?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(PressureSample?, PressureSample?)
operator !=(PressureSample?, PressureSample?)

operator ==(PressureSample?, PressureSample?)

public static bool operator ==(PressureSample? left, PressureSample? right)

Parameters

left PressureSample?
right PressureSample?

Returns

bool

No documentation is available.

operator !=(PressureSample?, PressureSample?)

public static bool operator !=(PressureSample? left, PressureSample? right)

Parameters

left PressureSample?
right PressureSample?

Returns

bool

No documentation is available.