src/Microsoft/Windows/ComponentObjectModel/Shell/_Library/ShellExtensionManager.cs
/// <summary>
/// Test for an association between a collection of progids and a shell extension.
/// </summary>
/// <param name="progids">The collection of progIds.</param>
/// <param name="handlerType">The shell extension type.</param>
/// <param name="clsid">The clsid of the shell extension.</param>
/// <param name="scope">The registration scope.</param>
/// <returns>true, if all progids are associated with the shell extension. Otherwise, false.</returns>
Test for an association between a collection of progids and a shell extension.
Test for an association between a collection of progids and a shell extension .
public bool IsAssociated( ShellExtensionAssociationCollection progids, string handlerType, string clsid, ComponentRegistrationScope scope ) {
            using( IRegistryKey classesKey = GetScopedClassesKey( scope, false ) ) {
                foreach( string progid in progids ) {
                    if( false == IsAssociated( classesKey, progid, handlerType, clsid ) ) {
                        return false;
                    }
                }
            }
            return true;
        }
public bool IsAssociated ( ShellExtensionAssociationCollection progids , string handlerType , string clsid , ComponentRegistrationScope scope ) { using ( IRegistryKey classesKey = GetScopedClassesKey ( scope , false ) ) { foreach ( string progid in progids ) { if ( false == IsAssociated ( classesKey , progid , handlerType , clsid ) ) { return false ; } } } return true ; }
Test for an association between a collection of progids and a shell extension.
Test for an association between a collection of progids and a shell extension .
true, if all progids are associated with the shell extension. Otherwise, false.
true if all progids are associated with the shell extension . Otherwise false .
progids
ShellExtensionAssociationCollection
The collection of progIds.
The collection of progIds .
handlerType
string
The shell extension type.
The shell extension type .
clsid
string
The clsid of the shell extension.
The clsid of the shell extension .
scope
ComponentRegistrationScope
The registration scope.
The registration scope .