private void SetSubStrategyParameters(SellSideInstrumentStrategy strategy) { var fields = strategy.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (var f in fields.Where(f => f.GetCustomAttributes(typeof(ParameterAttribute), true).Any())) { f.SetValue(strategy, f.GetValue(this)); } }
private void SetSubStrategyParameters(SellSideInstrumentStrategy strategy) { var fields = strategy.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (var f in fields.Where(f => f.GetCustomAttributes(typeof(ParameterAttribute), true).Any())) f.SetValue(strategy, f.GetValue(this)); }