Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion Refit/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ public AuthorizeAttribute(string scheme = "Bearer")
public enum CollectionFormat
{
/// <summary>
/// Values formatted wiht RefitSettings.UrlParameterFormatter
/// Values formatted with <see cref="RefitSettings.UrlParameterFormatter"/> or
/// <see cref="RefitSettings.FormUrlEncodedParameterFormatter"/>.
/// </summary>
RefitParameterFormatter,

Expand Down Expand Up @@ -257,7 +258,29 @@ public QueryAttribute(CollectionFormat collectionFormat)
CollectionFormat = collectionFormat;
}

/// <summary>
/// Used to customize the name of either the query parameter pair or of the form field when form encoding.
/// </summary>
/// <seealso cref="Prefix"/>
public string Delimiter { get; protected set; } = ".";

/// <summary>
/// Used to customize the name of the encoded value.
/// </summary>
/// <remarks>
/// Gets combined with <see cref="Delimiter"/> in the format <code>var name = $"{Prefix}{Delimiter}{originalFieldName}"</code>
/// where <c>originalFieldName</c> is the name of the object property or method parameter.
/// </remarks>
/// <example>
/// <code>
/// class Form
/// {
/// [Query("-", "dontlog")]
/// public string password { get; }
/// }
/// </code>
/// will result in the encoded form having a field named <c>dontlog-password</c>.
/// </example>
public string Prefix { get; protected set; }

public string Format { get; set; }
Expand Down