From f4d83d8410c2a8a1cf2e3a01c0cbf1c608b25309 Mon Sep 17 00:00:00 2001 From: Marius Volkhart Date: Thu, 29 Nov 2018 12:42:26 +0700 Subject: [PATCH] Expand XMLDocs for QueryAttribute and CollectionFormat --- Refit/Attributes.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Refit/Attributes.cs b/Refit/Attributes.cs index 542b2b0cc..72986b9ab 100644 --- a/Refit/Attributes.cs +++ b/Refit/Attributes.cs @@ -198,7 +198,8 @@ public AuthorizeAttribute(string scheme = "Bearer") public enum CollectionFormat { /// - /// Values formatted wiht RefitSettings.UrlParameterFormatter + /// Values formatted with or + /// . /// RefitParameterFormatter, @@ -257,7 +258,29 @@ public QueryAttribute(CollectionFormat collectionFormat) CollectionFormat = collectionFormat; } + /// + /// Used to customize the name of either the query parameter pair or of the form field when form encoding. + /// + /// public string Delimiter { get; protected set; } = "."; + + /// + /// Used to customize the name of the encoded value. + /// + /// + /// Gets combined with in the format var name = $"{Prefix}{Delimiter}{originalFieldName}" + /// where originalFieldName is the name of the object property or method parameter. + /// + /// + /// + /// class Form + /// { + /// [Query("-", "dontlog")] + /// public string password { get; } + /// } + /// + /// will result in the encoded form having a field named dontlog-password. + /// public string Prefix { get; protected set; } public string Format { get; set; }