/// <summary>
        /// Creates a new instance of the AssemblyInfoFile class for the target AssemblyInfo.cs file
        /// </summary>
        /// <param name="assemblyInfoFilePath">The path to the target AssemblyInfo.cs file</param>
        public AssemblyInfoFile(string assemblyInfoFilePath)
        {
            AssemblyInfoFilePath = assemblyInfoFilePath;

            var fileContent = File.ReadAllLines(AssemblyInfoFilePath);
            AssemblyVersion = new AssemblyInfoVersion(fileContent, VersionType.AssemblyVersion);
            AssemblyFileVersion = new AssemblyInfoVersion(fileContent, VersionType.AssemblyFileVersion);
        }
 /// <summary>
 /// Patches a given AssemblyInfoVersion using the given pattern and generation context
 /// </summary>
 /// <param name="version">The AssemblyInfoVersion to patch</param>
 /// <param name="pattern">The pattern to apply when patching the version</param>
 /// <param name="ctx">The version part generation context</param>
 static void PatchVersion(AssemblyInfoVersion version, VersionPattern pattern, VersionPartPatchingContext ctx)
 {
     version.SetMajorVersion(GetVersionPart(version.Version.Major, pattern.Major, ctx));
     version.SetMinorVersion(GetVersionPart(version.Version.Minor, pattern.Minor, ctx));
     version.SetBuildNumber(GetVersionPart(version.Version.Build, pattern.Build, ctx));
     version.SetRevision(GetVersionPart(version.Version.Revision, pattern.Revision, ctx));
 }