internal static IfcDerivedMeasureValue extractDerivedMeasureValue(Type type, string value)
{
if (type.GetInterfaces().Contains(typeof(IfcDerivedMeasureValue)))
{
double val = 0;
if (double.TryParse(value, out val))
{
Type[] types = new Type[] { typeof(double) };
ConstructorInfo constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
null, types, null);
if (constructor != null)
return constructor.Invoke(new object[] { val }) as IfcDerivedMeasureValue;
}
}
return null;
}