public BootstrapConventions()
        {
            this.IsConcreteType = t => !t.IsInterface && !t.IsAbstract && !t.IsGenericType;

            this.IsService = t => this.IsConcreteType( t ) && t.Namespace.IsLike( "*.Services" );

            this.SelectServiceContracts = type =>
            {
                var types = new HashSet<Type>( type.GetInterfaces() );
                if ( types.None() || type.IsAttributeDefined<ContractAttribute>() )
                {
                    types.Add( type );
                }

                return types;
            };

            this.IsMessageHandler = t =>
            {
                return t.Namespace != null && t.Namespace.IsLike( "*.Messaging.Handlers" ) && ( t.Is<IMessageHandler>() || t.Is<IHandleMessage>() );
            };

            this.SelectMessageHandlerContracts = type => type.GetInterfaces().Take( 1 );

            this.IsViewModel = t => this.IsConcreteType( t ) && t.FullName.IsLike( "*.Presentation.*ViewModel" );

            this.IsShellViewModel = ( services, implementation ) =>
            {
                return services.Any( t => t.Name.IsLike( "Main*" ) || t.Name.IsLike( "Shell*" ) );
            };

            this.SelectViewModelContracts = type => new[] { type };

            this.IsView = t => this.IsConcreteType( t ) && t.FullName.IsLike( "*.Presentation.*View" );

            this.IsShellView = ( services, implementation ) =>
            {
                return services.Any( t => t.Name.IsLike( "Main*" ) || t.Name.IsLike( "Shell*" ) );
            };

            this.SelectViewContracts = type => new[] { type };

            this.GetInterestedRegionNameIfAny = type =>
            {
                if ( this.IsView( type ) )
                {
                    if ( type.IsAttributeDefined<InjectViewInRegionAttribute>() )
                    {
                        return type.GetAttribute<InjectViewInRegionAttribute>().Named;
                    }

                    if ( type.Namespace.IsLike( "*.Presentation.Partial.*" ) )
                    {
                        var regionName = type.Namespace.Split( '.' ).Last();
                        return regionName;
                    }
                }

                return null;
            };

            this.IsExcluded = t =>
            {
                return t.IsAttributeDefined<DisableAutomaticRegistrationAttribute>();
            };
        }
		/// <summary>
		/// Initializes a new instance of the <see cref="BootstrapConventions" /> class.
		/// </summary>
		public BootstrapConventions()
		{
			this.DefaultIsConcreteType = t => !t.IsInterface && !t.IsAbstract && !t.IsGenericType;
			this.IsConcreteType = t => this.DefaultIsConcreteType( t );

			this.DefaultIsService = t => this.IsConcreteType( t ) && t.Namespace.IsLike( "*.Services" );
			this.IsService = t => this.DefaultIsService( t );

			this.DefaultSelectServiceContracts = type =>
			{
				var types = new HashSet<Type>( type.GetInterfaces() );
				if( types.None() || type.IsAttributeDefined<ContractAttribute>() )
				{
					types.Add( type );
				}

				return types;
			};
			this.SelectServiceContracts = type => this.DefaultSelectServiceContracts( type );

			this.DefaultIsMessageHandler = t =>
			{
#pragma warning disable 618
				return t.Namespace != null && t.Namespace.IsLike( "*.Messaging.Handlers" ) && ( t.Is<IMessageHandler>() || t.Is<IHandleMessage>() );
#pragma warning restore 618
			};
			this.IsMessageHandler = t => this.DefaultIsMessageHandler( t );

			this.DefaultSelectMessageHandlerContracts = type => type.GetInterfaces().Take( 1 );
			this.SelectMessageHandlerContracts = type => this.DefaultSelectMessageHandlerContracts( type );

			this.DefaultIsViewModel = t => this.IsConcreteType( t ) && t.FullName.IsLike( "*.Presentation.*ViewModel" );
			this.IsViewModel = t => this.DefaultIsViewModel( t );

			this.DefaultIsShellViewModel = ( services, implementation ) =>
			{
				return services.Any( t => t.Name.IsLike( "Main*" ) || t.Name.IsLike( "Shell*" ) );
			};
			this.IsShellViewModel = ( services, implementation ) => this.DefaultIsShellViewModel( services, implementation );

			this.DefaultSelectViewModelContracts = type => new[] { type };
			this.SelectViewModelContracts = type => this.DefaultSelectViewModelContracts( type );

			this.DefaultIsView = t => this.IsConcreteType( t ) && t.FullName.IsLike( "*.Presentation.*View" );
			this.IsView = t => this.DefaultIsView( t );

			this.DefaultIsShellView = ( services, implementation ) =>
			{
				return services.Any( t => t.Name.IsLike( "Main*" ) || t.Name.IsLike( "Shell*" ) );
			};
			this.IsShellView = ( services, implementation ) => this.DefaultIsShellView( services, implementation );

			this.DefaultSelectViewContracts = type => new[] { type };
			this.SelectViewContracts = type => this.DefaultSelectViewContracts( type );
#if !WINDOWS_PHONE_8

			this.DefaultGetInterestedRegionNameIfAny = type =>
			{
				if( this.IsView( type ) )
				{

					if( type.IsAttributeDefined<InjectViewInRegionAttribute>() )
					{
						return type.GetAttribute<InjectViewInRegionAttribute>().Named;
					}

					if( type.Namespace.IsLike( "*.Presentation.Partial.*" ) )
					{
						var regionName = type.Namespace.Split( '.' ).Last();
						return regionName;
					}
				}

				return null;
			};
			this.GetInterestedRegionNameIfAny = type => this.DefaultGetInterestedRegionNameIfAny( type );
#endif

			this.DefaultIsExcluded = t =>
			{
				return t.IsAttributeDefined<DisableAutomaticRegistrationAttribute>();
			};
			this.IsExcluded = t => this.DefaultIsExcluded( t );

#if !SILVERLIGHT

			this.DefaultAssemblyFileScanPatterns = entryAssembly =>
			{
				var name = entryAssembly.GetName().Name;

				var dllPattern = String.Format( "{0}*.dll", name );
				var radical = "Radical.*.dll";

				return new[] { dllPattern, radical };
			};
			this.AssemblyFileScanPatterns = entryAssembly => this.DefaultAssemblyFileScanPatterns( entryAssembly );

			this.DefaultIncludeAssemblyInContainerScan = assembly => true;
			this.IncludeAssemblyInContainerScan = assembly => this.DefaultIncludeAssemblyInContainerScan(assembly);

			this.DefaultIgnorePropertyInjection = pi =>
			{
				var isDefined = pi.IsAttributeDefined<IgnorePropertyInjectionAttribue>();
				return isDefined;
			};
			this.IgnorePropertyInjection = pi => this.DefaultIgnorePropertyInjection( pi );

			this.DefaultIgnoreViewPropertyInjection = pi =>
			{
				return true;
			};
			this.IgnoreViewPropertyInjection = pi => this.DefaultIgnoreViewPropertyInjection( pi );

			this.DefaultIgnoreViewModelPropertyInjection = pi =>
			{
				return true;
			};
			this.IgnoreViewModelPropertyInjection = pi => this.DefaultIgnoreViewModelPropertyInjection( pi );
#endif
		}