Class ObjectPropertySymbol
Represents a property declared by a structured object type.
public sealed class ObjectPropertySymbol
- Inheritance
-
ObjectPropertySymbol
- Inherited Members
Constructors
ObjectPropertySymbol(string, TypeSymbol, bool, bool)
Initializes a new instance of the ObjectPropertySymbol class.
public ObjectPropertySymbol(string name, TypeSymbol type, bool isOptional = false, bool isReadOnly = false)
Parameters
namestringThe language name.
typeTypeSymbolThe type.
isOptionalboolA value indicating whether the property may be omitted.
isReadOnlyboolA value indicating whether the property value and presence are read-only.
Exceptions
- ArgumentNullException
Thrown when
nameortypeisnull.- ArgumentException
Thrown when
typecannot be used for an object property.
Properties
IsOptional
Gets a value indicating whether the property may be omitted.
public bool IsOptional { get; }
Property Value
IsReadOnly
Gets a value indicating whether the property value and presence are read-only.
public bool IsReadOnly { get; }
Property Value
Name
Gets the property name.
public string Name { get; }
Property Value
Type
Gets the property type.
public TypeSymbol Type { get; }