Class TypedConstant
Represents a typed value that can be defined, defined to null, or undefined. Used to represent default values, for instance DefaultValue, or custom attribute arguments.
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class TypedConstant : ValueType, IExpression, IHasType
Properties
Name | Description |
---|---|
IsInitialized | Gets a value indicating whether the Value has been specified (including when it is set to |
IsNullOrDefault | Gets a value indicating whether the value is |
Type | Gets the type of the value. This is important if the type is an enum, because in this case, if the enum type is not compile-time, Value is set to the underlying integer value. |
Value | Gets the default value. |
Values |
Methods
Name | Description |
---|---|
Create(Object) | |
Create(Object, IType) | |
Create(Object, Type) | |
CreateUnchecked(Object, IType) | |
Default(IType) | |
Default(Type) | |
ForCompilation(ICompilation) | |
ToString() |
Explicit Interface Implementations
Name | Description |
---|---|
IExpression.IsAssignable | |
IExpression.Value | |
IHasType.RefKind |