コード例 #1
0
ファイル: Utilities.cs プロジェクト: neilduncan/Glass.Mapper
        public static IDependencyResolver CreateStandardResolver()
        {
            Config config = new Config();

            var resolver = new DependencyResolver(config);

            return resolver;
        }
コード例 #2
0
        public static void CastleConfig(IWindsorContainer container)
        {
            var config = new Config();
            config.UseWindsorContructor = true;

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

        }
コード例 #3
0
		public static void CastleConfig(IWindsorContainer container){
			var config = new Config();

			container.Register(
				//Component.For<IObjectConstructionTask>().ImplementedBy<SearchProxyWrapperTask>().LifestyleTransient(),
			);
			
			container.Install(new SitecoreInstaller(config));
		}
コード例 #4
0
        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);
        }
コード例 #5
0
        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));
        }
コード例 #7
0
  /// <summary>
  /// Initializes a new instance of the <see cref="ObjectSavingTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public ObjectSavingTaskInstaller(Config config)
 {
     Config = config;
 }
コード例 #8
0
  /// <summary>
  /// Initializes a new instance of the <see cref="ObjectionConstructionTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public ObjectionConstructionTaskInstaller(Config config)
 {
     Config = config;
 }
コード例 #9
0
  /// <summary>
  /// Initializes a new instance of the <see cref="ConfigurationResolverTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public ConfigurationResolverTaskInstaller(Config config)
 {
     Config = config;
 }
コード例 #10
0
  /// <summary>
  /// Initializes a new instance of the <see cref="DataMapperTaskInstaller"/> class.
  /// </summary>
  /// <param name="config">The config.</param>
 public DataMapperTaskInstaller(Config config)
 {
     Config = config;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryParameterInstaller"/> class.
 /// </summary>
 /// <param name="config">The config.</param>
 public QueryParameterInstaller(Config config)
 {
     Config = config;
 }
コード例 #12
0
 public WindsorSitecoreInstaller(Config config)
 {
     _config = config;
 }