System.Collections.Generic.IEnumerable.OrderByName()

Here are the examples of the csharp api System.Collections.Generic.IEnumerable.OrderByName() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : UCTRUtils.cs
with MIT License
from baba-s

public static void CheckGameObjectsInCurrentScene( string name, Func<GameObject, bool> predicate )
		{
			var gameObjectList = GetGameObjectsInCurrentScene( predicate ).ToArray();

			if ( !gameObjectList.Any() )
			{
				Debug.Log( $"[{name}] Success!" );
				return;
			}

			var result = gameObjectList.OrderByName();

			var sb = new StringBuilder();
			sb.AppendLine( $"[{name}] Failure" );
			sb.AppendLine();

			foreach ( var n in result )
			{
				sb.AppendLine( $"- {n.RootPath}" );
			}

			Debug.LogError( sb.ToString() );
		}

19 Source : UCTRUtils.cs
with MIT License
from baba-s

public static void CheckGameObjectsAll( Func<GameObject, bool> predicate )
		{
			var settings = GetSettings();

			replacedert.IsNotNull( settings, "`UniCommonTestRunnerSettings.replacedet` could not be found." );

			if ( settings == null ) return;

			var result = new List<GameObjectData>();

			foreach ( var n in settings.GetScenePathList() )
			{
				var scene = EditorSceneManager.OpenScene( n );
				var gameObjectList = GetGameObjectsInCurrentScene( predicate );

				result.AddRange( gameObjectList );
			}

			result.AddRange( GetGameObjectsInAllPrefab( predicate ) );

			if ( result.Count <= 0 ) return;

			var output = result
				.OrderByName()
				.GroupBy( c => c.ScenePath )
			;

			var sb = new StringBuilder();

			foreach ( var n in output )
			{
				sb.AppendLine( $"# {n.Key}" );
				sb.AppendLine();

				foreach ( var data in n )
				{
					sb.AppendLine( $"- {data.RootPath}" );
				}

				sb.AppendLine();
			}

			replacedert.Fail( sb.ToString() );
		}