SoapContext.Item Property
Gets or sets an object in the context property bag.
Namespace: Microsoft.Web.Services2
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)
Usage
'Usage
Dim soapContext1 As SoapContext
Dim key As String
Dim returnValue As Object
returnValue = soapContext1.Item(key)
Dim sampleValue As Object
soapContext1.Item(key) = sampleValue
Syntax
'Declaration
Public Property Item( _
ByVal key As String _
) As Object
public object this[
string key
] {get; set;}
public: property Object^ Item{
Object^ get();
Void set(Object^);
}
public System.Object get_Item(
System.String key
);
public void set_Item(
System.String key
System.Object);
In JScript, you can use Indexed Properties defined by a class, but you cannot define your own.
Parameters
- key
The key of the object to get or set.
Property Value
The value associated with the specified key.
Exceptions
Exception type | Condition |
---|---|
System.ArgumentException | key is a name reserved by the WSE. The list of reserved names includes "Actor", "Attachments ", "ContentType", "Envelope", "ExtendedSecurity", "IsInbound", "IsIntermediary", "Referrals", "Path", "Security", "Timestamp", "WebRequest", and "WebResponse". |
Remarks
If the specified key is not found, attempting to get it returns null , and attempting to set it creates a new element using the specified key.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000
Target Platforms
Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone
See Also
Reference
SoapContext Class
Microsoft.Web.Services2 Namespace