BadScript 2
Loading...
Searching...
No Matches
BadAnyPrototype.cs
Go to the documentation of this file.
1
using
BadScript2.Parser
;
2
using
BadScript2.Runtime.Objects.Types.Interface
;
3
4
namespace
BadScript2.Runtime.Objects.Types
;
5
9
public
class
BadAnyPrototype
:
BadClassPrototype
10
{
14
public
static
readonly
BadAnyPrototype
Instance
=
new
BadAnyPrototype
();
15
19
public
BadAnyPrototype
() : base(
20
"any"
,
21
new
BadMetaData
(
22
"This class represents the any type. It is the base class for all types and can be used to represent any type."
,
23
"Creates a new instance of the any type."
,
24
"any"
,
25
new Dictionary<string,
BadParameterMetaData
>()
26
)
27
) { }
28
30
public
override
bool
IsAbstract
=>
true
;
31
protected
override
BadClassPrototype
?
BaseClass
{
get
; }
32
33
public
override
IReadOnlyCollection<BadInterfacePrototype>
Interfaces
{
get
; } = Array.Empty<
BadInterfacePrototype
>();
34
36
public
override
bool
IsAssignableFrom
(
BadObject
obj)
37
{
38
return
true
;
39
}
40
42
public
override
IEnumerable<BadObject>
CreateInstance
(
BadExecutionContext
caller,
bool
setThis =
true
)
43
{
44
throw
new
BadAbstractClassException
(
Name
);
45
}
46
}
BadScript2.Parser.BadMetaData
Implements a Meta Data container for an expression.
Definition
BadMetaData.cs:16
BadScript2.Parser.BadParameterMetaData
Implements a Meta Data container for a parameter.
Definition
BadParameterMetaData.cs:7
BadScript2.Runtime.BadExecutionContext
The Execution Context. Every execution of a script needs a context the script is running in....
Definition
BadExecutionContext.cs:16
BadScript2.Runtime.Objects.BadObject
The Base Class for all BadScript Objects.
Definition
BadObject.cs:14
BadScript2.Runtime.Objects.Types.BadAbstractClassException
Exception that is thrown when a Abstract Class is instantiated.
Definition
BadAbstractClassException.cs:11
BadScript2.Runtime.Objects.Types.BadAnyPrototype
The Any Prototype, Base type for all types.
Definition
BadAnyPrototype.cs:10
BadScript2.Runtime.Objects.Types.BadAnyPrototype.BadAnyPrototype
BadAnyPrototype()
Creates a new BadAnyPrototype.
Definition
BadAnyPrototype.cs:19
BadScript2.Runtime.Objects.Types.BadAnyPrototype.IsAssignableFrom
override bool IsAssignableFrom(BadObject obj)
Returns true if the provided object is an instance of this class or a subclass of this class....
Definition
BadAnyPrototype.cs:36
BadScript2.Runtime.Objects.Types.BadAnyPrototype.IsAbstract
override bool IsAbstract
Definition
BadAnyPrototype.cs:30
BadScript2.Runtime.Objects.Types.BadAnyPrototype.Instance
static readonly BadAnyPrototype Instance
The Instance of the BadAnyPrototype.
Definition
BadAnyPrototype.cs:14
BadScript2.Runtime.Objects.Types.BadAnyPrototype.BaseClass
override? BadClassPrototype BaseClass
Definition
BadAnyPrototype.cs:31
BadScript2.Runtime.Objects.Types.BadAnyPrototype.CreateInstance
override IEnumerable< BadObject > CreateInstance(BadExecutionContext caller, bool setThis=true)
Definition
BadAnyPrototype.cs:42
BadScript2.Runtime.Objects.Types.BadAnyPrototype.Interfaces
override IReadOnlyCollection< BadInterfacePrototype > Interfaces
Definition
BadAnyPrototype.cs:33
BadScript2.Runtime.Objects.Types.BadClassPrototype
Implements a Class Prototype for the BadScript Language.
Definition
BadClassPrototype.cs:11
BadScript2.Runtime.Objects.Types.BadClassPrototype.Name
string Name
The Name of the Type.
Definition
BadClassPrototype.cs:58
BadScript2.Runtime.Objects.Types.Interface.BadInterfacePrototype
Implements a BadScript Interface Prototype.
Definition
BadInterfacePrototype.cs:11
BadScript2.Parser
Contains the Parser for the BadScript2 Language.
Definition
BadMetaData.cs:10
BadScript2.Runtime.Objects.Types.Interface
Contains Runtime Interface Objects.
Definition
BadInterfaceConstraint.cs:5
BadScript2.Runtime.Objects.Types
Contains Runtime Type Objects.
Definition
BadAbstractClassException.cs:5
src
BadScript2
Runtime
Objects
Types
BadAnyPrototype.cs
Generated by
1.9.8