MacroAttribute Class |
Namespace: Resto.Front.Api.Attributes.JetBrains
public sealed class MacroAttribute : Attribute
The MacroAttribute type exposes the following members.
Name | Description | |
---|---|---|
![]() | MacroAttribute | Initializes a new instance of the MacroAttribute class |
Name | Description | |
---|---|---|
![]() | Editable |
Allows specifying which occurrence of the target parameter becomes editable when the template is deployed.
|
![]() | Expression |
Allows specifying a macro that will be executed for a source template
parameter when the template is expanded.
|
![]() | Target |
Identifies the target parameter of a source template if the
MacroAttribute is applied on a template method.
|
![]() | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.) |
Name | Description | |
---|---|---|
![]() | Equals | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.) |
![]() | GetHashCode | Returns the hash code for this instance. (Inherited from Attribute.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.) |
![]() | Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
[SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] public static void forEach<T>(this IEnumerable<T> collection) { foreach (var item in collection) { //$ $END$ } }
[SourceTemplate] public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { /*$ var $x$Id = "$newguid$" + x.ToString(); x.DoSomething($x$Id); */ }