Added type and name properties to readable member class
このコミットが含まれているのは:
1 親
65667e855f
コミット
8a156e76bb
1ファイル変更
+19
@@ -30,6 +30,25 @@ namespace ComputeSharp.Shaders.Translation.Models
|
||||
Property = property;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Type"/> of the wrapped member for the current instance
|
||||
/// </summary>
|
||||
public Type MemberType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Field != null) return Field.FieldType;
|
||||
if (Property != null) return Property.PropertyType;
|
||||
|
||||
throw new InvalidOperationException("Field and property can't both be null at the same time");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the wrapped member for the current instance
|
||||
/// </summary>
|
||||
public string Name => (Field?.Name ?? Property?.Name) ?? throw new InvalidOperationException("Field and property can't both be null at the same time");
|
||||
|
||||
/// <summary>
|
||||
/// Returns the value of the wrapped member for the current instance
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする