Skip to content

Commit

Permalink
Clarify supported types
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauriethefish committed Jan 17, 2024
1 parent d265f11 commit a5dc57b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions QuestPatcher.Axml/AxmlAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AxmlAttribute

/// <summary>
/// The value of the attribute.
/// May be <see cref="string" /> or <see cref="WrappedValue" />.
/// May be <see cref="string"/>, <see cref="bool"/>, <see cref="int"/>, or <see cref="WrappedValue"/>.
/// </summary>
/// <exception cref="InvalidOperationException"></exception>
public object Value
Expand All @@ -55,7 +55,7 @@ public object Value
else
{
throw new InvalidOperationException(
$"Cannot set value of axml attribute to type of {value.GetType().Name}: must be {nameof(WrappedValue)} or string");
$"Cannot set value of axml attribute to type of {value.GetType().Name}: must be {nameof(WrappedValue)}, string, int or bool");
}

_value = value;
Expand All @@ -70,6 +70,7 @@ internal AxmlAttribute(string name, Uri? ns, int? resourceId, object value, Attr
Name = name;
Namespace = ns;
ResourceId = resourceId;

Value = value;
_valueType = valueType;
Debug.Assert(_value != null);
Expand Down

0 comments on commit a5dc57b

Please sign in to comment.