Show / Hide Table of Contents

Class BehaviorValue

Class providing convenience methods for behavior values.

Inheritance
System.Object
BehaviorValue
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Behaviors
Assembly: Kephas.Core.dll
Syntax
public static class BehaviorValue

Fields

| Improve this Doc View Source

False

A behavior value representing the boolean value false.

Declaration
public static readonly BehaviorValue<bool> False
Field Value
Type Description
BehaviorValue<System.Boolean>
| Improve this Doc View Source

True

A behavior value representing the boolean value true.

Declaration
public static readonly BehaviorValue<bool> True
Field Value
Type Description
BehaviorValue<System.Boolean>

Methods

| Improve this Doc View Source

GetReason(IBehaviorValue)

Sets a reason for the given BehaviorValue{TValue}.

Declaration
public static string GetReason(this IBehaviorValue behavior)
Parameters
Type Name Description
IBehaviorValue behavior

The value to act on.

Returns
Type Description
System.String

The reason, if one was provided, otherwise null.

| Improve this Doc View Source

ToBehaviorValue<TValue>(TValue)

A TValue extension method that converts a value to a behavior value.

Declaration
public static IBehaviorValue<TValue> ToBehaviorValue<TValue>(this TValue value)
Parameters
Type Name Description
TValue value

The value to act on.

Returns
Type Description
IBehaviorValue<TValue>

A BehaviorValue{TValue} representing the provided value.

Type Parameters
Name Description
TValue

Type of the value.

| Improve this Doc View Source

WithReason<TValue>(IBehaviorValue<TValue>, String)

Sets a reason for the given BehaviorValue{TValue}.

Declaration
public static IBehaviorValue<TValue> WithReason<TValue>(this IBehaviorValue<TValue> behavior, string reason)
Parameters
Type Name Description
IBehaviorValue<TValue> behavior

The value to act on.

System.String reason

The reason.

Returns
Type Description
IBehaviorValue<TValue>

The provided BehaviorValue{TValue}.

Type Parameters
Name Description
TValue

Type of the value.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX