Пример #1
0
        public IEnumerator GetEnumerator()
        {
            if (_container == null)
            {
                return(new List <Reference>().GetEnumerator());
            }

            List <Reference> references = new List <Reference>();
            IEnumerator      baseEnum   = _container.EnumReferences().GetEnumerator();

            if (null == baseEnum)
            {
                return(references.GetEnumerator());
            }
            while (baseEnum.MoveNext())
            {
                ReferenceNode refNode = baseEnum.Current as ReferenceNode;
                if (null == refNode)
                {
                    continue;
                }
                Reference reference = refNode.Object as Reference;
                if (null != reference)
                {
                    references.Add(reference);
                }
            }
            return(references.GetEnumerator());
        }
Пример #2
0
 public IEnumerator GetEnumerator()
 {
     return(UIThread.DoOnUIThread(delegate(){
         List <Reference> references = new List <Reference>();
         IEnumerator baseEnum = container.EnumReferences().GetEnumerator();
         if (null == baseEnum)
         {
             return references.GetEnumerator();
         }
         while (baseEnum.MoveNext())
         {
             ReferenceNode refNode = baseEnum.Current as ReferenceNode;
             if (null == refNode)
             {
                 continue;
             }
             Reference reference = refNode.Object as Reference;
             if (null != reference)
             {
                 references.Add(reference);
             }
         }
         return references.GetEnumerator();
     }));
 }