Example #1
0
        protected virtual Order GetOrder([NotNull] ActionContext context)
        {
            Assert.ArgumentNotNull(context, "context");

            if (this.UblEntityResolver == null)
            {
                Assert.IsNotNull(context.Owner, "context.Owner cannot be null.");
                Assert.IsNotNull(context.Owner.Page, "context.Owner.Page cannot be null.");
                if (context.Owner.Page is SmartPanel)
                {
                    this.UblEntityResolver = new OnSmartPanelStrategy();
                }
                else if (context.Owner.Page is Default)
                {
                    this.UblEntityResolver = new OnDefaultPageStrategy();
                }

                else
                {
                }
            }

            Assert.IsNotNull(this.UblEntityResolver, "UblEntityResolver cannot be null.");
            return(this.UblEntityResolver.GetEntity(context) as Order);
        }
        protected virtual Order GetOrder([NotNull] ActionContext context)
        {
            Assert.ArgumentNotNull(context, "context");

              if (this.UblEntityResolver == null)
              {
            Assert.IsNotNull(context.Owner, "context.Owner cannot be null.");
            Assert.IsNotNull(context.Owner.Page, "context.Owner.Page cannot be null.");
            if (context.Owner.Page is SmartPanel)
            {
              this.UblEntityResolver = new OnSmartPanelStrategy();
            }
            else if (context.Owner.Page is Default)
            {
              this.UblEntityResolver = new OnDefaultPageStrategy();
            }

            else { }
              }

              Assert.IsNotNull(this.UblEntityResolver, "UblEntityResolver cannot be null.");
              return this.UblEntityResolver.GetEntity(context) as Order;
        }