Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="tracingRecord"></param>
        /// <param name="systemID"></param>
        /// <param name="systemName"></param>
        /// <param name="environment"></param>
        public static void UseTracingContext(ITracingRecord tracingRecord, string systemID = null, string systemName = null, string environment = null)
        {
            ServiceContainer.Register <ITracingContextHelper>(new ContextHelper());
            ServiceContainer.Register <ITracingRecord>(tracingRecord);
            ServiceContainer.Register <IInitRequestScopeContext>(new InitRequestScopeContext());

            EnvironmentConfig.SystemID    = systemID;
            EnvironmentConfig.SystemName  = systemName;
            EnvironmentConfig.Environment = environment;
        }
Пример #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="tracingRecord"></param>
        /// <param name="systemID"></param>
        /// <param name="systemName"></param>
        /// <param name="environment"></param>
        public static void UseTracingContext(ITracingRecord tracingRecord, string systemID = null, string systemName = null, string environment = null)
        {
            ServiceContainer.Register<ITracingContextHelper>(new ContextHelper());
            ServiceContainer.Register<ITracingRecord>(tracingRecord);
            ServiceContainer.Register<IInitRequestScopeContext>(new InitRequestScopeContext());

            EnvironmentConfig.SystemID = systemID;
            EnvironmentConfig.SystemName = systemName;
            EnvironmentConfig.Environment = environment;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="app"></param>
        /// <param name="tracingRecord"></param>
        /// <param name="systemID"></param>
        /// <param name="systemName"></param>
        /// <param name="environment"></param>
        public static void UseTracingContext(this IAppBuilder app, ITracingRecord tracingRecord, string systemID = null, string systemName = null, string environment = null)
        {
            app.UseRequestScopeContext();
            ServiceContainer.Register<ITracingContextHelper>(new HttpContextHelper());
            ServiceContainer.Register<ITracingRecord>(tracingRecord);
            ServiceContainer.Register<IInitRequestScopeContext>(new InitRequestScopeContext());

            EnvironmentConfig.SystemID = systemID;
            EnvironmentConfig.SystemName = systemName;
            EnvironmentConfig.Environment = environment;
            Util.SetThreadPool();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="app"></param>
        /// <param name="tracingRecord"></param>
        /// <param name="systemID"></param>
        /// <param name="systemName"></param>
        /// <param name="environment"></param>
        public static void UseTracingContext(this IAppBuilder app, ITracingRecord tracingRecord, string systemID = null, string systemName = null, string environment = null)
        {
            app.UseRequestScopeContext();
            ServiceContainer.Register <ITracingContextHelper>(new HttpContextHelper());
            ServiceContainer.Register <ITracingRecord>(tracingRecord);
            ServiceContainer.Register <IInitRequestScopeContext>(new InitRequestScopeContext());

            EnvironmentConfig.SystemID    = systemID;
            EnvironmentConfig.SystemName  = systemName;
            EnvironmentConfig.Environment = environment;
            Util.SetThreadPool();
        }
Пример #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="record"></param>
 /// <param name="request"></param>
 public static void RecordTraceLog(this ITracingRecord record, HttpRequestMessage request)
 {
     record.RecordTraceLog(new Rpc.Tracing.TraceLogs());
     //new TracingRecordRabbitmq(null, null, null).RecordTraceLog2(request);
 }