private void AddNewRole(ServiceConfiguration sc, RoleSettings newRole)
        {
            int count = (sc.Role == null) ? 0 : sc.Role.Length;
            RoleSettings[] roleSettings = new RoleSettings[count + 1];

            if (count > 0)
            {
                sc.Role.CopyTo(roleSettings, 0);
            }
            roleSettings[count] = newRole;
            sc.Role = roleSettings;
        }
        private bool UpdateSetting(ref RoleSettings rs, CouchDBDeployCmdlets.ServiceConfigurationSchema.ConfigurationSetting cs)
        {
            bool done = false;
            int count = (rs.ConfigurationSettings == null) ? 0 : rs.ConfigurationSettings.Length;
            for (int i = 0; i < count; i++)
            {
                CouchDBDeployCmdlets.ServiceConfigurationSchema.ConfigurationSetting setting = rs.ConfigurationSettings[i];

                if (setting.name == cs.name)
                {
                    setting.value = cs.value;
                    done = true;
                }
            }
            return done;
        }