Opc.Ua.Server.AggregateCalculator.CastToOriginalType C# (CSharp) Method

CastToOriginalType() protected static method

Converts the value back to its original type (throws exceptions if conversion fails).
protected static CastToOriginalType ( double value, DataValue original ) : Variant
value double
original DataValue
return System.Variant
        protected static Variant CastToOriginalType(double value, DataValue original)
        {
            object castValue = TypeInfo.Cast(value, TypeInfo.Scalars.Double, original.WrappedValue.TypeInfo.BuiltInType);
            return new Variant(castValue, original.WrappedValue.TypeInfo);
        }