DumpDictionary Method
Dumps a Dictionary Object object to the output stream with no indentation.
This API is not CLS-compliant.
Namespace: Microsoft.CommerceServer.Runtime.Diagnostics
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
<CLSCompliantAttribute(False)> _
Public Shared Sub DumpDictionary ( _
dictionary As IDictionary, _
output As HtmlTextWriter, _
name As String _
)
'Usage
Dim dictionary As IDictionary
Dim output As HtmlTextWriter
Dim name As String
DumpUtils.DumpDictionary(dictionary, _
output, name)
[CLSCompliantAttribute(false)]
public static void DumpDictionary(
IDictionary dictionary,
HtmlTextWriter output,
string name
)
[CLSCompliantAttribute(false)]
public:
static void DumpDictionary(
IDictionary^ dictionary,
HtmlTextWriter^ output,
String^ name
)
public static function DumpDictionary(
dictionary : IDictionary,
output : HtmlTextWriter,
name : String
)
Parameters
- dictionary
Type: Microsoft.CommerceServer.Runtime..::.IDictionary
Dictionary to be dumped.
- output
Type: System.Web.UI..::.HtmlTextWriter
The HtmlTextWriter output stream.
- name
Type: System..::.String
Dictionary name for display.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The output or name is nullNothingnullptra null reference (Nothing in Visual Basic). |
Remarks
Use this method to dump a Dictionary Object object to the output stream with no indentation.
Examples
To supply the DumpDictionary method with an HtmlTextWriter object that wraps the ASP .NET Response object, you must supply an output parameter.
[C#]
using Commerce = Microsoft.CommerceServer.Runtime;
using Microsoft.CommerceServer.Runtime.Diagnostics;
Commerce.Dictionary dict = new Commerce.DictionaryClass();
dict["testKey"] = "testValue";
DumpUtils.DumpDictionary(dict, new HtmlTextWriter(Response.Output), "My Dictionary Object");
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Runtime.Diagnostics
Dim dict As New Microsoft.CommerceServer.Runtime.DictionaryClass()
dict.Value("testKey") = "testValue"
Call DumpUtils.DumpDictionary(dict, New HtmlTextWriter(Response.Output), "My Dictionary Object")
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.