diff --git a/CHANGELOG.md b/CHANGELOG.md index 825f45d..3a11e17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,3 +3,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] +### Added + - Adding extension method for getting Informational Version from an Assembly + \ No newline at end of file diff --git a/ICD.Common.Utils/Extensions/AssemblyExtensions.cs b/ICD.Common.Utils/Extensions/AssemblyExtensions.cs index 3a67c37..0cb0615 100644 --- a/ICD.Common.Utils/Extensions/AssemblyExtensions.cs +++ b/ICD.Common.Utils/Extensions/AssemblyExtensions.cs @@ -57,5 +57,18 @@ namespace ICD.Common.Utils.Extensions string path = extends.GetPath(); return path == null ? DateTime.MinValue : IcdFile.GetCreationTime(path); } + + /// + /// Gets the informational version for the given assembly. + /// + /// + /// + public static string GetInformationalVersion(this Assembly extends) + { + if (extends == null) + throw new ArgumentNullException("extends"); + + return extends.GetCustomAttribute().InformationalVersion; + } } }