Files
UnrealEngineUWP/Engine/Source/Programs/UnrealBuildTool/System/XmlConfigFileAttribute.cs
Wojciech Krywult 8fb3ce1782 UBT: XmlConfigFile attribute: Added support for properties.
[XmlConfigFile(...)] can be added to both fields and properties. The latter can be useful e.g. with derived properties.

#rb Joe.Kirchoff
#jira none
#preflight 62825fb8734d0657702b31f5

[CL 20224799 by Wojciech Krywult in ue5-main branch]
2022-05-16 11:10:24 -04:00

41 lines
1.2 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UnrealBuildTool
{
/// <summary>
/// Marks a field as being serializable from a config file
/// </summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
class XmlConfigFileAttribute : Attribute
{
/// <summary>
/// The category for this config value. Optional; defaults to the declaring type name.
/// </summary>
public string? Category = null;
/// <summary>
/// Name of the key to read. Optional; defaults to the field name.
/// </summary>
public string? Name = null;
/// <summary>
/// Use this field to indicate that the XML attribute has been deprecated, and that a warning should
/// be shown to the user if it is used.
/// A deprecated field should also be marked with the [Obsolete] attribute.
/// </summary>
public bool Deprecated = false;
/// <summary>
/// If the attribute has been deprecated because it has been renamed, this field can be used to apply the
/// value used for this field to another.
/// </summary>
public string? NewAttributeName = null;
}
}