mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] TEngineServer
[+] TEngineServer
This commit is contained in:
40
Assets/GameScripts/ThirdParty/Protobuf-net/ProtoIgnoreAttribute.cs
vendored
Normal file
40
Assets/GameScripts/ThirdParty/Protobuf-net/ProtoIgnoreAttribute.cs
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace ProtoBuf
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that a member should be excluded from serialization; this
|
||||
/// is only normally used when using implict fields.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field,
|
||||
AllowMultiple = false, Inherited = true)]
|
||||
public class ProtoIgnoreAttribute : Attribute { }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that a member should be excluded from serialization; this
|
||||
/// is only normally used when using implict fields. This allows
|
||||
/// ProtoIgnoreAttribute usage
|
||||
/// even for partial classes where the individual members are not
|
||||
/// under direct control.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class,
|
||||
AllowMultiple = true, Inherited = false)]
|
||||
public sealed class ProtoPartialIgnoreAttribute : ProtoIgnoreAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new ProtoPartialIgnoreAttribute instance.
|
||||
/// </summary>
|
||||
/// <param name="memberName">Specifies the member to be ignored.</param>
|
||||
public ProtoPartialIgnoreAttribute(string memberName)
|
||||
: base()
|
||||
{
|
||||
if (string.IsNullOrEmpty(memberName)) throw new ArgumentNullException(nameof(memberName));
|
||||
|
||||
MemberName = memberName;
|
||||
}
|
||||
/// <summary>
|
||||
/// The name of the member to be ignored.
|
||||
/// </summary>
|
||||
public string MemberName { get; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user