System.Diagnostics.DebuggerAttributes.ValidateDebuggerTypeProxyProperties C# (CSharp) Method

ValidateDebuggerTypeProxyProperties() static private method

static private ValidateDebuggerTypeProxyProperties ( Type type, object obj ) : void
type Type
obj object
return void
        internal static void ValidateDebuggerTypeProxyProperties(Type type, object obj)
        {
            Type proxyType = GetProxyType(type);

            // Create an instance of the proxy type, and make sure we can access all of the instance properties 
            // on the type without exception
            object proxyInstance = Activator.CreateInstance(proxyType, obj);
            foreach (var pi in proxyInstance.GetType().GetTypeInfo().DeclaredProperties)
            {
                pi.GetValue(proxyInstance, null);
            }
        }

Same methods

DebuggerAttributes::ValidateDebuggerTypeProxyProperties ( object obj ) : void