'Declaration<ExtensionAttribute()> <JetBrains.Annotations.NotNullAttribute()> Public Overloads Shared Function WriteValueFunction(Of TValue)( _ ByVal metric As SparkplugMetric, _ ByVal declaredType As Type, _ ByVal writeValueFunction As Func(Of TValue,Boolean) _ ) As SparkplugMetric
'UsageDim metric As SparkplugMetric Dim declaredType As Type Dim writeValueFunction As Func(Of TValue,Boolean) Dim value As SparkplugMetric value = SparkplugMetricExtension.WriteValueFunction(Of TValue)(metric, declaredType, writeValueFunction)
[Extension()] [JetBrains.Annotations.NotNull()] public static SparkplugMetric WriteValueFunction<TValue>( SparkplugMetric metric, Type declaredType, Func<TValue,bool> writeValueFunction )
[Extension()] [JetBrains.Annotations.NotNull()] public: static SparkplugMetric^ WriteValueFunctiongeneric<typename TValue> ( SparkplugMetric^ metric, Type^ declaredType, Func<TValue^,bool>^ writeValueFunction )
Parameters
- metric
- The Sparkplug metric that will perform the operation.
The value of this parameter cannot be
null(Nothingin Visual Basic). - declaredType
- The declared type of the Sparkplug metric, expressed as .NET System.Type.
The value of this parameter cannot be
null(Nothingin Visual Basic). - writeValueFunction
- The write value function, i.e. the function that accepts the value to be written, performs the write operation, and returns a boolean success indication.
The value of this parameter cannot be
null(Nothingin Visual Basic).
Type Parameters
- TValue
- The type of the value of the Sparkplug metric.
Return Value
This method never returns null (Nothing in Visual Basic).