Class ApiVersionAttribute
Used to tag an ASP.NET controller interface or method with an API version. Versions are formatted like:
[VERSIONGROUP.]MAJOR.MINOR[-STATUS]
or:
VERSIONGROUP[MAJOR[.MINOR]][-STATUS]
where VERSIONGROUP is a date formatted like YYYY-MM-DD, MAJOR and MINOR are non-negative integers and STATUS is a string of like alphs, preview, etc. consisting of the following characters: a-z, A-Z, 0-9, "." and "-".
Namespace: Neon.ModelGen
Assembly: Neon.Common.dll
Syntax
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
public class ApiVersionAttribute : Attribute
Constructors
ApiVersionAttribute(string)
Constructor.
Declaration
public ApiVersionAttribute(string version)
Parameters
Type | Name | Description |
---|---|---|
string | version | Specifies the API version string. |
Properties
Version
Returns parsed ApiVersion.
Declaration
public ApiVersion Version { get; }
Property Value
Type | Description |
---|---|
ApiVersion |