示例#1
0
 public void EnableNGENPolicy(CorDebugNGENPolicy policy)
 {
     if (obj is ICorDebugProcess5 p5)
     {
         int hr = p5.EnableNGENPolicy(policy);
     }
 }
示例#2
0
        public void EnableNGENPolicy(CorDebugNGENPolicy policy)
        {
            var p5 = obj as ICorDebugProcess5;

            if (p5 != null)
            {
                int hr = p5.EnableNGENPolicy(policy);
            }
        }
示例#3
0
        /// <summary>
        /// Sets a value that determines how an application loads
        /// native images while running under a managed debugger.
        /// </summary>
        /// <param name="ePolicy">
        /// A <c>CorDebugNGenPolicy</c> constant that determines how
        /// an application loads native images while running under a
        /// managed debugger.
        /// </param>
        /// <remarks>
        /// If the policy is set successfully, the method returns
        /// <c>S_OK</c>. If <c>ePolicy</c> is outside the range of the
        /// enumerated values defined by <c>CorDebugNGenPolicy</c>, the
        /// method returns <c>E_INVALIDARG</c> and the method call has
        /// no effect. If the policy of the Native Image Generator
        /// (Ngen.exe) cannot be updated, the method returns <c>E_FAIL</c>.
        ///
        /// The <c>ICorDebugProcess5::EnableNGenPolicy</c> method can be
        /// called at any time during the lifetime of the process. The
        /// policy is in effect for any modules that are loaded after the
        /// policy is set.
        /// </remarks>
        public int EnableNGENPolicy(CorDebugNGENPolicy ePolicy)
        {
            int hResult = Calli(_this, This[0]->EnableNGENPolicy, (int)ePolicy);

            return(hResult);
        }