Parsing User Settings

The user setting from the provisioned data specifies the location profile assigned to the user as well as the permission to perform file transfer. In UCMA, a user setting is encapsulated by a UserSettingConfiguration object, which exposes the configuration settings as a collection of name-value pairs known as the properties of the media configuration.

The following code example shows how the user setting might be parsed using UCMA.

        string ParseUserSettingConfiguration(ProvisioningData data)
        {
            if (data == null)
                return null;

            string msg = null;

            if (data.UserSettingConfiguration != null)
            {
                msg += "\r\nUserSettingConfiguration:\r\n";
                msg += "\tUserLocationProfile = " + data.UserSettingConfiguration.UserLocationProfile + "\r\n";

                if (data.UserSettingConfiguration.Properties != null)
                    foreach (string key in data.UserSettingConfiguration.Properties.Keys)
                    {
                        msg += "\tProperty[ " + key + " ] = " + data.UserSettingConfiguration.Properties[key] + "\r\n";

                    }
            }
            return msg;
        }

The following is an example output generated when the code statements above are invoked.

UserSettingConfiguration:
UserLocationProfile = W13RC1
Property[ ucuserlocationprofile ] = W13RC1
Property[ disablefiletransfer ] = false