Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (RowSize != 0)
            {
                hash ^= RowSize.GetHashCode();
            }
            if (ColSize != 0)
            {
                hash ^= ColSize.GetHashCode();
            }
            hash ^= element_.GetHashCode();
            return(hash);
        }
Exemple #2
0
        public override string GenerateOutput(TagHelperOutput output, string content)
        {
            // col size
            if (ColSize.WithinRange())
            {
            }
            output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSize, String.Empty));
            if (ColSizeDesktop.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSizeDesktop, "-desktop"));
            }
            if (ColSizeTablet.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSizeTablet, "-tablet"));
            }
            if (ColSizePhone.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnSizeTemplate, ColSizePhone, "-phone"));
            }

            // offset
            if (ColSizeOffset.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffset, String.Empty));
            }
            if (ColSizeOffsetDesktop.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffsetDesktop, "-desktop"));
            }
            if (ColSizeOffsetTablet.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffsetTablet, "-tablet"));
            }
            if (ColSizeOffsetPhone.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOffsetTemplate, ColSizeOffsetPhone, "-phone"));
            }

            // order
            if (ColOrder.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrder, String.Empty));
            }
            if (ColOrderDesktop.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrderDesktop, "-desktop"));
            }
            if (ColOrderTablet.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrderTablet, "-tablet"));
            }
            if (ColOrderPhone.WithinRange())
            {
                output.AppendCssClass(String.Format(ColumnOrderTemplate, ColOrderPhone, "-phone"));
            }

            // hide
            if (ColHide)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, String.Empty));
            }
            if (ColHideDesktop)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, "-desktop"));
            }
            if (ColHideTablet)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, "-tablet"));
            }
            if (ColHidePhone)
            {
                output.AppendCssClass(String.Format(ColumnHideTemplate, "-phone"));
            }

            if (Stretch)
            {
                output.AppendCssClass("mdl-cell--stretch");
            }

            if (AlignTop)
            {
                output.AppendCssClass("mdl-cell--top");
            }
            if (AlignMiddle)
            {
                output.AppendCssClass("mdl-cell--middle");
            }
            if (AlignBottom)
            {
                output.AppendCssClass("mdl-cell--bottom");
            }

            return(content);
        }