<ConnectionMonitor>Following values can use for the Type attribute
<Networks>
<add Name="Intranet" Address="http://contoso"/>
<add Name="Internet" Address="http://www.microsoft.com"/>
</Networks>
<Connections>
<add Type="WiredConnection" Price="1"/>
</Connections>
</ConnectionMonitor>
- NicConnection. The application block uses the NicConnection class to monitor any network interface connection—for example, an Ethernet card or wireless adapter. This class provides the capability to detect if the application has a connection to a network.
- WiredConnection. The application block uses the WiredConnection class to monitor connectivity to Ethernet adapters.
- WirelessConnection. The application block uses the WirelessConnection class to monitor connectivity to wireless network adapters.
- DesktopConnection. The application block uses the DesktopConnection class to monitor connectivity to local services (you can manually set the connection state of this class).
Define a configuration section for the application block in the application configuration file. To do this, add a <section> node to the <configSections> node of your App.config file
<configSections>Create the application block configuration section and define your logical networks. Configure each logical network inside a
<section name="ConnectionMonitor" type="Microsoft.Practices.SmartClient.ConnectionMonitor.Configuration.ConnectionSettingsSection, Microsoft.Practices.SmartClient.ConnectionMonitor" />
</configSections>
<ConnectionMonitor>If you want to monitor physical network adapters, add the configuration information for the network adapters inside a <connections> element.
<Networks>
<add Name="Intranet" Address="http://intranet"/>
<add Name="Internet" Address="http://www.microsoft.com"/>
</Networks>
</ConnectionMonitor>
<ConnectionMonitor>Optionally, specify the type name of the network status strategy to use to monitor the connection status of the logical network.
<Connections>
<add Type="WiredConnection" Price="1"/>
<add Type="WirelessConnection" Price="2"/>
</Connections>
</ConnectionMonitor>
<ConnectionMonitor>
<Networks StrategyType="ConnectionModule.CustomNetworkStatusStrategy, ConnectionModule">
<add Name="Intranet" Address="http://intranet"/>
<add Name="Internet" Address="http://www.microsoft.com"/>
</Networks>
</ConnectionMonitor>
No comments:
Post a Comment