private static void ProcessAttributeAsSignalFunction( SignalFunction sf, string name, ListViewItem lvi ) { if (sf != null) { foreach (PropertyInfo pi in sf.GetType().GetProperties()) { object value = pi.GetValue( sf, null ); if (value != null) { if (IsStringArray( pi )) { foreach (string s in ( (string[]) value )) TestItemColor( s, name, pi, lvi ); } else { TestItemColor( value.ToString(), name, pi, lvi ); } } else if (name.Equals( pi.Name )) { lvi.BackColor = RELATED_COLOR; } } } }
public static bool LoadFromFile(string fileName, out SignalFunction obj) { System.Exception exception; return LoadFromFile(fileName, out obj, out exception); }
public static bool Deserialize(string input, out SignalFunction obj) { System.Exception exception; return Deserialize(input, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an SignalFunction object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output SignalFunction object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out SignalFunction obj, out System.Exception exception) { exception = null; obj = default(SignalFunction); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } }
/// <summary> /// Deserializes workflow markup into an SignalFunction object /// </summary> /// <param name="input">string workflow markup to deserialize</param> /// <param name="obj">Output SignalFunction object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string input, out SignalFunction obj, out System.Exception exception) { exception = null; obj = default(SignalFunction); try { obj = Deserialize(input); return true; } catch (System.Exception ex) { exception = ex; return false; } }