13[BadInteropObject(
"Person")]
22 public string Name {
get;
set; }
24 public int Age {
get;
set; }
29 return $
"{Name} is {Age} years old";
33[BadInteropObject(
"Employee", typeof(PersonWrapper))]
36 public Employee(
string name,
int age,
string job,
int employeeId) : base(name, age)
42 public string Job {
get;
set; }
48 return base.PrintInfo() +
" and works as " +
Job +
" with EmployeeId " +
EmployeeId;
58 [BadMethod(
"Hello",
"Says Hello")]
61 Console.WriteLine(
"Hello");
64 [BadMethod(description:
"Returns the Greeting String")]
65 [return: BadReturn(
"Hello {name}")]
68 return $
"Hello {m_Name}";
71 [BadMethod(description:
"Sets the Name")]
72 private void
SetName([BadParameter(description:
"The Name to be set.")] string name =
"World")
77 [BadMethod(description:
"Gets the Name")]
78 [return: BadReturn(
"The Name")]
84 [BadMethod(description:
"Greets a list of users")]
87 foreach (
string name
in names)
94 [BadMethod(description:
"Greets a list of users and resets the name")]
95 private void
ParamsTest2(string resetName, params string[] names)
101 [BadMethod(description:
"Greets the User")]
117 runtime.RunInteractive(Enumerable.Empty<
string>());
Exposes the BadScript Runtime Functionality to Consumers.
BadRuntime UseApi(BadInteropApi api, bool replace=false)
Adds or Replaces a specified API.
override string PrintInfo()
Employee(string name, int age, string job, int employeeId)
virtual string PrintInfo()
Person(string name, int age)
void SetName([BadParameter(description:"The Name to be set.")] string name="World")
void ParamsTest(params string[] names)
void ParamsTest2(string resetName, params string[] names)
Implements an Interop API for the BS2 Language.
The Base Class for all BadScript Objects.
Helper Class that Builds a Native Class from a Prototype.
static void AddNative(BadClassPrototype native)
Adds a native Type.
Contains the interactive console Implementation.
Contains Common Interop Extensions and APIs for the BadScript2 Runtime.
Contains the Interop Libraries for BadScript2.
Contains the Interop Function Classes for the BadScript2 Language.
Contains the Interop Abstractions and Implementations for the BadScript2 Language.
Contains the Native Runtime Objects.
Contains Runtime Type Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.