Table of Contents

Method GetParameterByName

Namespace
Skyline.DataMiner.Scripting
Assembly
SLManagedScripting.dll

GetParameterByName(string)

Retrieves the value of the parameter with the specified name.

object GetParameterByName(string name)

Parameters

name string

The name of the parameter.

Returns

object

The parameter value.

Examples

string myValue = Convert.ToString(protocol.GetParameterByName("myParameter"));

Remarks

  • This is a wrapper method for the NotifyProtocol type 85 NT_GET_PARAMETER_BY_NAME call.
  • When a GetParameter call is executed for a parameter name that does not exist in the protocol a null reference is returned and the following message will be logged “NT_GET_PARAMETER_BY_NAME for [name] failed. 0x80040239”.
  • In case there is both a read and write parameter with the specified name, the value of the write parameter will be returned.
  • When calling this method on a numeric parameter (i.e.a parameter having RawType set to either numeric text, signed number or unsigned number) that is not initialized, 0 will be returned.To determine whether a standalone parameter is uninitialized, the IsEmpty method should be used.