NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ConfigQuery Class

Allows simple queries against configuration information.

Object
   Selector
      ConfigQuery

[Visual Basic]
Public Class ConfigQuery
   Inherits Selector
[C#]
public class ConfigQuery : Selector
[C++]
public __gc class ConfigQuery : public Selector
[JScript]
public class ConfigQuery extends Selector

Remarks

A caller can limit the items returned into a collection by specifying a ConfigQuery, instead of a FileSelector (or AppDomainSelector) in calls to methods on the ConfigManager.

Query capability is particularly useful for larger collections.

Requirements

Namespace: System.Configuration

Assembly: System.Configuration.dll

Example [C#]

[C#]

ConfigQuery query = new ConfigQuery("SELECT * FROM CodeBase WHERE Name=Wininet AND Selector=appdomain://");

IConfigCollection hints = ConfigManager.Get("CodeBase", query);
foreach (CodeBaseHint codebase in hints) {
 Console.WriteLine(codebase.Name+": "+codebase.CodeBase); 
}

See Also

ConfigQuery Members | System.Configuration Namespace