public ServiceContext(IServiceContext parent, string prefixAddition = null, StringBuilder prePrefix = null) { if (parent == null) { throw new ArgumentNullException("parent"); } m_Parent = parent; var tracer = parent.GetService <ITracer>(); if (prefixAddition != null) { tracer = m_PrefixTracer = new PrefixTracer(prefixAddition, tracer, prePrefix); } SetTracer(tracer); }
public ServiceContext(ITracer tracer) { m_PrefixTracer = new PrefixTracer(null, tracer); SetTracer(m_PrefixTracer); }