示例#1
0
        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();
        }
示例#2
0
 internal override void SendAttached()
 {
     Inner?.SendAttached();
 }
示例#3
0
		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();
		}