Created
June 3, 2014 04:02
-
-
Save Fhernd/b88a6f04d81b5d6e1e29 to your computer and use it in GitHub Desktop.
Demostración de uso del método GetData de la clase AppDomain en C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
namespace Recetas.Cap03 | |
{ | |
internal class UsoGetData | |
{ | |
public static string[] propiedadesIntegradas = { | |
"APP_CONFIG_FILE", "APP_NAME", "APPBASE", "APP_CONFIG_BLOB", | |
"BINPATH_PROBE_ONLY", "CACHE_BASE", "CODE_DOWNLOAD_DISABLED", "DEV_PATH", | |
"DYNAMIC_BASE", "DISALLOW_APP", "DISALLOW_APP_REDIRECTS", "DISALLOW_APP_BASE_PROBING", | |
"FORCE_CACHE_INSTALL", "LICENSE_FILE", "PRIVATE_BINPATH", "SHADOW_COPY_DIRS" | |
}; | |
public static void Main() | |
{ | |
// Utilicemos el dominio de aplicación actual | |
// para descubrir sus propiedades: | |
AppDomain dominioAnfitrion = AppDomain.CurrentDomain; | |
Console.WriteLine("\nValores predeterminados de las propiedades del dominio anfitrión:"); | |
foreach (string propiedad in propiedadesIntegradas) | |
{ | |
Console.WriteLine("\t`{0}` = {1}", propiedad, dominioAnfitrion.GetData(propiedad)); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment