Server.Commands.Categorization.GetDeepestMatch C# (CSharp) Méthode

GetDeepestMatch() private static méthode

private static GetDeepestMatch ( CategoryEntry root, Type type ) : CategoryEntry
root CategoryEntry
type System.Type
Résultat CategoryEntry
		private static CategoryEntry GetDeepestMatch( CategoryEntry root, Type type )
		{
			if ( !root.IsMatch( type ) )
				return null;

			for ( int i = 0; i < root.SubCategories.Length; ++i )
			{
				CategoryEntry check = GetDeepestMatch( root.SubCategories[i], type );

				if ( check != null )
					return check;
			}

			return root;
		}
	}