internal static object GetWellKnownScalar(IPropertyValue ipv, PropertyType type) { switch (type) { case PropertyType.UInt8: return(ipv.GetUInt8()); case PropertyType.Int16: return(ipv.GetInt16()); case PropertyType.UInt16: return(ipv.GetUInt16()); case PropertyType.Int32: return(ipv.GetInt32()); case PropertyType.UInt32: return(ipv.GetUInt32()); case PropertyType.Int64: return(ipv.GetInt64()); case PropertyType.UInt64: return(ipv.GetUInt64()); case PropertyType.Single: return(ipv.GetSingle()); case PropertyType.Double: return(ipv.GetDouble()); } Debug.Assert(false); return(null); }