40 Dictionary<string, BadObject> properties =
new Dictionary<string, BadObject>
67 BadAnyPrototype.Instance
94 BadAnyPrototype.Instance
99 "FindOrCreateProperty",
106 BadAnyPrototype.Instance
118 BadAnyPrototype.Instance
146 $
"BadSettings.{name}",
150 if (o is not BadSettingsObject obj)
152 throw new BadRuntimeException(
"BadSettingsObject expected");
165 foreach (KeyValuePair<string, BadObject> property
in properties)
204 return m_Settings.ToString();
210 return m_PropertyReferences.ContainsKey(propName) ||
211 m_Settings.HasProperty(propName) ||
212 base.HasProperty(propName, caller);
223 if (m_Settings.HasProperty(propName))
226 $
"BadSettings.{propName}",
Contains Static Data for the BadScript Language.
const string ARRAY_ACCESS_OPERATOR_NAME
Implements a Json to BadObject Converter.
static JToken ConvertNode(BadObject value)
Converts a BadObject to a JToken.
Implements a Settings Object Wrapper.
static BadObject CreateObj(IReadOnlyList< BadObject > args)
Creates a new Settings Object.
override BadObjectReference GetProperty(string propName, BadScope? caller=null)
Returns a Reference to the Property with the given Name.The Property Reference
override string ToSafeString(List< BadObject > done)
BadSettingsObject(BadSettings settings)
Creates a new Settings Object.
override bool HasProperty(string propName, BadScope? caller=null)
Returns true if the object contains a given property or there exists an extension for the current Ins...
readonly Dictionary< string, BadObjectReference > m_PropertyReferences
Property References.
readonly BadSettings m_Settings
Inner Settings Object.
override BadClassPrototype GetPrototype()
static readonly BadClassPrototype Prototype
The Class Prototype.
Implements the Scope for the Script Engine.
Gets thrown by the runtime.
Implements a simple wrapper for C# IEnumerators to be used in BS2.
Non Generic Interop Function.
Implements a Dynamic List/Array for the BadScript Language.
The Base Class for all BadScript Objects.
virtual BadObjectReference GetProperty(string propName, BadScope? caller=null)
Returns a Reference to the Property with the given Name.
static readonly BadObject Null
The Null Value for the BadScript Language.
Implements the base functionality for a BadScript Reference.
static BadObjectReference Make(string refText, Func< BadObject > getter, Action< BadObject, BadPropertyInfo?>? setter=null, Action? delete=null)
Creates a new Reference Object.
The Any Prototype, Base type for all types.
static readonly BadAnyPrototype Instance
The Instance of the BadAnyPrototype.
Implements a Class Prototype for the BadScript Language.
Helper Class that Builds a Native Class from a Prototype.
static BadClassPrototype GetNative(string name)
Returns a Native Class Prototype for the given Native Type.
Implements a Native Class Prototype.
Public Api for the Settings System.
BadSettings? FindProperty(string propertyPath)
Finds a property based on the property path relative to this object.
IEnumerable< string > PropertyNames
The Property Names of the Settings Object.
void SetProperty(string propertyName, BadSettings value, bool invokeOnChange=true)
Sets the Property with the given Name.
void SetValue(JToken? value, bool invokeOnChange=true)
Sets the Json Token of the Current Settings Object.
bool HasValue()
Returns true if the Settings Object has a JToken Value.
BadSettings GetProperty(string propertyName)
Returns the Property with the given Name.
JToken? GetValue()
Returns the Json Token of the Settings Object.
BadSettings FindOrCreateProperty(string propertyPath)
Finds a property based on the property path relative to this object.
bool HasProperty(string propertyName)
Returns true if the Settings Object has the given Property.
bool RemoveProperty(string propertyName, bool invokeOnChange=true)
Removes the Property with the given Name.
Contains Shared Data Structures and Functionality.
Contains JSON Extensions and APIs for the BadScript2 Runtime.
Contains the Error Objects for the BadScript2 Language.
Contains the Interop Function Classes for the BadScript2 Language.
Contains the Interop Abstractions and Implementations for the BadScript2 Language.
Contains Runtime Type Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.
Contains the Settings Implementation.