diff options
| author | Michael <[email protected]> | 2017-02-11 11:48:26 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-11 11:48:26 -0500 |
| commit | 8e2b00840a6a16a6da1eb4891a8364158884f0a8 (patch) | |
| tree | 505e9005b9e9a70de742273fe9be96acc75ce3f3 /ShiftOS.Objects/MudAttributes.cs | |
| parent | f8a37dd1019b636b85fba364ce8768839061935c (diff) | |
| download | shiftos_thereturn-8e2b00840a6a16a6da1eb4891a8364158884f0a8.tar.gz shiftos_thereturn-8e2b00840a6a16a6da1eb4891a8364158884f0a8.tar.bz2 shiftos_thereturn-8e2b00840a6a16a6da1eb4891a8364158884f0a8.zip | |
MUD modularization work.
Diffstat (limited to 'ShiftOS.Objects/MudAttributes.cs')
| -rw-r--r-- | ShiftOS.Objects/MudAttributes.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ShiftOS.Objects/MudAttributes.cs b/ShiftOS.Objects/MudAttributes.cs new file mode 100644 index 0000000..b3b7380 --- /dev/null +++ b/ShiftOS.Objects/MudAttributes.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using attribute = System.Attribute; + +namespace ShiftOS.Objects +{ + [AttributeUsage(AttributeTargets.Method)] + public class MudRequestAttribute : attribute + { + /// <summary> + /// This attribute can be used on a static method to make the multi-user domain server software see this method as a MUD request handler. + /// </summary> + /// <param name="rName">The header ID of the request this method should handle.</param> + public MudRequestAttribute(string rName) + { + RequestName = rName; + } + + public string RequestName { get; private set; } + } + + [AttributeUsage(AttributeTargets.Method)] + public class MudResponseAttribute : attribute + { + /// <summary> + /// Clients will look for static methods marked with this attribute and run them first. If no attribute is found with the given header ID, the client may invoke a delegate with the message information. + /// </summary> + /// <param name="rName">The header ID of the response that this method will handle.</param> + public MudResponseAttribute(string rName) + { + ResponseName = rName; + } + + public string ResponseName { get; private set; } + } + + +} + |
