Castle.MicroKernel.Handlers.HandlerExtensionsUtil.ReleaseExtensions C# (CSharp) Method

ReleaseExtensions() public static method

public static ReleaseExtensions ( this model, bool ensureExists ) : ICollection
model this
ensureExists bool
return ICollection
		public static ICollection<IReleaseExtension> ReleaseExtensions(this ComponentModel model, bool ensureExists)
		{
			if (model == null)
			{
				throw new ArgumentNullException("model");
			}

			var releaseExtensions = model.ExtendedProperties[ReleaseExtensionsKey] as ICollection<IReleaseExtension>;
			if (releaseExtensions == null && ensureExists)
			{
				releaseExtensions = new HashSet<IReleaseExtension>();
				model.ExtendedProperties[ReleaseExtensionsKey] = releaseExtensions;
			}
			return releaseExtensions;
		}