Class MacroMethodParamAttribute
- Namespace
- CMS.MacroEngine
- Assembly
- CMS.MacroEngine.dll
Adds action to the page.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
public class MacroMethodParamAttribute : Attribute
- Inheritance
-
objectAttributeMacroMethodParamAttribute
- Extension Methods
Constructors
MacroMethodParamAttribute(int, string, Type, string)
Creates new instance of MacroMethodParam object.
public MacroMethodParamAttribute(int index, string name, Type type, string comment)
Parameters
indexintIndex of the parameter
namestringParameter name
typeTypeParameter type
commentstringParameter comment
MacroMethodParamAttribute(int, string, Type, string, bool)
Creates new instance of MacroMethodParam object.
public MacroMethodParamAttribute(int index, string name, Type type, string comment, bool asExpression)
Parameters
indexintIndex of the parameter
namestringParameter name
typeTypeParameter type
commentstringParameter comment
asExpressionboolIf true, the parameter is passed to the method as expression (MacroExpression object), not evaluated
Properties
AsExpression
If true, the parameter is passed to the method as expression (MacroExpression object), not evaluated.
public bool AsExpression { get; set; }
Property Value
- bool
Comment
Gets or sets a comment for the method.
public string Comment { get; set; }
Property Value
- string
Index
Index of the breadcrumb.
public int Index { get; set; }
Property Value
- int
IsParams
If true, the parameter is declared with params keyword.
public bool IsParams { get; set; }
Property Value
- bool
Name
Gets or sets the name of the method.
public string Name { get; set; }
Property Value
- string
Type
Gets or sets a return type of the method.
public Type Type { get; set; }
Property Value
- Type
Methods
GetMacroParam()
Creates new MacroMethodParam object from data of this attribute.
public MacroMethodParam GetMacroParam()