/// <summary> /// 通过<paramref name="dic"/>构建本地跟踪通过<see cref="ServerTrace"/>,<see cref="LocalTrace"/>使用 /// </summary> /// <param name="dic">字典对象</param> public void Create(IDictionary <string, string> dic = null) { if (dic == null) { Unity.Get(); } else { tracing.Trace trace; if (!_extractor.TryExtract(dic, (c, key) => { string value; c.TryGetValue(key, out value); return(value); }, out trace)) { Unity.Get(); } else { Unity.Set(trace); } } }
/// <summary> /// /// </summary> protected override void ForceSampled() { Unity.Get().ForceSampled(); base.ForceSampled(); }