Activity overview
Latest activity by pdorey
                    
                      
                        Vs 2010 
.Net 3.5 - Cannot switch to 4.0 yet because of various libraries  
Problem exists if IIS or WEb Dev Server used.  
Really need to sort this out as I need to profile this app [image]  / comments
                        
                        
                        
                      
                      
                      
                
                  Vs 2010
.Net 3.5 - Cannot switch to 4.0 yet because of various libraries
Problem exists if IIS or WEb Dev Server used.
Really need to sort this out as I need to profile this app 
                      
                    
                  
                    
                      
                        I have the same problem in a public constructor with a generic type  
Top of Stack Trace looks like this 
[InvalidProgramException: Common Language Runtime detected an invalid program.] 
Aspidistra.Ecommerce.CircuitBreaker`1..ctor() in c:\Builds\23\Shopfront\Shopfront Framework\src\Shopfront\Source\ECommerce\Source\Aspidistra.Ecommerce\CircuitBreaker\CircuitBreaker.cs:40   Aspidistra.Ecommerce.Sage1000.CalculatingCachedPricingScheme.GetData(String[] stockCodes, String accountCode, ISession session, IAccountCustomer& info, SortedDictionary`2& stockItemData, SortedDictionary`2& priceList, SortedDictionary`2& specialPriceList, SortedDictionary`2& discounts, SortedDictionary`2& priceListDiscounts) +252 
   
Code Looks like this public class CircuitBreaker<T>
    {
        private static Dictionary<Type, ExternalResourceStatus> resources;
        private static ILog log = LogManager.GetLogger("Aspidistra.Ecommerce.CircuitBreaker");
        static CircuitBreaker()
        {
            resources = new Dictionary<Type, ExternalResourceStatus>();
        }
        private int maxConsecutiveFailures = 5;
        private TimeSpan lockDuration = TimeSpan.FromMinutes(1);
        public CircuitBreaker()
        {
            lock (resources)
            {
                if (!resources.ContainsKey(typeof(T)))
                {
                    resources.Add(typeof(T), new ExternalResourceStatus());
                    log.DebugFormat("Circuit breaker started tracking '{0}'.", typeof(T));
                }
            }
        }
etc
}
 / comments
                        
                        
                        
                      
                      
                      
                
              I have the same problem in a public constructor with a generic type
Top of Stack Trace looks like this
[InvalidProgramException: Common Language Runtime detected an invalid program.]
Aspidistra.Ec...