RequiredValues.cs
1 using sage.ew.interficies;
2 using System;
3 using System.Collections.Generic;
4 using System.Linq;
5 using System.Text;
6 using System.Threading.Tasks;
7 
8 namespace Sage.ES.S50.UnitTest
9 {
10  internal class RequiredValues
11  {
12  #region Members
13  Dictionary<string, object> _RequiredValues = new Dictionary<string, object>();
14  #endregion
15 
16  #region Public Methods
17  public void Add(string tsProperty, object toValue)
18  {
19  if (_RequiredValues.ContainsKey(tsProperty))
20  {
21  _RequiredValues[tsProperty] = toValue;
22  }
23  else
24  _RequiredValues.Add(tsProperty, toValue);
25  }
26  public void FillRequiredValues(IMante target)
27  {
28  Type loType = target.GetType();
29  foreach (var item in _RequiredValues)
30  {
31  loType.GetProperty(item.Key).SetValue(target, item.Value);
32  }
33  }
34  #endregion
35 
36  }
37 }
Nueva interficie madre de IMantes y de la que colgara ewMante. Propiedades: _Codigo, _Nombre, _Error_Message. Metodos: _New, Save, _Delete, _Load, _Existe_Registro, _Clonar
Definition: IMantes.cs:17
AƱade una nueva instancia