The AssemblyType action defines the type and assembly for a method that is called by the Configuration Manager 2007 console.

Note
The XML and C# code in this topic is available in the Dialog Prototype sample in the Configuration Manager SDK.

The following attributes and elements are specific to an action that calls a method in an assembly:

Method

The method signature is:

  Copy Code
public static void Method(object, ScopeNode, ActionDescription, IResultObject, PropertyDataUpdated, Status)

Where the parameters are as follows:

object


  • The object calling the method.

ScopeNode


The Configuration Manager console node that was active when the action was called
ActionDescription


The ActionDescription class instance that initiated the action.
IResultObject


The selected object, or null if there is no selected object.
PropertyDataUpdated


The delegate to open to provide update information for the Configuration Manager console view.
Status


Allows control of the Configuration Manager console busy status indicator. For more information, see the Microsoft Management Console SDK http://go.microsoft.com/fwlink/?LinkId=110556.

Example Implementation

The following is an example implementation of the method.

  Copy Code
public static void Method(object sender, ScopeNode scopeNode, ActionDescription action, IResultObject resultObject, PropertyDataUpdated dataUpdatedDelegate, Status status)
{
	if (resultObject != null)
	{
		DialogHelper.ShowMessageBox(string.Format("The {0} package was selected", resultObject["Name"].StringValue));
}
	else
	{
		DialogHelper.ShowMessageBox("No package was selected");
}
}

AssemblyType Action XML

The following XML example demonstrates how to call a method, Method, in a class, SampleClass. The method is in the assembly AdminUI.PrototypeDialog.dll.

  Copy Code
<ActionDescription Class="AssemblyType" DisplayName="Test Action (method)" MnemonicDisplayName="Mnemonic" Description="Description">
	<ActionAssembly>
			<Assembly>AdminUI.PrototypeDialog.dll</Assembly> 
		<Type>Microsoft.ConfigurationManagement.AdminConsole.PrototypeDialog.ExampleClass</Type>
		<Method>Method</Method>
	</ActionAssembly>
</ActionDescription>

See Also


Send comments about this topic to Microsoft.