Esempio n. 1
0
        /*--------------------------------------------------------------------------------------------*/
        public static T AsColumn <T>(this T pElem, string pLabel) where T : IWeaverElement
        {
            var ac = new WeaverStepAsColumn <T>(pElem, pElem.Path.Config, pLabel);

            pElem.Path.AddItem(ac);
            return(pElem);
        }
Esempio n. 2
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 public static T AsColumn <T>(this T pElem, string pLabel, Expression <Func <T, object> > pProperty,
                              out IWeaverStepAsColumn <T> pAlias) where T : IWeaverElement
 {
     pAlias = new WeaverStepAsColumn <T>(pElem, pElem.Path.Config, pLabel, pProperty);
     pElem.Path.AddItem(pAlias);
     return(pElem);
 }
Esempio n. 3
0
 /*--------------------------------------------------------------------------------------------*/
 public static T AsColumn <T>(this T pElem, string pLabel, out IWeaverStepAsColumn <T> pAlias)
     where T : IWeaverElement
 {
     pAlias = new WeaverStepAsColumn <T>(pElem, pElem.Path.Config, pLabel);
     pElem.Path.AddItem(pAlias);
     return(pElem);
 }
Esempio n. 4
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        protected override void SetUp()
        {
            vLabel = "MyColumn";
            vProp  = "PerName";

            var mockPath   = new Mock <IWeaverPath>();
            var mockPerson = new Mock <Person>();

            mockPerson.SetupGet(x => x.Path).Returns(mockPath.Object);

            Expression <Func <Person, object> > exp = (x => x.Name);

            var mockCfg = new Mock <IWeaverConfig>();

            mockCfg.Setup(x => x.GetPropertyDbName(exp)).Returns(vProp);

            vObjCol  = new WeaverStepAsColumn <Person>(mockPerson.Object, mockCfg.Object, vLabel);
            vPropCol = new WeaverStepAsColumn <Person>(mockPerson.Object, mockCfg.Object, vLabel, exp);
        }