Foreign/SonyLE/LevelEditor/Documents/GameDocumentRegistry.cs
/// <summary>
/// Find all objects of type T in all the open game documents</summary>        
Find all objects of type T in all the open game documents
Find all objects of type T in all the open game documents
public IEnumerable<T> FindAll<T>()
            where T : class
        {            
            foreach (IGameDocument doc in Documents)
            {
                var enumerable = doc.As<IEnumerableContext>();
                if (enumerable != null)
                {
                    foreach (DomNode childNode in enumerable.Items.AsIEnumerable<DomNode>())
                    {
                        T t = childNode.As<T>();
                        if (t != null)
                            yield return t;
                    }
                }
            }
        }
public IEnumerable < T > FindAll < T > ( ) where T : class { foreach ( IGameDocument doc in Documents ) { var enumerable = doc . As < IEnumerableContext > ( ) ; if ( enumerable != null ) { foreach ( DomNode childNode in enumerable . Items . AsIEnumerable < DomNode > ( ) ) { T t = childNode . As < T > ( ) ; if ( t != null ) yield return t ; } } } }
Find all objects of type T in all the open game documents
Find all objects of type T in all the open game documents