public static void ReadAllConfig(this ExceptionlessConfiguration config, params Assembly[] configAttributesAssemblies) { if (configAttributesAssemblies == null || configAttributesAssemblies.Length == 0) { #if NETSTANDARD1_5 config.ReadFromAttributes(Assembly.GetEntryAssembly()); #elif NET45 || NETSTANDARD2_0 config.ReadFromAttributes(Assembly.GetEntryAssembly(), Assembly.GetCallingAssembly()); #endif } else { config.ReadFromAttributes(configAttributesAssemblies); } #if !PORTABLE && !NETSTANDARD config.ReadFromConfigSection(); config.ReadFromAppSettings(); #endif #if !PORTABLE && !NETSTANDARD1_2 config.ReadFromEnvironmentalVariables(); #endif config.ApplySavedServerSettings(); }
public static void ReadAllConfig(this ExceptionlessConfiguration config, params Assembly[] configAttributesAssemblies) { if (configAttributesAssemblies == null || configAttributesAssemblies.Length == 0) { config.ReadFromAttributes(Assembly.GetEntryAssembly(), Assembly.GetCallingAssembly()); } else { config.ReadFromAttributes(configAttributesAssemblies); } config.ReadFromConfigSection(); config.ReadFromAppSettings(); config.ReadFromEnvironmentalVariables(); config.ApplySavedServerSettings(); }
public static void ReadAllConfig(this ExceptionlessConfiguration config, params Assembly[] configAttributesAssemblies) { if (configAttributesAssemblies == null || configAttributesAssemblies.Length == 0) { Assembly callingAssembly = null; try { callingAssembly = Assembly.GetCallingAssembly(); } catch (PlatformNotSupportedException) { } config.ReadFromAttributes(Assembly.GetEntryAssembly(), callingAssembly); } else { config.ReadFromAttributes(configAttributesAssemblies); } #if !NETSTANDARD config.ReadFromConfigSection(); config.ReadFromAppSettings(); #endif config.ReadFromEnvironmentalVariables(); config.ApplySavedServerSettings(); }