Example #1
0
 /// <summary>
 /// Creates a new container with a parent container.
 /// </summary>
 /// <param name="caf"></param>
 /// <param name="parent"></param>
 /// <param name="lifecycleManager"></param>
 public ImplementationHidingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent,
                                          ILifecycleManager lifecycleManager)
     : base(new DefaultPicoContainer(caf, parent, lifecycleManager))
 {
     this.caf = caf;
     this.lifecycleManager = lifecycleManager;
 }
Example #2
0
 public HyperappAdapter(ImperativeCodeModel codeModel, IComponentAdapterFactory componentAdapterFactory, ICodeGeneratorOutput output)
 {
     _codeModel = codeModel;
     _componentAdapterFactory = componentAdapterFactory;
     _output     = output;
     _codeWriter = new JavaScriptCodeWriter(output);
 }
 /// <summary>
 /// Creates a new container with a parent container.
 /// </summary>
 /// <param name="caf"></param>
 /// <param name="parent"></param>
 /// <param name="lifecycleManager"></param>
 public ImplementationHidingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent,
                                          ILifecycleManager lifecycleManager)
     : base(new DefaultPicoContainer(caf, parent, lifecycleManager))
 {
     this.caf = caf;
     this.lifecycleManager = lifecycleManager;
 }
Example #4
0
        public PageModuleGenerator(WebPageMetadata metadata, IComponentAdapterFactory componentAdapterFactory)
        {
            _metadata = metadata;
            _componentAdapterFactory = componentAdapterFactory;
            _components        = new List <IComponentAdapter>();
            _metaPageExtension = new HyperappPageMetadata();

            metadata.Extensions.Add(_metaPageExtension);
        }
		/// <summary>
		/// Creates a new container with a custom ComponentAdapterFactory and a parent container.
		/// Important note about caching: If you intend the components to be cached, you should pass
		/// in a factory that creates CachingComponentAdapter instances, such as for example
		/// other ComponentAdapterFactories.
		/// </summary>
		/// <param name="componentAdapterFactory">the factory to use for creation of ComponentAdapters.</param>
		/// <param name="parent">the parent container (used for component dependency lookups).</param>
		/// <param name="lifecycleManager">the lifecycle manager to manage start/stop/dispose calls on the container.</param>
		public DefaultPicoContainer(IComponentAdapterFactory componentAdapterFactory, IPicoContainer parent,
		                            ILifecycleManager lifecycleManager)
		{
			this.lifecycleManager = lifecycleManager;
			if (componentAdapterFactory == null)
			{
				throw new NullReferenceException("componentAdapterFactory");
			}
			this.componentAdapterFactory = componentAdapterFactory;
			this.parent = parent; // == null ? null : new ImmutablePicoContainer(parent);
		}
Example #6
0
 /// <summary>
 /// Creates a new container with a custom ComponentAdapterFactory and a parent container.
 /// Important note about caching: If you intend the components to be cached, you should pass
 /// in a factory that creates CachingComponentAdapter instances, such as for example
 /// other ComponentAdapterFactories.
 /// </summary>
 /// <param name="componentAdapterFactory">the factory to use for creation of ComponentAdapters.</param>
 /// <param name="parent">the parent container (used for component dependency lookups).</param>
 /// <param name="lifecycleManager">the lifecycle manager to manage start/stop/dispose calls on the container.</param>
 public DefaultPicoContainer(IComponentAdapterFactory componentAdapterFactory, IPicoContainer parent,
                             ILifecycleManager lifecycleManager)
 {
     this.lifecycleManager = lifecycleManager;
     if (componentAdapterFactory == null)
     {
         throw new NullReferenceException("componentAdapterFactory");
     }
     this.componentAdapterFactory = componentAdapterFactory;
     this.parent = parent; // == null ? null : new ImmutablePicoContainer(parent);
 }
		public CachingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent) : this(new CachingComponentAdapterFactory(caf), parent)
		{
		}
		public ImplementationHidingComponentAdapterFactory(IComponentAdapterFactory theDelegate, bool strict) : base(theDelegate)
		{
			this.strict = strict;
		}
		public ImplementationHidingComponentAdapterFactory(IComponentAdapterFactory theDelegate) : this(theDelegate, true)
		{
		}
		public CachingComponentAdapterFactory(IComponentAdapterFactory theDelegate) : base(theDelegate)
		{
		}
 public ImplementationHidingCachingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent,
                                                 ILifecycleManager lifecyleManager)
     : this(parent, new CachingComponentAdapterFactory(caf), lifecyleManager)
 {
 }
		public DecoratingComponentAdapterFactory(IComponentAdapterFactory theDelegate)
		{
			this.theDelegate = theDelegate;
		}
		public DefaultPicoContainer(IComponentAdapterFactory componentAdapterFactory, 
			IPicoContainer parent) : this(componentAdapterFactory, parent, new DefaultLifecycleManager())
		{
		}
 public ImplementationHidingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent)
     : this(caf, parent, new DefaultLifecycleManager())
 {
 }
Example #15
0
 public CachingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent)
     : this(new CachingComponentAdapterFactory(caf), parent)
 {
 }
Example #16
0
 public DefaultPicoContainer(IComponentAdapterFactory componentAdapterFactory,
                             IPicoContainer parent)
     : this(componentAdapterFactory, parent, new DefaultLifecycleManager())
 {
 }
Example #17
0
 public ImplementationHidingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent)
     : this(caf, parent, new DefaultLifecycleManager())
 {
 }
Example #18
0
 public DefaultPicoContainer(IComponentAdapterFactory componentAdapterFactory)
     : this(componentAdapterFactory, null)
 {
 }
		public SynchronizedComponentAdapterFactory(IComponentAdapterFactory theDelegate) : base(theDelegate)
		{
		}
 public CachingComponentAdapterFactory(IComponentAdapterFactory theDelegate) : base(theDelegate)
 {
 }
		public ImplementationHidingCachingPicoContainer(IComponentAdapterFactory caf, IPicoContainer parent, ILifecycleManager lifecyleManager) 
			: this(parent, new CachingComponentAdapterFactory(caf), lifecyleManager)
		{
		}
		/// <summary>
		/// Creates a new container with a parent container.
		/// </summary>
		/// <param name="caf"></param>
		public CachingPicoContainer(IComponentAdapterFactory caf) : this(caf, null)
		{
		}
Example #23
0
 /// <summary>
 /// Creates a new container with a parent container.
 /// </summary>
 /// <param name="caf"></param>
 public CachingPicoContainer(IComponentAdapterFactory caf) : this(caf, null)
 {
 }
Example #24
0
 public SynchronizedComponentAdapterFactory(IComponentAdapterFactory theDelegate) : base(theDelegate)
 {
 }
 public ImplementationHidingComponentAdapterFactory(IComponentAdapterFactory theDelegate)
     : this(theDelegate, true)
 {
 }
 public ImplementationHidingComponentAdapterFactory(IComponentAdapterFactory theDelegate, bool strict)
     : base(theDelegate)
 {
     this.strict = strict;
 }
		public DefaultPicoContainer(IComponentAdapterFactory componentAdapterFactory) : this(componentAdapterFactory, null)
		{
		}
 public DecoratingComponentAdapterFactory(IComponentAdapterFactory theDelegate)
 {
     this.theDelegate = theDelegate;
 }