예제 #1
0
파일: TraceProvider.cs 프로젝트: ewin66/SAE
 /// <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);
         }
     }
 }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 protected override void ForceSampled()
 {
     Unity.Get().ForceSampled();
     base.ForceSampled();
 }