Esempio n. 1
0
 public bool CanResolve(Castle.MicroKernel.Context.CreationContext context,
                        ISubDependencyResolver contextHandlerResolver,
                        Castle.Core.ComponentModel model,
                        Castle.Core.DependencyModel dependency)
 {
     //make sure your connectionstring has value
 }
Esempio n. 2
0
 public object Resolve(Castle.MicroKernel.Context.CreationContext context,
                       ISubDependencyResolver contextHandlerResolver,
                       Castle.Core.ComponentModel model,
                       Castle.Core.DependencyModel dependency)
 {
     //resolve your connectionstring here
 }
 public bool CanResolve(
     Castle.MicroKernel.Context.CreationContext context,
     ISubDependencyResolver contextHandlerResolver,
     Castle.Core.ComponentModel model,
     Castle.Core.DependencyModel dependency)
 {
     return(dependency.TargetType == typeof(StringConfiguration));
 }
Esempio n. 4
0
        public MockingStrategy GetStrategyFor(Castle.Core.DependencyModel model)
        {
            MockingStrategy strategy = _strategies
                                       .Where(kvp => kvp.Key.IsValidFor(model))
                                       .Select(kvp => kvp.Value)
                                       .FirstOrDefault();

            return(strategy ?? MockingStrategy.Default);
        }
        public object Resolve(
            Castle.MicroKernel.Context.CreationContext context,
            ISubDependencyResolver contextHandlerResolver,
            Castle.Core.ComponentModel model,
            Castle.Core.DependencyModel dependency)
        {
            var configuration = ConfigurationServiceClient.Instance.GetSetting(dependency.DependencyKey);

            return(new StringConfiguration()
            {
                Value = configuration,
            });
        }
Esempio n. 6
0
 public object Resolve(Castle.MicroKernel.Context.CreationContext context, ISubDependencyResolver contextHandlerResolver, Castle.Core.ComponentModel model, Castle.Core.DependencyModel dependency)
 {
     throw new NotImplementedException();
 }
Esempio n. 7
0
 static void Kernel_DependencyResolving(Castle.Core.ComponentModel client, Castle.Core.DependencyModel model, object dependency)
 {
     Logger.DebugFormat("IOC Container: Kernel dependency resolving. Client: {0}, Dependency key: {1}, dependency: {2}", client.Name, model.DependencyKey, dependency);
 }
Esempio n. 8
0
 private void Kernel_DependencyResolving(Castle.Core.ComponentModel client, Castle.Core.DependencyModel model,
                                         object dependency)
 {
     _logger.DebugFormat("~ Resolving dependency '{0}' for component '{1}'.", model.TargetType.Name, client.Service.Name);
 }