示例#1
0
        public static IDependencyResolver CreateStandardResolver()
        {
            Config config = new Config();

            var resolver = new DependencyResolver(config);

            return resolver;
        }
        public static void CastleConfig(IWindsorContainer container)
        {
            var config = new Config();
            config.UseWindsorContructor = true;

            container.Install(new SitecoreInstaller(config));
            container.Install(new ServiceInstaller());

        }
		public static void CastleConfig(IWindsorContainer container){
			var config = new Config();

			container.Register(
				//Component.For<IObjectConstructionTask>().ImplementedBy<SearchProxyWrapperTask>().LifestyleTransient(),
			);
			
			container.Install(new SitecoreInstaller(config));
		}
        public SitecoreInstaller(Config config)
        {
            Config = config;

            DataMapperInstaller = new DataMapperInstaller(config);
            QueryParameterInstaller = new QueryParameterInstaller(config);
            DataMapperTaskInstaller = new DataMapperTaskInstaller(config);
            ConfigurationResolverTaskInstaller = new ConfigurationResolverTaskInstaller(config);
            ObjectionConstructionTaskInstaller = new ObjectionConstructionTaskInstaller(config);
            ObjectSavingTaskInstaller = new ObjectSavingTaskInstaller(config);
        }
        public static void Start()
        {
            //create config
            var config = new Config();

            //create the resolver
            var resolver = DependencyResolver.CreateStandardResolver();

            resolver.Container.Install(new SitecoreInstaller(config));

            //create a context
            var context = Glass.Mapper.Context.Create(resolver, GlassRazorSettings.ContextName);

            var loader = new SitecoreAttributeConfigurationLoader("Glass.Mapper.Sc.Razor");

            context.Load(
                loader
                );
        }
示例#6
0
        public static void CastleConfig(IWindsorContainer container)
        {
            var config = new Config();

            container.Install(new SitecoreInstaller(config));
        }
  /// <summary>
  /// Initializes a new instance of the <see cref="ObjectSavingTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public ObjectSavingTaskInstaller(Config config)
 {
     Config = config;
 }
  /// <summary>
  /// Initializes a new instance of the <see cref="ObjectionConstructionTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public ObjectionConstructionTaskInstaller(Config config)
 {
     Config = config;
 }
  /// <summary>
  /// Initializes a new instance of the <see cref="ConfigurationResolverTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public ConfigurationResolverTaskInstaller(Config config)
 {
     Config = config;
 }
  /// <summary>
  /// Initializes a new instance of the <see cref="DataMapperTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public DataMapperTaskInstaller(Config config)
 {
     Config = config;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryParameterInstaller"/> class.
 /// </summary>
 /// <param name="config">The config.</param>
 public QueryParameterInstaller(Config config)
 {
     Config = config;
 }
 public WindsorSitecoreInstaller(Config config)
 {
     _config = config;
 }