// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; namespace Microsoft.Framework.WebEncoders { /// /// Provides services for URL-escaping strings. /// public interface IUrlEncoder { /// /// URL-escapes a character array and writes the result to the supplied /// output. /// /// /// The encoded value is appropriately encoded for inclusion in the segment, query, or /// fragment portion of a URI. /// void UrlEncode(char[] value, int startIndex, int charCount, TextWriter output); /// /// URL-escapes a given input string. /// /// /// The URL-escaped value, or null if the input string was null. /// /// /// The return value is appropriately encoded for inclusion in the segment, query, or /// fragment portion of a URI. /// string UrlEncode(string value); /// /// URL-escapes a string and writes the result to the supplied output. /// /// /// The encoded value is appropriately encoded for inclusion in the segment, query, or /// fragment portion of a URI. /// void UrlEncode(string value, int startIndex, int charCount, TextWriter output); } }