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();
        }
Exemple #2
0
 public static void ReadAllConfig(this ExceptionlessConfiguration config, params Assembly[] configAttributesAssemblies)
 {
     config.UseIsolatedStorage();
     if (configAttributesAssemblies == null || configAttributesAssemblies.Length == 0)
     {
         config.ReadFromAttributes(Assembly.GetEntryAssembly(), Assembly.GetCallingAssembly());
     }
     else
     {
         config.ReadFromAttributes(configAttributesAssemblies);
     }
     config.ReadFromConfigSection();
     config.ApplySavedServerSettings();
 }
        /// <summary>
        /// Reads the <see cref="ExceptionlessAttribute" /> and <see cref="ExceptionlessSettingAttribute" />
        /// from the passed in assembly.
        /// </summary>
        /// <param name="config">The configuration object you want to apply the attribute settings to.</param>
        /// <param name="assemblies">The assembly that contains the Exceptionless configuration attributes.</param>
        public static void ReadFromAttributes(this ExceptionlessConfiguration config, params Assembly[] assemblies)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.ReadFromAttributes(assemblies.ToList());
        }
Exemple #4
0
        public static void ReadAllConfig(this ExceptionlessConfiguration config, params Assembly[] configAttributesAssemblies)
        {
            if (!config.Resolver.HasRegistration <IObjectStorage>())
            {
                config.UseIsolatedStorage();
            }

            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();
        }