QuotationBehavior Struct
The quotation behavior has an effect on which version of the time series is loaded when reading with quotation.
public readonly struct QuotationBehavior : System.IEquatable<HAKOM.TSM.Net.Api.Quotations.QuotationBehavior>, HAKOM.TSM.Net.Api.IEnumeration<HAKOM.TSM.Net.Api.Quotations.QuotationBehavior, int>, HAKOM.TSM.Net.Api.IEnumeration<HAKOM.TSM.Net.Api.Quotations.QuotationBehavior>Implements System.IEquatable<QuotationBehavior>, HAKOM.TSM.Net.Api.IEnumeration<QuotationBehavior,System.Int32>, HAKOM.TSM.Net.Api.IEnumeration<QuotationBehavior>
Properties
Section titled “Properties”QuotationBehavior.Value Property
Section titled “QuotationBehavior.Value Property”The System.Int32 value representing the quotation behavior.
public int Value { get; init; }Implements Value
Property Value
Section titled “Property Value”Methods
Section titled “Methods”QuotationBehavior.Create(Nullable<int>) Method
Section titled “QuotationBehavior.Create(Nullable<int>) Method”Creates a quotation behavior from its known value.
public static HAKOM.TSM.Net.Api.Quotations.QuotationBehavior Create(System.Nullable<int> value);Parameters
Section titled “Parameters”value System.Nullable<System.Int32>
The System.Int32 value of the quotation behavior.
Returns
Section titled “Returns”QuotationBehavior
A new instance of QuotationBehavior.
QuotationBehavior.Default() Method
Section titled “QuotationBehavior.Default() Method”Creates a new instance of QuotationBehavior that specifies no explicit behavior.
public static HAKOM.TSM.Net.Api.Quotations.QuotationBehavior Default();Returns
Section titled “Returns”QuotationBehavior
A new QuotationBehavior with value default.
Remarks
Section titled “Remarks”When reading data from a quotation time series without explicitly specifying a quotation date/time, the actual data retrieved depends on the QuotationBehavior that may be controlled by
- passing it in QuotationBehavior
- setting the QuotationDefaultBehavior property of the time series being read
- or specifying a TSM:Persistence:Data:QuotationDefaultBehavior in the applications configuration
in that order. If one of these is null or Default() then the next in that list is used to determine final behavior. If none of the aforementioned settings has a value that is not null or default, then MaxExact() is used.
QuotationBehavior.Equals(QuotationBehavior) Method
Section titled “QuotationBehavior.Equals(QuotationBehavior) Method”Compares the value of this quotation behavior to another quotation behavior returning a boolean.
public bool Equals(HAKOM.TSM.Net.Api.Quotations.QuotationBehavior other);Parameters
Section titled “Parameters”other QuotationBehavior
The QuotationBehavior, which is used for comparison
Returns
Section titled “Returns”System.Boolean
A boolean indicating if the values of the quotation behaviors are equal (true) or not equal(false).
QuotationBehavior.Equals(object) Method
Section titled “QuotationBehavior.Equals(object) Method”Compares the value of this quotation behavior to another quotation behavior returning a boolean.
public override bool Equals(object? obj);Parameters
Section titled “Parameters”obj System.Object
The QuotationBehavior, which is used for comparison
Returns
Section titled “Returns”System.Boolean
A boolean indicating if the values of the quotation behaviors are equal (true) or not equal(false).
QuotationBehavior.GetHashCode() Method
Section titled “QuotationBehavior.GetHashCode() Method”Creates the hash code for this quotation behavior, using its value.
public override int GetHashCode();Returns
Section titled “Returns”System.Int32
A hash code for this quotation behavior.
QuotationBehavior.IsDefault() Method
Section titled “QuotationBehavior.IsDefault() Method”Returns true if the quotation behavior is a default quotation behavior.
public bool IsDefault();Returns
Section titled “Returns”QuotationBehavior.IsMaxExact() Method
Section titled “QuotationBehavior.IsMaxExact() Method”Returns true if the quotation behavior is ‘MaxExact’.
public bool IsMaxExact();Returns
Section titled “Returns”QuotationBehavior.IsMaxNotExact() Method
Section titled “QuotationBehavior.IsMaxNotExact() Method”Returns true if the quotation behavior is ‘MaxNotExact’.
public bool IsMaxNotExact();Returns
Section titled “Returns”QuotationBehavior.IsNowNotExact() Method
Section titled “QuotationBehavior.IsNowNotExact() Method”Returns true if the quotation behavior is ‘NowNotExact’.
public bool IsNowNotExact();Returns
Section titled “Returns”QuotationBehavior.MaxExact() Method
Section titled “QuotationBehavior.MaxExact() Method”Creates a quotation behavior, which specifies that the latest quotation date and time for the time domain will be determined and only data for that date will be read.
public static HAKOM.TSM.Net.Api.Quotations.QuotationBehavior MaxExact();Returns
Section titled “Returns”QuotationBehavior
A new QuotationBehavior with value 1.
QuotationBehavior.MaxNotExact() Method
Section titled “QuotationBehavior.MaxNotExact() Method”Creates a quotation behavior, which specifies that data from the time domain will be read with the respective latest quotation date and time.
public static HAKOM.TSM.Net.Api.Quotations.QuotationBehavior MaxNotExact();Returns
Section titled “Returns”QuotationBehavior
A new QuotationBehavior with value 2.
QuotationBehavior.NowNotExact() Method
Section titled “QuotationBehavior.NowNotExact() Method”Creates a quotation behavior which specifies that data from the time domain will be read with the respective latest quotation date and time but earlier than the current time.
public static HAKOM.TSM.Net.Api.Quotations.QuotationBehavior NowNotExact();Returns
Section titled “Returns”QuotationBehavior
A new QuotationBehavior with value 3.
QuotationBehavior.ToString() Method
Section titled “QuotationBehavior.ToString() Method”Display the name and numeric value of the QuotationBehavior as formated string.
public override string ToString();Returns
Section titled “Returns”System.String
The name and numeric value in the following format Name (Value).
QuotationBehavior.TryCreate(Nullable<int>) Method
Section titled “QuotationBehavior.TryCreate(Nullable<int>) Method”Attempts to create a quotation behavior from its known value.
public static HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Quotations.QuotationBehavior> TryCreate(System.Nullable<int> value);Parameters
Section titled “Parameters”value System.Nullable<System.Int32>
The System.Int32 value of the quotation behavior.
Returns
Section titled “Returns”HAKOM.ErrorHandling.Core.Net.Api.Result<QuotationBehavior>
A Result<TValue> containing a new instance of QuotationBehavior.
QuotationBehavior.TryParseFromConfigurationSectionValue(string, Nullable<QuotationBehavior>) Method
Section titled “QuotationBehavior.TryParseFromConfigurationSectionValue(string, Nullable<QuotationBehavior>) Method”Tries to parse a string value to a QuotationBehavior.
public static bool TryParseFromConfigurationSectionValue(string configurationSectionValue, out System.Nullable<HAKOM.TSM.Net.Api.Quotations.QuotationBehavior> quotationBehavior);Parameters
Section titled “Parameters”configurationSectionValue System.String
The value to be parsed.
quotationBehavior System.Nullable<QuotationBehavior>
The parsed value. This value is null if the parsing failed.
Returns
Section titled “Returns”System.Boolean
A bool indicating if the parsing was successful.
Remarks
Section titled “Remarks”The string value for parsing is intended as the string value from the configuration section “TSM:Persistence:Data:QuotationDefaultBehavior”. The following string values are currently supported for parsing:
- “0” — Parses to Default()
- “1” — Parses to MaxExact()
- “2” — Parses to MaxNotExact()
- “3” — Parses to NowNotExact()
Operators
Section titled “Operators”QuotationBehavior.operator ==(QuotationBehavior, QuotationBehavior) Operator
Section titled “QuotationBehavior.operator ==(QuotationBehavior, QuotationBehavior) Operator”Compares the value of two quotation behaviors using the operator ‘==’.
public static bool operator ==(HAKOM.TSM.Net.Api.Quotations.QuotationBehavior left, HAKOM.TSM.Net.Api.Quotations.QuotationBehavior right);Parameters
Section titled “Parameters”left QuotationBehavior
The QuotationBehavior on the left of the ‘==’ operator.
right QuotationBehavior
The QuotationBehavior on the right of the ‘==’ operator.
Returns
Section titled “Returns”System.Boolean
A boolean indicating if the values of the quotation behaviors are equal (true) or not equal (false).
QuotationBehavior.operator !=(QuotationBehavior, QuotationBehavior) Operator
Section titled “QuotationBehavior.operator !=(QuotationBehavior, QuotationBehavior) Operator”Compares the value of two quotation behaviors using the operator ‘!=’.
public static bool operator !=(HAKOM.TSM.Net.Api.Quotations.QuotationBehavior left, HAKOM.TSM.Net.Api.Quotations.QuotationBehavior right);Parameters
Section titled “Parameters”left QuotationBehavior
The QuotationBehavior on the left of the ‘!=’ operator.
right QuotationBehavior
The QuotationBehavior on the right of the ‘!=’ operator.
Returns
Section titled “Returns”System.Boolean
A boolean indicating if the values of the quotation behaviors are not equal (true) or equal (false).