Castle.MicroKernel.Context.CreationContext.GetContextualProperty C# (CSharp) Méthode

GetContextualProperty() public méthode

public GetContextualProperty ( object key ) : object
key object
Résultat object
		public object GetContextualProperty(object key)
		{
			if (extendedProperties == null)
			{
				return null;
			}

			var value = extendedProperties[key];
			return value;
		}

Usage Example

		public override object Resolve(CreationContext context, Burden burden, IReleasePolicy releasePolicy)
		{
			if (cachedBurden != null)
			{
				return cachedBurden.Instance;
			}
			var instanceFromContext = context.GetContextualProperty(ComponentActivator);
			if (instanceFromContext != null)
			{
				//we've been called recursively, by some dependency from base.Resolve call
				return instanceFromContext;
			}
			object instance;
			lock (ComponentActivator)
			{
				if (cachedBurden != null)
				{
					return cachedBurden.Instance;
				}
				instance = base.CreateInstance(context, burden);
				cachedBurden = burden;
			}
			Track(burden, releasePolicy);
			return instance;
		}
All Usage Examples Of Castle.MicroKernel.Context.CreationContext::GetContextualProperty