예제 #1
0
파일: VForm.cs 프로젝트: windrobin/kumpro
 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;
     }
 }
예제 #2
0
파일: VForm.cs 프로젝트: windrobin/kumpro
            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);
                }
            }
예제 #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);
        }