Наследование: System.Collections.ReadOnlyCollectionBase
		public DependencyTrackingScope(CreationContext creationContext, ComponentModel model, MemberInfo info,
									   DependencyModel dependencyModel)
		{
			if (dependencyModel.TargetType == typeof (IKernel))
				return;

			this.dependencies = creationContext.Dependencies;

			// We track dependencies in order to detect cycled graphs
			// This prevents a stack overflow
			this.dependencyTrackingKey = TrackDependency(model, info, dependencyModel);
		}
Пример #2
0
		/// <summary>
		/// Initializes a new instance of the <see cref="CreationContext"/> class.
		/// </summary>
		/// <param name="handler">The handler.</param>
		/// <param name="releasePolicy">The release policy.</param>
		/// <param name="typeToExtractGenericArguments">The type to extract generic arguments.</param>
		/// <param name="additionalArguments">The additional arguments.</param>
		/// <param name="conversionManager">The conversion manager.</param>
		public CreationContext(IHandler handler, IReleasePolicy releasePolicy,
		                       Type typeToExtractGenericArguments, IDictionary additionalArguments,
		                       ITypeConverter conversionManager)
		{
			this.handler = handler;
			this.releasePolicy = releasePolicy;
			this.additionalArguments = EnsureAdditionalArgumentsWriteable(additionalArguments);
			this.converter = conversionManager;
			dependencies = new DependencyModelCollection();

			genericArguments = ExtractGenericArguments(typeToExtractGenericArguments);
		}
Пример #3
0
			public RemoveDependencies(DependencyModelCollection dependencies,
			                          DependencyModelCollection parentDependencies)
			{
				this.dependencies = dependencies;
				this.parentDependencies = parentDependencies;
			}
Пример #4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="CreationContext"/> class.
		/// </summary>
		private CreationContext()
		{
			dependencies = new DependencyModelCollection();
			releasePolicy = new NoTrackingReleasePolicy();
		}
Пример #5
0
		public CreationContext(IHandler handler, DependencyModelCollection dependencies, IList handlersChain)
			: this(handler, (IDictionary)null)
		{
			this.dependencies = new DependencyModelCollection(dependencies);
            this.handlersChain.AddRange(handlersChain);
		}
Пример #6
0
		public CreationContext(DependencyModel[] dependencies)
		{
			handler = null;
			this.dependencies = new DependencyModelCollection(dependencies);
		}
Пример #7
0
		public CreationContext(IHandler handler, IDictionary additionalArguments)
		{
			this.handler = handler;
			this.additionalArguments = additionalArguments;
			dependencies = new DependencyModelCollection();
		}
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DependencyModelCollection"/> class.
 /// </summary>
 /// <param name="dependencies">The dependencies.</param>
 public DependencyModelCollection(DependencyModelCollection dependencies)
 {
     InnerList.AddRange(dependencies);
 }