ApplicationInsights.OwinExtensions.OperationIdContext.Create C# (CSharp) Метод

Create() публичный статический Метод

public static Create ( ) : void
Результат void
        public static void Create()
        {
            CallContext.LogicalSetData(Consts.OperationIdContextKey, _strategy.GenerateId());
        }

Usage Example

Пример #1
0
        private void InitializeOperationIdContext(IOwinContext context)
        {
            string idContextKey;

            if (_configuration.ShouldTryGetIdFromHeader &&
                TryGetIdFromHeader(context, out idContextKey))
            {
                OperationIdContext.Set(idContextKey);
            }
            else
            {
                OperationIdContext.Create();
            }

            context.Set(Consts.OperationIdContextKey, OperationIdContext.Get());
        }