public override string ToString() { var firstprop = LiveProperties.FirstOrDefault(); if (firstprop != null) { return(string.Format("[Valve: Path={0}, Values={1}]", firstprop.Path, string.Join(",", LiveProperties.Select(p => p.Value).Distinct()))); } else { return("[Valve: Path=(none), Value=(none)]"); } }
public bool Activate(object toActivate) { if (toActivate == null) { return(false); } var prop = LiveProperties.FirstOrDefault(p => ReferenceEquals(toActivate, p.Object)); if (prop != null) { var value = prop.Value; Push(prop, value); OnValueChanged(prop, value); return(true); } return(false); }