Beispiel #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);
        }
Beispiel #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);
Beispiel #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;
 /// <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;
Beispiel #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);
Beispiel #6
0
 public static System.Reflection.PropertyInfo GetPropertyInfo(string property) => PropertyValue.GetPropertyInfo(typeof(RootCommand), property);
Beispiel #7
0
 public static bool IsProperty(string property) => (PropertyValue.GetPropertyInfo(typeof(RootCommand), property) != null) ? true : false;
 /// <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);
 /// <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);
 /// <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;
 /// <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));
Beispiel #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);
Beispiel #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;
 /// <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;
Beispiel #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;
Beispiel #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;
Beispiel #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);
Beispiel #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);