コード例 #1
0
        public void WriteAttributeTo(TextWriter writer, string name, PositionTagged <string> start, PositionTagged <string> end, params AttributeValue[] args)
        {
            var totalArgWritten = 0;

            foreach (var attributeValue in args)
            {
                if (attributeValue.Value.Value == null)
                {
                    continue;
                }

                totalArgWritten++;
                if (totalArgWritten == 1)
                {
                    WriteLiteralTo(writer, start.Value);
                }
                WriteTo(writer, attributeValue.Prefix.Value);
                WriteTo(writer, attributeValue.Value.Value);
            }

            if (totalArgWritten > 0)
            {
                WriteLiteralTo(writer, end.Value);
            }
        }
コード例 #2
0
        protected void WriteAttribute(string name, PositionTagged <string> start, PositionTagged <string> end, params AttributeValue[] args)
        {
            var totalArgWritten = 0;

            foreach (var attributeValue in args)
            {
                if (attributeValue.Value.Value == null)
                {
                    continue;
                }

                totalArgWritten++;
                if (totalArgWritten == 1)
                {
                    WriteLiteral(start.Value);
                }

                Write(attributeValue.Prefix.Value);
                Write(attributeValue.Value.Value);
            }

            if (totalArgWritten > 0)
            {
                WriteLiteral(end.Value);
            }
        }
コード例 #3
0
ファイル: PositionTagged.cs プロジェクト: zzekikaya/fubumvc
        public override bool Equals(object obj)
        {
            PositionTagged <T> other = obj as PositionTagged <T>;

            return(other != null &&
                   other.Position == Position &&
                   Equals(other.Value, Value));
        }
コード例 #4
0
ファイル: AttributeValue.cs プロジェクト: zzekikaya/fubumvc
 public AttributeValue(PositionTagged <string> prefix, PositionTagged <object> value, bool literal)
 {
     Prefix  = prefix;
     Value   = value;
     Literal = literal;
 }