C# Класс Grib.Api.GribValue

Encapsulates logic for encoding and decoding a value within a GRIB message.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AsBytes ( ) : byte[]

Gets the key's value in bytes.

AsBytes ( byte newBytes ) : void

Sets the key's value in bytes.

AsDouble ( bool inDegrees = true ) : double

Gets the key's value.

AsDouble ( double newValue, bool inDegrees = true ) : void

Sets the key's value.

AsDoubleArray ( ) : double[]

Gets a copy of the key's array value. Changing the values of this array does not affect the owning message. Call ::AsXArray(alteredArray) to set new values.

AsDoubleArray ( double newValues, bool force = false ) : void

Sets the key's value.

AsInt ( ) : int

Gets the key's value.

AsInt ( int newValue ) : void

Sets the key's value.

AsIntArray ( ) : int[]

Gets a copy of the key's array value. Changing the values of this array does not affect the owning message. Call ::AsXArray(alteredArray) to set new values.

AsIntArray ( int newValues ) : void

Sets the key's value.

AsString ( bool inDegrees = true ) : string

Gets the key's value.

AsString ( string newValue ) : void

Sets the key's value.

ToString ( ) : string

Returns a System.String that represents the value as a string.

Защищенные методы

Метод Описание
BuildTokenForDouble ( bool inDegrees ) : string

Builds the token for accesing/mutating double values, accounting for degree conversions.

Приватные методы

Метод Описание
AssertTypeSafe ( GribValueType requestedType ) : void

Tests for type safety when accessing this value.

AssertTypeSafe ( string key, GribValueType requestedType, GribValueType actualType ) : void

Tests for type safety when accessing a GRIB value.

GribValue ( GribHandle handle, string keyName ) : System

Initializes a new instance of the GribValue class.

GribValue ( string keyName ) : System

Initializes a new instance of the GribValue class.

NativeTypeForKey ( string key ) : GribValueType

Gets an enum describing a key's representation within the message.

Описание методов

AsBytes() публичный Метод

Gets the key's value in bytes.
public AsBytes ( ) : byte[]
Результат byte[]

AsBytes() публичный Метод

Sets the key's value in bytes.
public AsBytes ( byte newBytes ) : void
newBytes byte The new bytes.
Результат void

AsDouble() публичный Метод

Gets the key's value.
public AsDouble ( bool inDegrees = true ) : double
inDegrees bool if set to true, GribApi.NET will return the value [in degrees] when possible.
Результат double

AsDouble() публичный Метод

Sets the key's value.
public AsDouble ( double newValue, bool inDegrees = true ) : void
newValue double The new value.
inDegrees bool if set to true [in degrees], GribApi.NET will set the value [in degrees] when possible.
Результат void

AsDoubleArray() публичный Метод

Gets a copy of the key's array value. Changing the values of this array does not affect the owning message. Call ::AsXArray(alteredArray) to set new values.
public AsDoubleArray ( ) : double[]
Результат double[]

AsDoubleArray() публичный Метод

Sets the key's value.
public AsDoubleArray ( double newValues, bool force = false ) : void
newValues double The new values.
force bool if set to true [force].
Результат void

AsInt() публичный Метод

Gets the key's value.
public AsInt ( ) : int
Результат int

AsInt() публичный Метод

Sets the key's value.
public AsInt ( int newValue ) : void
newValue int The new value.
Результат void

AsIntArray() публичный Метод

Gets a copy of the key's array value. Changing the values of this array does not affect the owning message. Call ::AsXArray(alteredArray) to set new values.
public AsIntArray ( ) : int[]
Результат int[]

AsIntArray() публичный Метод

Sets the key's value.
public AsIntArray ( int newValues ) : void
newValues int The new values.
Результат void

AsString() публичный Метод

Gets the key's value.
public AsString ( bool inDegrees = true ) : string
inDegrees bool if set to true, GribApi.NET will convert the value to degrees when possible.
Результат string

AsString() публичный Метод

Sets the key's value.
public AsString ( string newValue ) : void
newValue string The new value.
Результат void

BuildTokenForDouble() защищенный Метод

Builds the token for accesing/mutating double values, accounting for degree conversions.
protected BuildTokenForDouble ( bool inDegrees ) : string
inDegrees bool if set to true [in degrees].
Результат string

ToString() публичный Метод

Returns a System.String that represents the value as a string.
public ToString ( ) : string
Результат string