Ejemplo n.º 1
0
        public override bool TryBinaryOperation(BinaryOperationBinder binder, object arg, out object result)
        {
            if (!(arg is XmlDynamicConstructor))
            {
                throw new ArgumentException("operatiing object should be type of XmlDynamicConstructor which is created by XDC.New!");
            }

            dynamic brother = arg;

            if (binder.Operation == ExpressionType.Add ||
                binder.Operation == ExpressionType.AddChecked)
            {
                Element.AddAfterSelf(brother.RootElement);
            }
            else
            {
                throw new NotImplementedException();
            }

            result = this;
            return(true);
        }