Skip to content

Instantly share code, notes, and snippets.

@pedroinfo
Created December 29, 2025 21:47
Show Gist options
  • Select an option

  • Save pedroinfo/f7b11c7ca52b3587fafed0213cf72ccf to your computer and use it in GitHub Desktop.

Select an option

Save pedroinfo/f7b11c7ca52b3587fafed0213cf72ccf to your computer and use it in GitHub Desktop.
/// <summary>
/// Provides helper methods to retrieve runtime and assembly-related information
/// about the currently executing application.
/// </summary>
/// <remarks>
/// This class is designed to be framework-agnostic and can be safely used in
/// desktop, service, and web applications.
///
/// When running under IIS, the application entry assembly may not represent
/// the web application itself (it may resolve to the IIS worker process instead).
/// For this reason, this class avoids relying exclusively on EntryAssembly
/// and uses safer alternatives where applicable.
/// </remarks>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment