/// <summary> /// Gets a data transfer object of the internal state of properties /// </summary> /// <returns></returns> public SigC GetInternalStateFields() { SigC v = new SigC(); FieldInfo[] fields = v.GetType().GetFields(); foreach (FieldInfo p in fields) { FieldInfo v1 = GetType().GetFields().FirstOrDefault(n => n.Name == p.Name); if (v1 != null) { p.SetValue(v, v1.GetValue(this)); } } return(v); }
/// <summary> /// Gets a data transfer object of the internal state of properties /// </summary> /// <returns></returns> public SigC GetInternalStateProperties() { SigC v = new SigC(); PropertyInfo[] properties = v.GetType().GetProperties(); foreach (PropertyInfo p in properties) { PropertyInfo v1 = GetType().GetProperties().FirstOrDefault(n => n.Name == p.Name); var setmethod = p.SetMethod; if (setmethod != null) { p.SetValue(v, v1.GetValue(this)); } } return(v); }
/// <summary> /// Gets a data transfer object of the internal state of properties /// </summary> /// <returns></returns> public SigC GetInternalStateProperties() { SigC v = new SigC(); PropertyInfo[] properties = v.GetType().GetProperties(); foreach (PropertyInfo p in properties) { PropertyInfo v1 = GetType().GetProperties().FirstOrDefault(n => n.Name == p.Name); var setmethod = p.SetMethod; if (setmethod != null) p.SetValue(v, v1.GetValue(this)); } return v; }
/// <summary> /// Gets a data transfer object of the internal state of properties /// </summary> /// <returns></returns> public SigC GetInternalStateFields() { SigC v = new SigC(); FieldInfo[] fields = v.GetType().GetFields(); foreach (FieldInfo p in fields) { FieldInfo v1 = GetType().GetFields().FirstOrDefault(n => n.Name == p.Name); if (v1 != null) p.SetValue(v, v1.GetValue(this)); } return v; }