Exemple #1
0
        /// <summary>
        /// Serializes the <see cref="OpenIdConnectConfiguration"/> object to a json string.
        /// </summary>
        /// <param name="configuration"><see cref="OpenIdConnectConfiguration"/> object to serialize.</param>
        /// <returns>json string representing the configuration object.</returns>
        /// <exception cref="ArgumentNullException">If 'configuration' is null.</exception>
        public static string Write(OpenIdConnectConfiguration configuration)
        {
            if (configuration == null)
            {
                throw LogHelper.LogArgumentNullException(nameof(configuration));
            }

            IdentityModelEventSource.Logger.WriteVerbose(LogMessages.IDX10809);
            return(JsonConvert.SerializeObject(configuration));
        }
        /// <summary>
        /// Serializes the <see cref="OpenIdConnectConfiguration"/> object to a json string.
        /// </summary>
        /// <param name="configuration"><see cref="OpenIdConnectConfiguration"/> object to serialize.</param>
        /// <returns>json string representing the configuration object.</returns>
        /// <exception cref="ArgumentNullException">If 'configuration' is null.</exception>
        public static string Write(OpenIdConnectConfiguration configuration)
        {
            if (configuration == null)
            {
                throw LogHelper.LogArgumentNullException(nameof(configuration));
            }

            LogHelper.LogVerbose(LogMessages.IDX21809);
            return(JsonConvert.SerializeObject(configuration));
        }
        /// <summary>
        /// Serializes the <see cref="OpenIdConnectConfiguration"/> object to a json string.
        /// </summary>
        /// <param name="configuration"><see cref="OpenIdConnectConfiguration"/> object to serialize.</param>
        /// <returns>json string representing the configuration object.</returns>
        /// <exception cref="ArgumentNullException">If 'configuration' is null.</exception>
        public static string Write(OpenIdConnectConfiguration configuration)
        {
            if (configuration == null)
            {
                throw LogHelper.LogArgumentNullException(nameof(configuration));
            }

            if (LogHelper.Logger.IsTraceLevelEnabled())
            {
                LogHelper.Logger.LogTrace(LogMessages.IDX10809);
            }
            return(JsonConvert.SerializeObject(configuration));
        }