[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / class / System.Web.Services / System.Web.Services / WebMethodAttribute.cs
blob8afe8a9bc561f64744b75a19825529565666f1a5
1 //
2 // System.Web.Services.WebMethodAttribute.cs
3 //
4 // Author:
5 // Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 #if !MOBILE
32 using System.EnterpriseServices;
33 #endif
35 namespace System.Web.Services {
37 #if MOBILE
38 public enum TransactionOption {Disabled , NotSupported , Required , RequiresNew , Supported }
39 #endif
41 [AttributeUsage(AttributeTargets.Method, Inherited = true)]
42 public sealed class WebMethodAttribute : Attribute {
44 #region Fields
46 bool bufferResponse;
47 int cacheDuration;
48 string description;
49 bool enableSession;
50 string messageName;
51 TransactionOption transactionOption;
53 #endregion // Fields
55 #region Constructors
57 public WebMethodAttribute ()
58 : this (false, TransactionOption.Disabled, 0, true)
62 public WebMethodAttribute (bool enableSession)
63 : this (enableSession, TransactionOption.Disabled, 0, true)
67 public WebMethodAttribute (bool enableSession, TransactionOption transactionOption)
68 : this (enableSession, transactionOption, 0, true)
72 public WebMethodAttribute (bool enableSession, TransactionOption transactionOption, int cacheDuration)
73 : this (enableSession, transactionOption, cacheDuration, true)
77 public WebMethodAttribute (bool enableSession, TransactionOption transactionOption, int cacheDuration, bool bufferResponse)
79 this.bufferResponse = bufferResponse;
80 this.cacheDuration = cacheDuration;
81 this.enableSession = enableSession;
82 this.transactionOption = transactionOption;
84 this.description = String.Empty;
85 this.messageName = String.Empty;
88 #endregion // Constructors
90 #region Properties
92 public bool BufferResponse {
93 get { return bufferResponse; }
94 set { bufferResponse = value; }
97 public int CacheDuration {
98 get { return cacheDuration; }
99 set { cacheDuration = value; }
102 public string Description {
103 get { return description; }
104 set { description = value; }
107 public bool EnableSession {
108 get { return enableSession; }
109 set { enableSession = value; }
112 public string MessageName {
113 get { return messageName; }
114 set { messageName = value; }
117 public TransactionOption TransactionOption {
118 get { return transactionOption; }
119 set { transactionOption = value; }
122 #endregion // Properties