예제 #1
0
        //public static void RemoveAttributeIfExists(DSLFactory.Candle.SystemModel.CodeGeneration.CodeModel.CandleCodeFunction function)
        //{
        //    function.RemoveAttributeIfExists("Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers.CachingCallHandler");
        //}

        public void SetAttribute(CodeInjectionContext context, DSLFactory.Candle.SystemModel.CodeGeneration.CodeModel.CandleCodeFunction function)
        {
            function.AddAttribute("Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers.CachingCallHandler",
                                  context.Strategy.StrategyId, false,
                                  String.Empty, expirationTime.Hours.ToString(),
                                  String.Empty, expirationTime.Minutes.ToString(),
                                  String.Empty, expirationTime.Seconds.ToString());
        }
예제 #2
0
 public void SetAttribute(CodeInjectionContext context, DSLFactory.Candle.SystemModel.CodeGeneration.CodeModel.CandleCodeFunction function)
 {
     function.AddAttribute("Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers.LogCallHandler", context.Strategy.StrategyId, false, PrepareLogAttribute(function.ToString()));
 }