コード例 #1
0
        private string Build()
        {
            var options = AttributeOptions.UseOrCreate(Options);

            return(string.Join(" ",
                               this.Select(a =>
            {
                if (a.Options == null)
                {
                    a.Options = options;
                }
                return a.ToString();
            })
                               .Where(val => !string.IsNullOrEmpty(val))
                               ));
        }
コード例 #2
0
 public AttributeList(IEnumerable <KeyValuePair <string, object> > attributes, AttributeOptions options = null)
     : base(attributes, options)
 {
 }
コード例 #3
0
 public AttributeList(AttributeOptions options = null) : base(options)
 {
 }
コード例 #4
0
 public AttributeListBase(AttributeOptions options = null)
 {
     Options = options;
 }
コード例 #5
0
 public AttributeListBase(IEnumerable <KeyValuePair <string, object> > attributes, AttributeOptions options = null) : this(options)
 {
     if (attributes == null)
     {
         return;
     }
     foreach (var pair in attributes)
     {
         Add(new AttributeBase(pair.Key, pair.Value));
     }
 }