Set() public static method

public static Set ( string value ) : void
value string
return void
示例#1
0
        public override async Task Invoke(IOwinContext context)
        {
            var operationId = context.Get <string>(Consts.OperationIdContextKey);

            if (operationId != null)
            {
                OperationIdContext.Set(operationId);
            }

            await Next.Invoke(context);
        }
示例#2
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());
        }