public bool MoveNext()
 {
     if (this._currentEnumerator != null && this._currentEnumerator.MoveNext())
     {
         this._current = this._currentEnumerator.Current;
         return(true);
     }
     this._currentEnumerator = (IEnumerator <Feature>)null;
     while (this._source.MoveNext())
     {
         FeatureCollection featureCollection = this._interpreter.Interpret(this._source.Current());
         if (featureCollection != null)
         {
             this._currentEnumerator = featureCollection.GetEnumerator();
             if (this._currentEnumerator.MoveNext())
             {
                 this._current = this._currentEnumerator.Current;
                 return(true);
             }
             this._currentEnumerator.Dispose();
             this._currentEnumerator = (IEnumerator <Feature>)null;
         }
     }
     return(false);
 }
Example #2
0
        private static bool DoesFeatureExistInCollection(FeatureCollection featureCollection, Guid featureId)
        {
            var featureEnumerator = featureCollection.GetEnumerator();

            while (featureEnumerator.MoveNext())
            {
                if (featureEnumerator.Current.DefinitionId.Equals(featureId))
                {
                    return(true);
                }
            }
            return(false);
        }
Example #3
0
 private static bool DoesFeatureExistInCollection(FeatureCollection featureCollection, Guid featureId)
 {
     var featureEnumerator = featureCollection.GetEnumerator();
     while (featureEnumerator.MoveNext())
     {
         if (featureEnumerator.Current.DefinitionId.Equals(featureId))
         {
             return true;
         }
     }
     return false;
 }