Class ServiceModelAttribute
Used to indicate that an interface
should be included when
generating a service client class.
Namespace: Neon.ModelGen
Assembly: Neon.Common.dll
Syntax
[AttributeUsage(AttributeTargets.Interface)]
public class ServiceModelAttribute : Attribute
Constructors
ServiceModelAttribute(string, string)
Constructor.
Declaration
public ServiceModelAttribute(string name = null, string group = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Optionally specifies the name to be used for the generated service client class. This defaults to the tagged controller class name with a "Controller" suffix being stripped off if present. |
string | group | Optionally specifies that the methods from this controller should be grouped together in a generated controller class composed from multiple service controllers. Set this to the name to be used for the client property under which these methods will be generated. note
|
Properties
Group
Optionally used to group multiple methods from different controllers with the same Name together into the same generated service client class or subclass.
This defaults to null
which means that the service
methods from the different controllers will be generated
directly within the generated service client. When this
is not null
or empty, a subclass using this name
with "Client" appended will be generated with the methods
from the controllers with this group name.
Declaration
public string Group { get; }
Property Value
Type | Description |
---|---|
string |
Name
Returns the name to be used for the generated client class
and for transmitting requests to the server or null
if the name is to be derived from the tagged class name.
note
The tagged controller class name will be used as the default name, stripping "Controller" off the end of the class name if present.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |