private void GenerateConfiguration(FieldInfo[] fragments, int?[] current) { ITarget target = Activator.CreateInstance(TargetType) as ITarget; for (int i = 0; i < fragments.Length; ++i) { fragments[i].SetValue(target, current[i] ?? 0); } string targetKey = target.GetType().FullName + "__" + target.GetTargetString(); if (!_addedTargets.ContainsKey(targetKey)) { _addedTargets.Add(targetKey, target); _targetObjects.Add(target); } }
public TrackedConfiguration FindConfiguration(ITarget target) { return(Configurations[target.GetTargetString()]); }