Mono.Debugger.Frontend.ScriptingContext.CheckTypeProxy C# (CSharp) Method

CheckTypeProxy() private method

private CheckTypeProxy ( TargetStructObject obj ) : TargetClassObject
obj Mono.Debugger.Languages.TargetStructObject
return Mono.Debugger.Languages.TargetClassObject
        TargetClassObject CheckTypeProxy(TargetStructObject obj)
        {
            if (obj.Type.DebuggerTypeProxyAttribute == null)
                return null;

            string proxy_name = obj.Type.DebuggerTypeProxyAttribute.ProxyTypeName;
            string original_name = proxy_name;
            proxy_name = proxy_name.Replace ('+', '/');

            Expression expression;
            try {
                expression = new TypeProxyExpression (proxy_name, obj);
                expression = expression.Resolve (this);

                if (expression == null)
                    return null;

                return (TargetClassObject) expression.EvaluateObject (this);
            } catch {
                return null;
            }
        }

Same methods

ScriptingContext::CheckTypeProxy ( Interpreter interpreter, Thread thread, TargetStructObject obj ) : TargetClassObject

Usage Example

Ejemplo n.º 1
0
        public static TargetClassObject CheckTypeProxy(Interpreter interpreter, Thread thread,
                                                       TargetStructObject obj)
        {
            if (obj.Type.DebuggerTypeProxyAttribute == null)
            {
                return(null);
            }

            ScriptingContext expr_context = new ScriptingContext(interpreter);

            expr_context.CurrentThread    = thread;
            expr_context.CurrentLanguage  = obj.Type.Language;
            expr_context.ImplicitInstance = obj;

            return(expr_context.CheckTypeProxy(obj));
        }
All Usage Examples Of Mono.Debugger.Frontend.ScriptingContext::CheckTypeProxy