Esempio n. 1
0
        public static IEnumerable <STATPROPSETSTG> AsEnumerable(this IPropertySetStorage propertySetStorage)
        {
            Assert.IsTrue(propertySetStorage != null);

            propertySetStorage.Enum(out var enumStatPropSetStg);

            while (true)
            {
                var statPropSetStgArray = new STATPROPSETSTG[1];
                enumStatPropSetStg.Next(1, statPropSetStgArray, out var fetched);

                if (fetched == 0)
                {
                    break;
                }

                yield return(statPropSetStgArray[0]);
            }
        }
Esempio n. 2
0
        public static IEnumerable <STATPROPSETSTG> AsEnumerable(this IPropertySetStorage propertySetStorage)
        {
            FoundationContract.Requires <ArgumentException>(propertySetStorage != null);

            IEnumSTATPROPSETSTG enumStatPropSetStg;

            propertySetStorage.Enum(out enumStatPropSetStg);

            while (true)
            {
                var  statPropSetStgArray = new STATPROPSETSTG[1];
                uint fetched;
                enumStatPropSetStg.Next(1, statPropSetStgArray, out fetched);

                if (fetched == 0)
                {
                    break;
                }

                yield return(statPropSetStgArray[0]);
            }
        }