void AttachEffect(Effect effect) { if (_effectControlProvider == null) { return; } if (effect.IsAttached) { throw new InvalidOperationException("Cannot attach Effect to multiple sources"); } Effect effectToRegister = effect; if (effect is RoutingEffect) { effectToRegister = ((RoutingEffect)effect).Inner; } _effectControlProvider.RegisterEffect(effectToRegister); effectToRegister.Element = this; effect.SendAttached(); }
internal override void SendAttached() { Inner?.SendAttached(); }
void AttachEffect(Effect effect) { if (_effectControlProvider == null) return; if (effect.IsAttached) throw new InvalidOperationException("Cannot attach Effect to multiple sources"); Effect effectToRegister = effect; if (effect is RoutingEffect) effectToRegister = ((RoutingEffect)effect).Inner; _effectControlProvider.RegisterEffect(effectToRegister); effectToRegister.Element = this; effect.SendAttached(); }