BalticAmadeus.FluentMdx.MdxMember.WithValue C# (CSharp) Method

WithValue() public method

Sets the value for member and returns the updated current instance of MdxMember.
public WithValue ( string value ) : MdxMember
value string Specified member value.
return MdxMember
        public MdxMember WithValue(string value)
        {
            Value = value;

            return this;
        }

Usage Example

        public void SimpleWay()
        {
            var axisSlicerMember = new MdxMember();
            axisSlicerMember.Titled("Dim Hierarchy", "Dim");

            var axisSlicer = new MdxTuple();
            axisSlicer.With(axisSlicerMember);

            var axis = new MdxAxis();
            axis.Titled(MdxAxisType.Columns);
            axis.AsNonEmpty();
            axis.WithSlicer(axisSlicer);

            var cube = new MdxCube();
            cube.Titled("Cube");

            var querySlicerMember = new MdxMember();
            querySlicerMember.Titled("Dim Hierarchy", "Dim", "Dim Key");
            querySlicerMember.WithValue("1");

            var querySlicer = new MdxTuple();
            querySlicer.With(querySlicerMember);

            var query = new MdxQuery();
            query.On(axis);
            query.From(cube);
            query.Where(querySlicer);
        }