using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

namespace Sasa.QualityTools.DrFx.Tests.Violation.CSharp.Microsoft.Interoperability
{
    public static class Rule1414
    {
        public static bool IsSigned()
        {
            bool result = false;
            return StrongNameSignatureVerificationEx("", false, out result);
        }

        // このメソッドは CA1414 に違反しています。
        // このメソッドは CA1414 :Returnに違反しています。
        [SuppressMessage("Microsoft.Design", "CA1060:MovePInvokesToNativeMethodsClass")]
        [DllImport("mscoree.dll", CharSet = CharSet.Unicode, SetLastError = true)]
        [SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable")]
        private static extern bool StrongNameSignatureVerificationEx(string wszFilePath, [MarshalAs(UnmanagedType.U1)]  bool fForceVerification, out bool pfWasVerified);
    }
}
