AddWhen() public method

public AddWhen ( string text, when method ) : void
text string
method when
return void
Exemplo n.º 1
0
 void ProcessWhen()
 {
     //execute all when items found.
     _fields.Where(fieldInfo => fieldInfo.FieldType == typeof(when))
     .Select(fieldInfo => new { Delegate = (when)fieldInfo.GetValue(_testClass), Field = fieldInfo }).ToList()
     .ForEach(x =>
     {
         x.Delegate.Invoke();
         _testStateManager.AddWhen(x.Field.Name, x.Delegate);
     });
 }