Castle.MonoRail.Framework.Services.DefaultControllerDescriptorProvider.CollectDefaultAction C# (CSharp) Method

CollectDefaultAction() private method

Collects the default action.
private CollectDefaultAction ( ControllerMetaDescriptor descriptor, Type controllerType ) : void
descriptor Castle.MonoRail.Framework.Internal.ControllerMetaDescriptor The descriptor.
controllerType System.Type Type of the controller.
return void
		private void CollectDefaultAction(ControllerMetaDescriptor descriptor, Type controllerType)
		{
			object[] attributes = controllerType.GetCustomAttributes(typeof(DefaultActionAttribute), true);

			if (attributes.Length != 0)
			{
				descriptor.DefaultAction = (DefaultActionAttribute) attributes[0];
			}
		}