forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPageAttribute.cs
More file actions
35 lines (31 loc) · 900 Bytes
/
PageAttribute.cs
File metadata and controls
35 lines (31 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
namespace ServiceStack
{
/// <summary>
/// Specify a VirtualPath or Layout for a Code Page
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true)]
public class PageAttribute : AttributeBase
{
public string VirtualPath { get; set; }
public string Layout { get; set; }
public PageAttribute(string virtualPath, string layout=null)
{
VirtualPath = virtualPath;
Layout = layout;
}
}
/// <summary>
/// Specify static page arguments
/// </summary>
public class PageArgAttribute : AttributeBase
{
public string Name { get; set; }
public string Value { get; set; }
public PageArgAttribute(string name, string value)
{
Name = name;
Value = value;
}
}
}