Roblox-File-Format/DataTypes/ProtectedString.cs

28 lines
752 B
C#
Raw Normal View History

namespace RobloxFiles.DataTypes
{
/// <summary>
/// ProtectedString is a type used by some of the XML properties.
/// Here, it only exists as a wrapper class for strings.
/// </summary>
public class ProtectedString
{
2019-07-04 23:26:53 +00:00
public readonly string ProtectedValue;
public override string ToString() => ProtectedValue;
public ProtectedString(string value)
{
2019-07-04 23:26:53 +00:00
ProtectedValue = value;
}
public static implicit operator string(ProtectedString protectedString)
{
2019-07-04 23:26:53 +00:00
return protectedString.ProtectedValue;
}
public static implicit operator ProtectedString(string value)
{
return new ProtectedString(value);
}
}
}