コード例 #1
0
ファイル: WeaverPathPipe.cs プロジェクト: inthefabric/Weaver
        /*--------------------------------------------------------------------------------------------*/
        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);
        }
コード例 #2
0
ファイル: WeaverPathPipe.cs プロジェクト: inthefabric/Weaver
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 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);
 }
コード例 #3
0
ファイル: WeaverPathPipe.cs プロジェクト: inthefabric/Weaver
 /*--------------------------------------------------------------------------------------------*/
 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);
 }
コード例 #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);
        }