public AddWhen ( string text, when method ) : void | ||
text | string | |
method | when | |
Результат | void |
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); }); }