Roblox-File-Format/DataTypes/Content.cs

28 lines
639 B
C#
Raw Normal View History

namespace RobloxFiles.DataTypes
{
/// <summary>
/// Content is a type used by most url-based XML properties.
/// Here, it only exists as a wrapper class for strings.
/// </summary>
public class Content
{
2019-07-04 23:26:53 +00:00
public readonly string Url;
public override string ToString() => Url;
2019-07-04 23:26:53 +00:00
public Content(string url)
{
2019-07-04 23:26:53 +00:00
Url = url;
}
public static implicit operator string(Content content)
{
2019-07-04 23:26:53 +00:00
return content.Url;
}
2019-07-04 23:26:53 +00:00
public static implicit operator Content(string url)
{
2019-07-04 23:26:53 +00:00
return new Content(url);
}
}
}