Exemplo n.º 1
0
        /// <summary>
        /// Creates a JSON representation of this object.
        /// </summary>
        /// <param name="service">The service.</param>
        /// <returns>
        /// A Json value (either a JsonObject, an array of Json values, or a Json primitive)
        /// </returns>
        object IJsonSerializable.ToJson(ExchangeService service)
        {
            JsonObject jsonObject = new JsonObject();

            jsonObject.Add(XmlElementNames.UserConfigurationName, UserConfiguration.GetJsonUserConfigName(service, this.parentFolderId, this.name));
            jsonObject.Add(XmlElementNames.UserConfigurationProperties, this.properties.ToString().Replace(EnumDelimiter, string.Empty));

            return(jsonObject);
        }
        /// <summary>
        /// Creates a JSON representation of this object.
        /// </summary>
        /// <param name="service">The service.</param>
        /// <returns>
        /// A Json value (either a JsonObject, an array of Json values, or a Json primitive)
        /// </returns>
        object IJsonSerializable.ToJson(ExchangeService service)
        {
            JsonObject jsonObject = new JsonObject();

            jsonObject.Add(
                XmlElementNames.UserConfigurationName,
                UserConfiguration.GetJsonUserConfigName(service, this.parentFolderId, this.name));

            return(jsonObject);
        }