public class Context extends Object
Context offers a means of passing arbitrary data (key/value pairs) to an HttpPipeline's
policy objects. Most applications do not need to pass arbitrary data to the pipeline and can pass
Context.NONE or null. Each context object is immutable. The withContext with data
method creates a new Context object that refers to its parent, forming a linked list.| Modifier and Type | Field and Description |
|---|---|
static Context |
NONE
Signifies that no data need be passed to the pipeline.
|
| Constructor and Description |
|---|
Context(Object key,
Object value)
Constructs a new
Context object. |
public static final Context NONE
public Context addData(Object key, Object value)
Context object with the specified key/value pair to the existing Context
chain.key - The key.value - The value.Context object containing the specified pair added to the set of pairs./**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/