public TagScope(ITagThreadContext threadContext, TagScope parentTagScope) : this( threadContext ) { _parentTagScope = parentTagScope; GenerateThreadCorrelationId(parentTagScope.ThreadCorrelationId); _inheritedTags = new TagReadonlyCollection(parentTagScope._effectiveTags); _effectiveTags = new TagEffectiveCollection(_inheritedTags, _tags); }
public ITagScope CreateScope(IDictionary <string, string> tags) { TagScope tagScope; if (0 == _tagScopes.Count) { // Create first scope. This scope inherits application scope tags. tagScope = new TagScope(this, TagScopeManager.TagsAsReadonlyCollection, tags); } else { tagScope = new TagScope(this, _tagScopes.Last.Value, tags); } _tagScopes.AddLast(tagScope); InvalidateScope(tagScope); return(tagScope); }
public TagScope(ITagThreadContext threadContext, TagScope parentTagScope, IDictionary <string, string> tags) : this(threadContext, parentTagScope) { AddOrReplaceTags(tags); }