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(
"any"
,
20
new
21
BadMetaData
(
"This class represents the any type. It is the base class for all types and can be used to represent any type."
,
22
"Creates a new instance of the any type."
,
23
"any"
,
24
new Dictionary<string,
BadParameterMetaData
>()
25
)
26
) { }
27
29
public
override
bool
IsAbstract
=>
true
;
30
31
protected
override
BadClassPrototype
?
BaseClass
{
get
; }
32
33
public
override
IReadOnlyCollection<BadInterfacePrototype>
Interfaces
{
get
; } =
34
Array.Empty<
BadInterfacePrototype
>();
35
37
public
override
bool
IsAssignableFrom
(
BadObject
obj)
38
{
39
return
true
;
40
}
41
43
public
override
IEnumerable<BadObject>
CreateInstance
(
BadExecutionContext
caller,
bool
setThis =
true
)
44
{
45
throw
new
BadAbstractClassException
(
Name
);
46
}
47
}
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:37
BadScript2.Runtime.Objects.Types.BadAnyPrototype.IsAbstract
override bool IsAbstract
Definition
BadAnyPrototype.cs:29
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:43
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:56
BadScript2.Runtime.Objects.Types.Interface.BadInterfacePrototype
Implements a BadScript Interface Prototype.
Definition
BadInterfacePrototype.cs:10
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