8public static partial class BadDynamicFunctionExtensions
17 if (t == typeof(
string))
22 if (t == typeof(
bool))
27 if (t.IsNumericType())
34 (t.GetGenericTypeDefinition() == typeof(List<>) || t.GetGenericTypeDefinition() == typeof(IList<>)))
51 List<BadFunctionParameter> ret =
new List<BadFunctionParameter>();
52 bool canBeOptional =
true;
54 for (
int i = t.Length - 1; i >= 0; i--)
57 bool isNullable =
false;
59 if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(
BadNullable<>))
62 type = type.GetGenericArguments()[0];
65 bool optional = canBeOptional && isNullable;
66 bool nullChecked = !isNullable;
72 canBeOptional =
false;
89 Func<BadExecutionContext, BadObject> func,
106 Func<BadExecutionContext, T, BadObject> func,
128 Func<BadExecutionContext, T1, T2, BadObject> func,
150 Func<BadExecutionContext, T1, T2, T3, BadObject> func,
178 Func<BadExecutionContext, T1, T2, T3, T4, BadObject> func,
187 GetParameters(typeof(T1), typeof(T2), typeof(T3), typeof(T4))
207 Func<BadExecutionContext, T1, T2, T3, T4, T5, BadObject> func,
216 GetParameters(typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5))
237 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, BadObject> func,
246 GetParameters(typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6))
268 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, BadObject> func,
277 GetParameters(typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7))
300 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, BadObject> func,
342 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, BadObject> func,
386 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, BadObject> func,
429 public static void SetFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(
432 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, BadObject> func,
437 new BadDynamicInteropFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(
477 public static void SetFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(
480 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, BadObject> func,
485 new BadDynamicInteropFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(
527 public static void SetFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(
530 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, BadObject> func,
535 new BadDynamicInteropFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(
579 public static void SetFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(
582 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, BadObject> func,
587 new BadDynamicInteropFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(
633 public static void SetFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(
636 Func<BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, BadObject> func,
641 new BadDynamicInteropFunction<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(
Non Generic Interop Function.
static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > func)
Sets a Function on the given Object.
BadScript2.Runtime.Interop.Functions.Extensions.BadDynamicFunctionExtensions.SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 > static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 > func)
Sets a Function on the given Object.
BadScript2.Runtime.Interop.Functions.Extensions.BadDynamicFunctionExtensions.SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > func)
Sets a Function on the given Object.
BadScript2.Runtime.Interop.Functions.Extensions.BadDynamicFunctionExtensions.SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 > static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 > func)
Sets a Function on the given Object.
static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9 > func)
Sets a Function on the given Object.
static void SetFunction< T1, T2, T3, T4 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4 > func)
Sets a Function on the given Object.
static void SetFunction< T1, T2 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2 > func)
Sets a Function on the given Object.
static void SetFunction(this BadObject elem, string propName, Func< BadExecutionContext, BadObject > func, BadClassPrototype returnType)
Sets a Function on the given Object.
static void SetFunction< T1, T2, T3, T4, T5 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5 > func)
Sets a Function on the given Object.
static void SetFunction< T1, T2, T3 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3 > func)
Sets a Function on the given Object.
static void SetFunction< T1, T2, T3, T4, T5, T6, T7 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7 > func)
Sets a Function on the given Object.
BadScript2.Runtime.Interop.Functions.Extensions.BadDynamicFunctionExtensions.SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > func)
Sets a Function on the given Object.
static void SetFunction< T >(this BadObject elem, string propName, Action< BadExecutionContext, T > func)
Sets a Function on the given Object.
BadScript2.Runtime.Interop.Functions.Extensions.BadDynamicFunctionExtensions.SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 > static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 > func)
Sets a Function on the given Object.
static BadFunctionParameter[] GetParameters(params Type[] t)
Returns a list of BadFunctionParameters for the given Types.
static void SetFunction< T1, T2, T3, T4, T5, T6 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6 > func)
Sets a Function on the given Object.
static ? BadClassPrototype TryConvertType(Type t)
Tries to convert a Type to a BadClassPrototype.
static void SetFunction< T1, T2, T3, T4, T5, T6, T7, T8 >(this BadObject elem, string propName, Action< BadExecutionContext, T1, T2, T3, T4, T5, T6, T7, T8 > func)
Sets a Function on the given Object.
The Base Class for all BadScript Objects.
Stores Meta Information about a Property.
Implements a function that can be called from the script.
static readonly BadClassPrototype Prototype
The Prototype for the Function Object.
Provides function parameter info.
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.
Contains the Extension Classes for Functions.
Contains the Interop Reflection Classes for the BadScript2 Language.
Contains Runtime Function Objects.
Contains Runtime Type Objects.
Contains the Runtime Objects.
This is a helper type that can be used when using the .SetFunction extensions to allow for nullable p...