Castle.MonoRail.ActiveRecordSupport.ARDataBinder.IsContainerType C# (CSharp) Method

IsContainerType() private method

private IsContainerType ( Type type ) : bool
type System.Type
return bool
		private bool IsContainerType(Type type)
		{
			bool isContainerType = type == typeof(IList) || type == typeof(ISet);

			if (!isContainerType && type.IsGenericType)
			{
				Type[] genericArgs = type.GetGenericArguments();

				Type genType = typeof(ICollection<>).MakeGenericType(genericArgs);

				isContainerType = genType.IsAssignableFrom(type);
			}

			return isContainerType;
		}