예제 #1
0
        public override ITagContextBuilder Put(TagKey key, TagValue value)
        {
            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }

            this.Tags[key] = value ?? throw new ArgumentNullException(nameof(value));
            return(this);
        }
예제 #2
0
 /// <summary>
 /// Creates a new <see cref="Tag"/> from the given key and value.
 /// </summary>
 /// <param name="key">The tag's key.</param>
 /// <param name="value">The tag's value.</param>
 /// <returns><see cref="Tag"/>.</returns>
 public static Tag Create(TagKey key, TagValue value)
 {
     return(new Tag(key, value));
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Tag"/> class with the key and value.
 /// </summary>
 /// <param name="key">Key name for the tag.</param>
 /// <param name="value">Value associated with the key name.</param>
 internal Tag(TagKey key, TagValue value)
 {
     this.Key   = key ?? throw new ArgumentNullException(nameof(key));
     this.Value = value ?? throw new ArgumentNullException(nameof(value));
 }
 public abstract ITagContextBuilder Put(TagKey key, TagValue value);