Browse Source

Add NamedArgumentTypeAttribute

pull/1123/head
Joe4evr 7 years ago
parent
commit
2fd1c62a6f
2 changed files with 9 additions and 3 deletions
  1. +7
    -0
      src/Discord.Net.Commands/Attributes/NamedArgumentTypeAttribute.cs
  2. +2
    -3
      src/Discord.Net.Commands/Attributes/OverrideTypeReaderAttribute.cs

+ 7
- 0
src/Discord.Net.Commands/Attributes/NamedArgumentTypeAttribute.cs View File

@@ -0,0 +1,7 @@
using System;

namespace Discord.Commands
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class NamedArgumentTypeAttribute : Attribute { }
}

+ 2
- 3
src/Discord.Net.Commands/Attributes/OverrideTypeReaderAttribute.cs View File

@@ -1,11 +1,10 @@
using System; using System;

using System.Reflection; using System.Reflection;


namespace Discord.Commands namespace Discord.Commands
{ {
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class OverrideTypeReaderAttribute : Attribute
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public sealed class OverrideTypeReaderAttribute : Attribute
{ {
private static readonly TypeInfo _typeReaderTypeInfo = typeof(TypeReader).GetTypeInfo(); private static readonly TypeInfo _typeReaderTypeInfo = typeof(TypeReader).GetTypeInfo();




Loading…
Cancel
Save