Ejemplo n.º 1
0
        /// <summary>
        /// Method to determine if the property is supported. Switches to the proper section.
        /// Note this routine supports nested properties and simple arrays and generic List (IList).
        /// </summary>
        /// <param name="property">The property name.</param>
        /// <returns>True if the property is found.</returns>
        public static bool IsProperty(string property)
        {
            if (!string.IsNullOrEmpty(property))
            {
                string[] parts = property.Split(new[] { '.' }, 2);

                switch (parts[0])
                {
                case "Zipato":
                    return(parts.Length > 1 ? PropertyValue.GetPropertyInfo(typeof(Zipato), parts[1]) != null : true);

                case "Data":
                    return(parts.Length > 1 ? PropertyValue.GetPropertyInfo(typeof(ZipatoData), parts[1]) != null : true);

                default:
                    return(PropertyValue.GetPropertyInfo(typeof(ZipatoData), property) != null);
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the <see cref="PropertyInfo"/> data for the property with the specified name.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The property info.</returns>
 public static PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(FroniusData), property);
Ejemplo n.º 3
0
 /// <summary>
 /// Returns true if property with the specified name is found in the FroniusData class.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>Returns true if property is found.</returns>
 public static bool IsProperty(string property) => PropertyValue.GetPropertyInfo(typeof(FroniusData), property) != null;
Ejemplo n.º 4
0
 /// <summary>
 /// Returns true if property with the specified name is found in the Report2Data class.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>Returns true if property is found.</returns>
 public static bool IsProperty(string property)
 => (PropertyValue.GetPropertyInfo(typeof(Report2Data), property) != null) ? true : false;
Ejemplo n.º 5
0
 /// <summary>
 /// Returns the <see cref="PropertyInfo"/> data for the property with the specified name.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The property info.</returns>
 public static PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(NetatmoData), property);
Ejemplo n.º 6
0
 public static System.Reflection.PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(RootCommand), property);
Ejemplo n.º 7
0
 public static bool IsProperty(string property) => (PropertyValue.GetPropertyInfo(typeof(RootCommand), property) != null) ? true : false;
Ejemplo n.º 8
0
 /// <summary>
 /// Returns the <see cref="PropertyInfo"/> data for the property with the specified name.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The property info.</returns>
 public static PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(EM300LRData), property);
Ejemplo n.º 9
0
 /// <summary>
 /// Returns the <see cref="PropertyInfo"/> data for the property with the specified name.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The property info.</returns>
 public static PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(BControlData), property);
Ejemplo n.º 10
0
 /// <summary>
 /// Returns true if property with the specified name is found in the ETAPU11Data class.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>Returns true if property is found.</returns>
 public static bool IsProperty(string property) => PropertyValue.GetPropertyInfo(typeof(BControlData), property) != null;
Ejemplo n.º 11
0
 /// <summary>
 /// Returns the Modbus attribute of the property.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The Modbus attribute.</returns>
 public static ModbusAttribute GetModbusAttribute(string property) =>
 ModbusAttribute.GetModbusAttribute(PropertyValue.GetPropertyInfo(typeof(BControlData), property));
Ejemplo n.º 12
0
 /// <summary>
 /// Returns the <see cref="PropertyInfo"/> data for the property with the specified name.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The property info.</returns>
 public static PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(SYMO823MData), property);
Ejemplo n.º 13
0
 /// <summary>
 /// Returns true if property with the specified name is found in the ETAPU11Data class.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>Returns true if property is found.</returns>
 public static bool IsProperty(string property) => PropertyValue.GetPropertyInfo(typeof(SYMO823MData), property) != null;
Ejemplo n.º 14
0
 /// <summary>
 /// Returns true if property with the specified name is found in the InverterInfo class.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>Returns true if property is found.</returns>
 public static bool IsProperty(string property)
 => (PropertyValue.GetPropertyInfo(typeof(InverterInfo), property) != null) ? true : false;
Ejemplo n.º 15
0
 /// <summary>
 /// Returns true if property with the specified name is found in the ETAPU11Data class.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>Returns true if property is found.</returns>
 public static bool IsProperty(string property) => PropertyValue.GetPropertyInfo(typeof(HomeValues), property) != null;
Ejemplo n.º 16
0
 /// <summary>
 /// Returns true if property with the specified name is found in the InverterInfo class.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>Returns true if property is found.</returns>
 public static bool IsProperty(string property)
 => (PropertyValue.GetPropertyInfo(typeof(ZipatoOthers), property) != null) ? true : false;
Ejemplo n.º 17
0
 /// <summary>
 /// Returns the <see cref="PropertyInfo"/> data for the property with the specified name.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The property info.</returns>
 public static PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(HomeValues), property);
Ejemplo n.º 18
0
 /// <summary>
 /// Returns the <see cref="PropertyInfo"/> data for the property with the specified name.
 /// </summary>
 /// <param name="property">The property name.</param>
 /// <returns>The property info.</returns>
 public static PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(WallboxData), property);