Example #1
0
        // ReSharper disable once InconsistentNaming
        private static void VFSDelete(
            this IKuduClient client,
            Core.IO.Path remotePath)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            if (remotePath == null)
            {
                throw new ArgumentNullException(nameof(remotePath));
            }

            client.HttpDelete(EncodeVFSPath(remotePath));
        }
Example #2
0
        /// <summary>
        /// Delete setting from appservice.
        /// </summary>
        /// <param name="client">The Kudu client.</param>
        /// <param name="key">The key of settings to delete.</param>
        /// <example>
        /// <code>
        /// #addin nuget:?package=Cake.Kudu.Client
        ///
        /// string  baseUri     = EnvironmentVariable("KUDU_CLIENT_BASEURI"),
        ///         userName    = EnvironmentVariable("KUDU_CLIENT_USERNAME"),
        ///         password    = EnvironmentVariable("KUDU_CLIENT_PASSWORD");
        ///
        /// IKuduClient kuduClient = KuduClient(
        ///     baseUri,
        ///     userName,
        ///     password);
        ///
        /// kuduClient.SettingsDelete("FOO");
        /// </code>
        /// </example>
        public static void SettingsDelete(
            this IKuduClient client,
            string key)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            if (string.IsNullOrWhiteSpace(key))
            {
                throw new ArgumentNullException(nameof(key));
            }

            client.HttpDelete(
                $"/api/settings/{Uri.EscapeDataString(key)}");
        }