MvcValidatorToolkit/ValidationSet.cs
/// <summary>
/// Copies the element value from the Values collection into field member of the 
/// implementing validation set using reflection.
/// </summary>
Copies the element value from the Values collection into field member of the
implementing validation set using reflection.
Copies the element value from the Values collection into field member of the implementing validation set using reflection .
void UpdateFields()
		{
			FieldInfo[] fields = GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
			foreach(FieldInfo field in fields)
			{
				if(field.FieldType == typeof(string) && Values.ContainsKey(field.Name))
					field.SetValue(this, Values[field.Name]);
			}
		}
void UpdateFields ( ) { FieldInfo [ ] fields = GetType ( ) . GetFields ( BindingFlags . Instance | BindingFlags . NonPublic ) ; foreach ( FieldInfo field in fields ) { if ( field . FieldType == typeof ( string ) && Values . ContainsKey ( field . Name ) ) field . SetValue ( this , Values [ field . Name ] ) ; } }
Copies the element value from the Values collection into field member of the
implementing validation set using reflection.
Copies the element value from the Values collection into field member of the implementing validation set using reflection .