/// <summary>
 /// Clone all fields using the ValueToString and StringToValue methods
 /// </summary>
 /// <param name="other"></param>
 protected virtual void ReadFromOther(PersistableSettings other)
 {
     foreach (PersistableItem item in m_Dictionary.Values)
     {
         foreach (PersistableItem itemOther in other.m_Dictionary.Values)
         {
             if (item.Name == itemOther.Name)
             {
                 string valOther = itemOther.Validator.ValueToString(itemOther.Value);
                 item.Value = item.Validator.StringToValue(valOther);
                 break;
             }
         }
     }
 }
Exemplo n.º 2
0
		/// <summary>
		/// Clone all fields using the ValueToString and StringToValue methods
		/// </summary>
		/// <param name="other"></param>
		protected virtual void ReadFromOther(PersistableSettings other)
		{
			foreach (PersistableItem item in m_Dictionary.Values)
			{
				foreach (PersistableItem itemOther in other.m_Dictionary.Values)
				{
					if (item.Name == itemOther.Name)
					{
						string valOther = itemOther.Validator.ValueToString( itemOther.Value );
						item.Value = item.Validator.StringToValue( valOther );
						break;
					}
				}
			}
		}