// Copyright Epic Games, Inc. All Rights Reserved. using System; namespace EpicGames.Perforce { /// /// Attributes for fields that should be deserialized from P4 tags /// [AttributeUsage(AttributeTargets.Property)] public sealed class PerforceTagAttribute : Attribute { /// /// The tag name /// public string Name { get; } /// /// Whether this tag is required for a valid record /// public bool Optional { get; set; } /// /// Constructor /// /// Name of the tag public PerforceTagAttribute(string name) { Name = name; } } /// /// Specifies the name of an enum when converted into a P4 string /// [AttributeUsage(AttributeTargets.Field)] public sealed class PerforceEnumAttribute : Attribute { /// /// Name of the enum value /// public string Name { get; } /// /// Constructor /// /// Name of the serialized value public PerforceEnumAttribute(string name) { Name = name; } } /// /// When attached to a list field, indicates that a list of structures can be included in the record /// [AttributeUsage(AttributeTargets.Property)] public sealed class PerforceRecordListAttribute : Attribute { } }