Example #1
0
 internal static IEnumerable<INetCfgComponent> All(IEnumNetCfgComponent penum) {
     int hr;
     INetCfgComponent one;
     uint celtFetched;
     while (0 == (hr = penum.Next(1, out one, out celtFetched)) && celtFetched == 1) {
         yield return one;
     }
 }
Example #2
0
            internal static IEnumerable <INetCfgComponent> All(IEnumNetCfgComponent penum)
            {
                int hr;
                INetCfgComponent one;
                uint             celtFetched;

                while (0 == (hr = penum.Next(1, out one, out celtFetched)) && celtFetched == 1)
                {
                    yield return(one);
                }
            }
Example #3
0
        public static INetCfgComponent GetNextComponent(this IEnumNetCfgComponent instance)
        {
            object rawComponent;
            int    fetched;

            if (0 != instance.Next(1, out rawComponent, out fetched))
            {
                return(null);
            }

            if (fetched < 1)
            {
                return(null);
            }

            return(rawComponent as INetCfgComponent);
        }