1using System.Globalization;
10 private static Dictionary<string, BadObjectReference>
s_StaticMembers =
new Dictionary<string, BadObjectReference>
21 if (args.Length == 1 || (args.Length == 2 && args[1] == Null))
23 return TimeSpan.Parse(args[0].ToString());
28 return TimeSpan.Parse(args[0].ToString(), CultureInfo.GetCultureInfo(str.Value));
44 return new BadTime(TimeSpan.FromMilliseconds((
double)n.Value));
48 if(TimeSpan.TryParse(s.Value, out TimeSpan dt))
58 return new BadTime(
new TimeSpan((
int)h.Value, (
int)m.Value, (
int)s.Value));
65 return new BadTime(
new TimeSpan((
int)h.Value, (
int)m.Value, (
int)s.Value, (
int)ms.Value));
The Execution Context. Every execution of a script needs a context the script is running in....
BadScope Scope
The Root Scope of the Context.
Gets thrown by the runtime.
static BadRuntimeException Create(BadScope? scope, string message)
Creates a new BadScriptException.
Interop Function taking an array of arguments.
The Base Class for all BadScript Objects.
Implements the base functionality for a BadScript Reference.
static BadObjectReference Make(string refText, Func< BadSourcePosition?, BadObject > getter, Action< BadObject, BadSourcePosition?, BadPropertyInfo?>? setter=null, Action< BadSourcePosition?>? delete=null)
Creates a new Reference Object.
static BadClassPrototype Prototype
Implements a Native String.
Implements a Native Class Prototype.
static Dictionary< string, BadObjectReference > s_StaticMembers
static BadObject TimeConstructor(BadExecutionContext ctx, BadObject[] args)
static BadObject Parse(BadExecutionContext ctx, BadObject[] args)
Implements the Interface for Native Numbers.
Implements the Interface for Native Strings.
Contains the Error Objects for the BadScript2 Language.
Contains the Interop Function Classes for the BadScript2 Language.
Contains the Native Runtime Objects.
Contains Runtime Type Objects.