This documentation is archived and is not being maintained.

Device.ConfigActions Enumeration

Visual Studio 2008

Specifies the action to take when provisioning a device.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.SmartDevice.Connectivity
Assembly:  Microsoft.SmartDevice.Connectivity (in Microsoft.SmartDevice.Connectivity.dll)

[FlagsAttribute]
public enum ConfigActions

Member nameDescription
ProcessInputProvision XML configuration to the device. Used to deploy policies to the device and query current policy settings on the device.
ReadMetadataRead metadata from the device.

This enumeration is used as a parameter when calling ProvisionDevice.

                // Query Device for current security policies  
                string readxml = @"
<wap-provisioningdoc>
    <characteristic type=""SecurityPolicy"">
        <parm-query name=""4123""/>
        <parm-query name=""4122""/>
        <parm-query name=""4101""/>
        <parm-query name=""4102""/>
        <parm-query name=""4097""/>
    </characteristic>
</wap-provisioningdoc>";
                Console.WriteLine(device.ProvisionDevice(readxml, 
                    Device.ConfigActions.ProcessInput));

                // Deploy two-tier prompt security configuration to device and see changes 
                string provisionxml = @"
<wap-provisioningdoc>
    <characteristic type=""SecurityPolicy"">
        <parm name=""4123"" value=""0"" />
        <parm name=""4122"" value=""0"" />
        <parm name=""4101"" value=""16"" />
        <parm name=""4102"" value=""1"" />
        <parm name=""4097"" value=""2"" />
    </characteristic>
</wap-provisioningdoc>";
                Console.WriteLine(device.ProvisionDevice(provisionxml, 
                    Device.ConfigActions.ProcessInput));

                // Read metadata about the policies
                Console.WriteLine(device.ProvisionDevice(readxml, 
                    Device.ConfigActions.ReadMetadata));
Show: