Copy Aetheria Code
Added a bunch of code from the old Aetheria project
This commit is contained in:
parent
ab392cd3d6
commit
c58ba0b1da
1704 changed files with 175081 additions and 313 deletions
|
|
@ -1,81 +0,0 @@
|
|||
// Copyright (c) All contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
|
||||
#pragma warning disable SA1649 // File name should match first type name
|
||||
|
||||
namespace MessagePack
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
|
||||
public class MessagePackObjectAttribute : Attribute
|
||||
{
|
||||
public bool KeyAsPropertyName { get; private set; }
|
||||
|
||||
public MessagePackObjectAttribute(bool keyAsPropertyName = false)
|
||||
{
|
||||
this.KeyAsPropertyName = keyAsPropertyName;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public class KeyAttribute : Attribute
|
||||
{
|
||||
public int? IntKey { get; private set; }
|
||||
|
||||
public string StringKey { get; private set; }
|
||||
|
||||
public KeyAttribute(int x)
|
||||
{
|
||||
this.IntKey = x;
|
||||
}
|
||||
|
||||
public KeyAttribute(string x)
|
||||
{
|
||||
this.StringKey = x;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public class IgnoreMemberAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||
public class UnionAttribute : Attribute
|
||||
{
|
||||
public int Key { get; private set; }
|
||||
|
||||
public Type SubType { get; private set; }
|
||||
|
||||
public UnionAttribute(int key, Type subType)
|
||||
{
|
||||
this.Key = key;
|
||||
this.SubType = subType;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = true)]
|
||||
public class SerializationConstructorAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
||||
public class MessagePackFormatterAttribute : Attribute
|
||||
{
|
||||
public Type FormatterType { get; private set; }
|
||||
|
||||
public object[] Arguments { get; private set; }
|
||||
|
||||
public MessagePackFormatterAttribute(Type formatterType)
|
||||
{
|
||||
this.FormatterType = formatterType;
|
||||
}
|
||||
|
||||
public MessagePackFormatterAttribute(Type formatterType, params object[] arguments)
|
||||
{
|
||||
this.FormatterType = formatterType;
|
||||
this.Arguments = arguments;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue