Connection.Modules Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a list of modules for the current connection.
public:
property System::Collections::IDictionary ^ Modules { System::Collections::IDictionary ^ get(); };
public System.Collections.IDictionary Modules { get; }
member this.Modules : System.Collections.IDictionary
Public ReadOnly Property Modules As IDictionary
Property Value
A IDictionary interface that contains the list of modules for the current connection. The IDictionary key contains the module name and the IDictionary value contains the service type.
Examples
public LinkedList<string> ModulesList(IServiceProvider sp) {
Connection con = (Connection)sp.GetService(typeof(Connection));
LinkedList<string> llp = new LinkedList<string>();
System.Collections.IDictionary dict = con.Modules;
if (dict == null) {
llp.AddLast("No Modules");
return llp;
}
foreach (System.Collections.DictionaryEntry de in dict) {
if (de.Key.ToString().ToLower().Contains("extensibility") ||
de.Key.ToString().ToLower().Trim().Contains("perf") ||
de.Key.ToString().ToLower().Trim().Contains("cnfg"))
llp.AddFirst("Custom Mod ---" + de.Key.ToString() + " Service type = " + de.Value.ToString());
else
llp.AddLast(de.Key.ToString() + " Service type = " + de.Value.ToString());
}
return llp;
}