// 下記のコードでは CA2114 に違反していないようだが何故？

using System;
using System.Security.Permissions;

namespace Sasa.QualityTools.DrFx.Tests.Violation.CSharp.Microsoft.Security
{
    [EnvironmentPermission(SecurityAction.Demand, Write = "PROGRAMFILES")]
    public static class Rule2114
    {
        [EnvironmentPermission(SecurityAction.Demand, Read = "PROGRAMFILES")]
        public static string ReadProgramFiles()
        {
            return Environment.GetEnvironmentVariable("PROGRAMFILES");
        }
    }
}
