コード例 #1
0
        public static void AddStaticMethod(this Environment environment, string name, System.Type type, string methodName)
        {
            var method = type.RTGetMethod(methodName);

            if (method != null && method.IsStatic)
            {
                var boundVariable = new BoundVariable(name, null, method);
                environment.AddVariable(boundVariable);
            }
        }
コード例 #2
0
        public static void AddStaticProperty(this Environment environment, string name, System.Type type, string propertyName)
        {
            var property = type.RTGetProperty(propertyName);

            if (property != null && property.RTIsStatic())
            {
                var boundVariable = new BoundVariable(name, null, property);
                environment.AddVariable(boundVariable);
            }
        }
コード例 #3
0
        public static void AddBoundMethod(this Environment environment, string name, object target, string methodName)
        {
            var method = target.GetType().RTGetMethod(methodName);

            if (method != null && !method.IsStatic)
            {
                var boundVariable = new BoundVariable(name, target, method);
                environment.AddVariable(boundVariable);
            }
        }
コード例 #4
0
        public static void AddBoundProperty(this Environment environment, string name, object target, string propertyName)
        {
            var property = target.GetType().RTGetProperty(propertyName);

            if (property != null && !property.RTIsStatic())
            {
                var boundVariable = new BoundVariable(name, target, property);
                environment.AddVariable(boundVariable);
            }
        }
コード例 #5
0
        public static void AddStaticMethod(this Environment environment, string name, System.Type type, MethodInfo method)
        {
            var boundVariable = new BoundVariable(name, null, method);

            environment.AddVariable(boundVariable);
        }
コード例 #6
0
        public static void AddStaticProperty(this Environment environment, string name, System.Type type, PropertyInfo property)
        {
            var boundVariable = new BoundVariable(name, null, property);

            environment.AddVariable(boundVariable);
        }
コード例 #7
0
        public static void AddBoundMethod(this Environment environment, string name, object target, MethodInfo method)
        {
            var boundVariable = new BoundVariable(name, target, method);

            environment.AddVariable(boundVariable);
        }
コード例 #8
0
        public static void AddBoundProperty(this Environment environment, string name, object target, PropertyInfo property)
        {
            var boundVariable = new BoundVariable(name, target, property);

            environment.AddVariable(boundVariable);
        }
コード例 #9
0
        ///----------------------------------------------------------------------------------------------

        public static void AddVariable(this Environment environment, string name, object target)
        {
            environment.AddVariable(name, target, target.GetType());
        }