/// <summary> /// Returns an enumerator that iterates through the collection. /// </summary> /// <returns> /// A <see cref="T:System.Collections.Generic.IEnumerator`1" /> that can be used to iterate through the collection. /// </returns> public IEnumerator <GribValue> GetEnumerator() { // null returns keys from all namespaces string nspace = Namespace == "all" ? null : Namespace; using (var keyIter = GribKeysIterator.Create(Handle, (uint)KeyFilters, nspace)) { while (keyIter.Next()) { string key = keyIter.Name; if (_ignoreKeys.Contains(key)) { continue; } yield return(this[key]); } } }
public static void GribKeysIteratorGetBytes(GribKeysIterator kiter, byte[] v, ref SizeT len) { int ret = GribApiProxyPINVOKE.GribKeysIteratorGetBytes(kiter.Reference, v, ref len.Value); if (ret != 0) { throw Grib.Api.Interop.GribApiException.Create(ret); } }
public static void GribKeysIteratorGetString(GribKeysIterator kiter, System.Text.StringBuilder v, ref SizeT len) { int ret = GribApiProxyPINVOKE.GribKeysIteratorGetString(kiter.Reference, v, ref len.Value); if (ret != 0) { throw Grib.Api.Interop.GribApiException.Create(ret); } }
public static void GribKeysIteratorSetFlags(GribKeysIterator kiter, uint flags) { int ret = GribApiProxyPINVOKE.GribKeysIteratorSetFlags(kiter.Reference, flags); if (ret != 0) { throw Grib.Api.Interop.GribApiException.Create(ret); } }
public static void GribKeysIteratorRewind(GribKeysIterator kiter) { int ret = GribApiProxyPINVOKE.GribKeysIteratorRewind(kiter.Reference); if (ret != 0) { throw Grib.Api.Interop.GribApiException.Create(ret); } }
public static string GribKeysIteratorGetName(GribKeysIterator kiter) { string ret = GribApiProxyPINVOKE.GribKeysIteratorGetName(kiter.Reference); return ret; }
public static int GribKeysIteratorNext(GribKeysIterator kiter) { return GribApiProxyPINVOKE.GribKeysIteratorNext(kiter.Reference); }