BufferedWebEventProvider.Initialize Method (String, NameValueCollection)

 

Sets the initial values for this object.

Namespace:   System.Web.Management
Assembly:  System.Web (in System.Web.dll)

Public Overrides Sub Initialize (
	name As String,
	config As NameValueCollection
)

Parameters

name
Type: System.String

The name used in the configuration file to identify this provider.

config
Type: System.Collections.Specialized.NameValueCollection

A NameValueCollection that specifies the attributes assigned for this provider in the configuration file.

ASP.NET calls the Initialize method after calling the BufferedWebEventProvider constructor. This method is called to initialize the BufferedWebEventProvider with the configuration settings and name specified in the configuration file.

The following code example shows how to use the Initialize method.

' Initializes the provider.
 Public Overrides Sub Initialize(ByVal name As String, _
 ByVal config As NameValueCollection)
     MyBase.Initialize(name, config)

     ' Get the configuration information.
     providerName = name
     buffer = SampleUseBuffering.ToString()
     bufferModality = SampleBufferMode

     customInfo.AppendLine(String.Format( _
     "Provider name: {0}", providerName))
     customInfo.AppendLine(String.Format( _
     "Buffering: {0}", buffer))
     customInfo.AppendLine(String.Format( _
     "Buffering modality: {0}", bufferModality))
 End Sub 'Initialize

.NET Framework
Available since 2.0
Return to top
Show: