Repository: PowerShell/PowerShell
File: src/System.Management.Automation/security/MshSignature.cs (C#)

Code before:
        /// <summary>
        /// Gets the path of the file to which this signature
        /// applies.
        /// </summary>
        public string Path
        {
            get
            {
                return _path;
            }
        }

        /// <summary>
        /// Returns the signature type of the signature.
        /// </summary>
        public SignatureType SignatureType { get; internal set; }

        /// <summary>
        /// True if the item is signed as part of an operating system release.
        /// </summary>
        public bool IsOSBinary { get; internal set; }

        /// <summary>
        /// Gets the Subject Alternative Name from the signer certificate.
        /// </summary>
        public string? SubjectAlternativeName { get; private set; }

        /// <summary>
        /// Constructor for class Signature
        ///
        /// Call this to create a validated time-stamped signature object.
        /// </summary>
        /// <param name="filePath">This signature is found in this file.</param>
        /// <param name="error">Win32 error code.</param>
        /// <param name="signer">Cert of the signer.</param>
        /// <param name="timestamper">Cert of the time stamper.</param>
        /// <returns>Constructed object.</returns>
        internal Signature(string filePath,
                           DWORD error,
                           X509Certificate2 signer,
                           X509Certificate2 timestamper)
        {
            Utils.CheckArgForNullOrEmpty(filePath, "filePath");
            Utils.CheckArgForNull(signer, "signer");
            Utils.CheckArgForNull(timestamper, "timestamper");

            Init(filePath, signer, error, timestamper);
        }

        /// <summary>
        /// Constructor for class Signature

Review comment (suggestion):
@copilot This file doesn't have `nullable` feature enabled. Please do not use nullable on reference types here.

Code after:
        /// <summary>
        /// Gets the path of the file to which this signature
        /// applies.
        /// </summary>
        public string Path
        {
            get
            {
                return _path;
            }
        }

        /// <summary>
        /// Returns the signature type of the signature.
        /// </summary>
        public SignatureType SignatureType { get; internal set; }

        /// <summary>
        /// True if the item is signed as part of an operating system release.
        /// </summary>
        public bool IsOSBinary { get; internal set; }

        /// <summary>
        /// Gets the Subject Alternative Name from the signer certificate.
        /// </summary>
        public string[] SubjectAlternativeName { get; private set; }

        /// <summary>
        /// Constructor for class Signature
        ///
        /// Call this to create a validated time-stamped signature object.
        /// </summary>
        /// <param name="filePath">This signature is found in this file.</param>
        /// <param name="error">Win32 error code.</param>
        /// <param name="signer">Cert of the signer.</param>
        /// <param name="timestamper">Cert of the time stamper.</param>
        /// <returns>Constructed object.</returns>
        internal Signature(string filePath,
                           DWORD error,
                           X509Certificate2 signer,
                           X509Certificate2 timestamper)
        {
            Utils.CheckArgForNullOrEmpty(filePath, "filePath");
            Utils.CheckArgForNull(signer, "signer");
            Utils.CheckArgForNull(timestamper, "timestamper");

            Init(filePath, signer, error, timestamper);
        }

        /// <summary>
        /// Constructor for class Signature