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