/// <summary>
		///   Initializes a new instance of the <see cref = "CreateOnUIThreadActivator" /> class.
		/// </summary>
		/// <param name = "model">The model.</param>
		/// <param name = "kernel">The kernel.</param>
		/// <param name = "onCreation">Delegate called on construction.</param>
		/// <param name = "onDestruction">Delegate called on destruction.</param>
		public CreateOnUIThreadActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation,
		                                 ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
			customActivator = CreateCustomActivator(model, kernel);
			performCreation = PerformCreation;
		}
Example #2
0
 public ServiceCreatorCallbackActivator(ComponentModel model,
                                        IKernel kernel, ComponentInstanceDelegate onCreation,
                                        ComponentInstanceDelegate onDestruction) :
     base(model, kernel, onCreation, onDestruction)
 {
     // Nothing to do
 }
Example #3
0
 public Temp(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
 {
     this.model         = model;
     this.kernel        = kernel;
     this.onCreation    = onCreation;
     this.onDestruction = onDestruction;
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="ControlComponentActivator"/> class.
		/// </summary>
		/// <param name="model">The model.</param>
		/// <param name="kernel">The kernel.</param>
		/// <param name="onCreation">Delegate called on construction.</param>
		/// <param name="onDestruction">Delegate called on destruction.</param>
		public ControlComponentActivator(ComponentModel model, IKernel kernel,
		                                 ComponentInstanceDelegate onCreation,
		                                 ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
			instantiateInMainThread = InstantiateInMainThread;
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="DefaultComponentActivator"/> class.
		/// </summary>
		/// <param name="model"></param>
		/// <param name="kernel"></param>
		/// <param name="onCreation"></param>
		/// <param name="onDestruction"></param>
		public DefaultComponentActivator(ComponentModel model, IKernel kernel,
										 ComponentInstanceDelegate onCreation,
										 ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
			useFastCreateInstance = !model.Implementation.IsContextful && SecurityManager.IsGranted(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter));
		}
Example #6
0
 /// <summary>
 /// Constructor for SessionFactoryActivator
 /// </summary>
 /// <param name="model"></param>
 /// <param name="kernel"></param>
 /// <param name="onCreation"></param>
 /// <param name="onDestruction"></param>
 public SessionFactoryActivator(ComponentModel model,
                                IKernelInternal kernel,
                                ComponentInstanceDelegate onCreation,
                                ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #7
0
 public AspNetCoreComponentActivator(
     ComponentModel model,
     IKernelInternal kernel,
     ComponentInstanceDelegate onCreation,
     ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
 {
 }
		/// <summary>
		/// Constructor for SessionFactoryActivator
		/// </summary>
		/// <param name="model"></param>
		/// <param name="kernel"></param>
		/// <param name="onCreation"></param>
		/// <param name="onDestruction"></param>
		public SessionFactoryActivator(ComponentModel model,
		                               IKernelInternal kernel,
		                               ComponentInstanceDelegate onCreation,
		                               ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
		/// <summary>
		///   Initializes a new instance of the <see cref = "DefaultComponentActivator" /> class.
		/// </summary>
		/// <param name = "model"></param>
		/// <param name = "kernel"></param>
		/// <param name = "onCreation"></param>
		/// <param name = "onDestruction"></param>
		public DefaultComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
#if (!SILVERLIGHT)
			useFastCreateInstance = !model.Implementation.IsContextful && new SecurityPermission(SecurityPermissionFlag.SerializationFormatter).IsGranted();
#endif
		}
Example #10
0
 /// <summary>
 /// Constructs an AbstractComponentActivator
 /// </summary>
 protected AbstractComponentActivator(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
 {
     this.model         = model;
     this.kernel        = kernel;
     this.onCreation    = onCreation;
     this.onDestruction = onDestruction;
 }
 /// <summary>
 ///   Initializes a new instance of the <see cref = "CreateOnUIThreadActivator" /> class.
 /// </summary>
 /// <param name = "model">The model.</param>
 /// <param name = "kernel">The kernel.</param>
 /// <param name = "onCreation">Delegate called on construction.</param>
 /// <param name = "onDestruction">Delegate called on destruction.</param>
 public CreateOnUIThreadActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation,
                                  ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
     customActivator = CreateCustomActivator(model, kernel);
     performCreation = PerformCreation;
 }
        /// <summary>
        ///   Initializes a new instance of the <see cref = "DefaultComponentActivator" /> class.
        /// </summary>
        /// <param name = "model"></param>
        /// <param name = "kernel"></param>
        /// <param name = "onCreation"></param>
        /// <param name = "onDestruction"></param>
        public DefaultComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
            : base(model, kernel, onCreation, onDestruction)
        {
#if (!SILVERLIGHT)
            useFastCreateInstance = !model.Implementation.IsContextful && new SecurityPermission(SecurityPermissionFlag.SerializationFormatter).IsGranted();
#endif
        }
Example #13
0
 public WcfClientActivator(ComponentModel model, IKernel kernel,
                           ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
     clients      = kernel.Resolve <WcfClientExtension>();
     proxyFactory = new WcfProxyFactory(clients.ProxyGenerator, clients);
 }
		public ServiceCreatorCallbackActivator(ComponentModel model,
		                                       IKernel kernel, ComponentInstanceDelegate onCreation,
		                                       ComponentInstanceDelegate onDestruction) :
		                                       	base(model, kernel, onCreation, onDestruction)
		{
			// Nothing to do
		}
		/// <summary>
		///   Constructs an AbstractComponentActivator
		/// </summary>
		protected AbstractComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
		{
			this.model = model;
			this.kernel = kernel;
			this.onCreation = onCreation;
			this.onDestruction = onDestruction;
		}
Example #16
0
		public LoggerActivator(
			ComponentModel model,
			IKernel kernel,
			ComponentInstanceDelegate onCreation,
			ComponentInstanceDelegate onDestruction)
			: base(model, (IKernelInternal)kernel, onCreation, onDestruction)
		{
		}
 public WpfViewCreater(
     ComponentModel model,
     IKernel kernel,
     ComponentInstanceDelegate onCreation,
     ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #18
0
 public ResourceProviderActivator(
     ComponentModel model,
     IKernelInternal kernel,
     ComponentInstanceDelegate onCreation,
     ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
 public ContextStoreInstanceActivator(
     ComponentModel model, 
     IKernel kernel, 
     ComponentInstanceDelegate onCreation,
     ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
 {
     this.storeKey = model.Name;
 }
Example #20
0
 public NHibernateConfigurationActivator(
     ComponentModel model,
     IKernelInternal kernel,
     ComponentInstanceDelegate onCreation,
     ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #21
0
 public MessageHandlerActivator(
     ComponentModel model,
     IKernelInternal kernel,
     ComponentInstanceDelegate onCreation,
     ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
     m_Endpoints = model.ExtendedProperties["MessageHandlerFor"] as string[];
 }
Example #22
0
        public virtual void RaiseComponentDestroyed(ComponentModel model, object instance)
        {
            ComponentInstanceDelegate eventDelegate = (ComponentInstanceDelegate)events[ComponentDestroyedEvent];

            if (eventDelegate != null)
            {
                eventDelegate(model, instance);
            }
        }
Example #23
0
 public ViewComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
     ViewType = Model.Implementation;
     ViewModelType = Model.Implementation
         .GetInterfaces()
         .Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IView<>))
         .Select(i => i.GetGenericArguments().First())
         .First();
 }
 public FactoryMethodActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
     creator           = Model.ExtendedProperties["factoryMethodDelegate"] as Func <IKernel, ComponentModel, CreationContext, T>;
     managedExternally = (Model.ExtendedProperties["factory.managedExternally"] as bool?).GetValueOrDefault();
     if (creator == null)
     {
         throw new ComponentActivatorException(
                   string.Format(
                       "{0} received misconfigured component model for {1}. Are you sure you registered this component with 'UsingFactoryMethod'?",
                       GetType().Name, Model.Name));
     }
 }
Example #25
0
		/// <summary>
		/// Creates a new <see cref="DynamicLoaderActivator"/>.
		/// </summary>
		public DynamicLoaderActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation,
		                              ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
			if (!model.Implementation.IsSubclassOf(typeof(MarshalByRefObject)))
				throw new FacilityException(
					String.Format(
						"The implementation for the component '{0}' must inherit from System.MarshalByRefObject in order to be created in an isolated AppDomain.",
						model.Name));

			this.loader = (RemoteLoader) model.ExtendedProperties["dynamicLoader.loader"];

			if (this.loader == null)
				throw new FacilityException(String.Format("A remote loader was not created for component '{0}'.", model.Name));
		}
Example #26
0
		public MyCustomerActivator(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
		/// <summary>
		/// Initializes a new instance of the <see cref = "RemoteClientActivatedActivator" /> class.
		/// </summary>
		/// <param name = "model"> The model. </param>
		/// <param name = "kernel"> The kernel. </param>
		/// <param name = "onCreation"> The oncreation event handler. </param>
		/// <param name = "onDestruction"> The ondestruction event handler. </param>
		public RemoteClientActivatedActivator(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
Example #28
0
 public WcfBehaviorActivator(ComponentModel model, IKernelInternal kernel,
                             ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
 public ExternalInstanceActivatorWithDecommissionConcern(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
		/// <summary>
		///   Initializes a new instance of the <see cref = "RemoteActivatorThroughConnector" /> class.
		/// </summary>
		/// <param name = "model">The model.</param>
		/// <param name = "kernel">The kernel.</param>
		/// <param name = "onCreation">The oncreation event handler.</param>
		/// <param name = "onDestruction">The ondestruction event handler.</param>
		public RemoteActivatorThroughConnector(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
Example #31
0
 /// <summary>
 /// Initializes a new instance of the <see cref = "WebUserControlComponentActivator" /> class.
 /// </summary>
 /// <param name = "model"> The model. </param>
 /// <param name = "kernel"> The kernel. </param>
 /// <param name = "onCreation"> The on creation. </param>
 /// <param name = "onDestruction"> The on destruction. </param>
 public WebUserControlComponentActivator(ComponentModel model, IKernelInternal kernel,
                                         ComponentInstanceDelegate onCreation,
                                         ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
 public PrevalenceEngineComponentActivator(ComponentModel model, IKernel kernel,
                                           ComponentInstanceDelegate onCreation,
                                           ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #33
0
 public CalculatorActivator(ComponentModel model, DefaultKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
		public MyCustomLazyServiceActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
 public NonPropertyResolvingComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #36
0
 public SerializationCustomComponentActivator(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
 public CommandHandlerComponentActivator(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
     chainBuilder = new CommandHandlerChainBuilder(kernel);
 }
 public FrameworkElementModelViewActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref = "RemoteActivatorThroughRegistry" /> class.
 /// </summary>
 /// <param name = "model"> The model. </param>
 /// <param name = "kernel"> The kernel. </param>
 /// <param name = "onCreation"> The oncreation event handler. </param>
 /// <param name = "onDestruction"> The ondestruction event handler. </param>
 public RemoteActivatorThroughRegistry(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
		public AspectEngineActivator(ComponentModel model, IKernel kernel, 
			ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) : 
			base(model, kernel, onCreation, onDestruction)
		{
		}
Example #41
0
 public DefaultBlocksComponentActivator(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
 {
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="RemoteMarshallerActivator"/> class.
		/// </summary>
		/// <param name="model">The model.</param>
		/// <param name="kernel">The kernel.</param>
		/// <param name="onCreation">The oncreation event handler.</param>
		/// <param name="onDestruction">The ondestruction event handler.</param>
		public RemoteMarshallerActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
		{
		}
Example #43
0
 public ObjectContainerComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) :
     base(model, kernel, onCreation, onDestruction)
 {
 }
        {
        }

        protected override void SetUpProperties(object instance, CreationContext context)
		/// <summary>
		/// Initializes a new instance of the <see cref = "RemoteActivatorThroughRegistry" /> class.
		/// </summary>
		/// <param name = "model"> The model. </param>
		/// <param name = "kernel"> The kernel. </param>
		/// <param name = "onCreation"> The oncreation event handler. </param>
		/// <param name = "onDestruction"> The ondestruction event handler. </param>
		public RemoteActivatorThroughRegistry(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
 public ExternalInstanceActivatorWithDecommissionConcern(ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="WebUserControlComponentActivator"/> class.
		/// </summary>
		/// <param name="model">The model.</param>
		/// <param name="kernel">The kernel.</param>
		/// <param name="onCreation">The on creation.</param>
		/// <param name="onDestruction">The on destruction.</param>
		public WebUserControlComponentActivator(ComponentModel model, IKernel kernel,
												ComponentInstanceDelegate onCreation,
		                                        ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
		public PrevalenceEngineComponentActivator(ComponentModel model, IKernel kernel, 
			ComponentInstanceDelegate onCreation, 
			ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
		{
		}
Example #49
0
 public FrameworkElementModelViewActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) :  base(model, kernel, onCreation, onDestruction)
 {
 }
Example #50
0
 public ContextStoreInstanceActivator(ComponentModel model, IKernelInternal kernelInternal, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernelInternal, onCreation, onDestruction)
 {
     storeKey = model.Name;
 }
 public RemoteActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #52
0
 public XFProxyComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation,
     ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
     _model = model;
 }
		public WcfBehaviorActivator(ComponentModel model, IKernel kernel,
			ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
			: base(model, kernel, onCreation, onDestruction)
		{
		}
 public DropDisposalConcernForISession(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction)
 {
 }
 public ViewPageComponentActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }
Example #56
0
 /// <summary>Initializes a new instance of the <see cref="NonPublicComponentActivator" /> class.</summary>
 /// <param name="model">Component model.</param>
 /// <param name="kernel">Castle Windsor kernel.</param>
 /// <param name="onCreation">Creation delegate.</param>
 /// <param name="onDestruction">Destruction delegate.</param>
 public NonPublicComponentActivator(Castle.Core.ComponentModel model, IKernelInternal kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction)
     : base(model, kernel, onCreation, onDestruction)
 {
 }