Fixing an issue with output parameters that are of type IntPtr
[castle.git] / MonoRail / Castle.MonoRail.Framework / Attributes / AjaxActionAttribute.cs
blobc3d1e2a41f3e67345b2e6bbc5264bdffe095625a
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MonoRail.Framework
17 using System;
19 using Castle.MonoRail.Framework.Helpers;
21 /// <summary>
22 /// Defines that an action is accessible through AJAX calls,
23 /// so <see cref="AjaxHelper"/> can generate a JavaScript proxy for it.
24 /// </summary>
25 [AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
26 public class AjaxActionAttribute : Attribute
28 private string name;
30 /// <summary>
31 /// Method marked with this attribute will be accessible through AJAX calls,
32 /// and <see cref="AjaxHelper"/> will be able to generate a JavaScript proxy for them.
33 /// </summary>
34 public AjaxActionAttribute()
38 /// <summary>
39 /// Method marked with this attribute will be accessible through AJAX calls,
40 /// and <see cref="AjaxHelper"/> will be able to generate a JavaScript proxy for them.
41 /// </summary>
42 /// <param name="name">
43 /// A name for the action, on the JavaScript proxy. Useful when dealing with
44 /// overloaded Ajax actions, as JavaScript does not support function overloading.
45 /// </param>
46 public AjaxActionAttribute(string name)
48 this.name = name;
51 /// <summary>
52 /// A name for the action, on the JavaScript proxy. Useful when dealing with
53 /// overloaded Ajax actions, as JavaScript does not support function overloading.
54 /// </summary>
55 public string Name
57 get { return name; }
58 set { name = value; }