Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System.Globalization;
10 :
11 : namespace Cqrs.WebApi.Formatters.FormMultipart.Infrastructure
12 : {
13 : /// <summary>
14 : /// Settings for use during multi-part form-data formatting.
15 : /// </summary>
16 : public class MultipartFormatterSettings
17 1 : {
18 : /// <summary>
19 : /// Serialize byte array property as HttpFile when sending data if true or as indexed array if false
20 : /// (default value is "false)
21 : /// </summary>
22 : public bool SerializeByteArrayAsHttpFile { get; set; }
23 :
24 : /// <summary>
25 : /// Add validation error "The value is required." if no value is present in request for non-nullable property if this parameter is "true"
26 : /// (default value is "false)
27 : /// </summary>
28 : public bool ValidateNonNullableMissedProperty { get; set; }
29 :
30 : private CultureInfo _cultureInfo;
31 :
32 : /// <summary>
33 : /// Default is <see cref="System.Globalization.CultureInfo.CurrentCulture"/>
34 : /// </summary>
35 : public CultureInfo CultureInfo
36 : {
37 : get { return _cultureInfo ?? CultureInfo.CurrentCulture; }
38 : set { _cultureInfo = value; }
39 : }
40 : }
41 : }
|