Exemplo n.º 1
0
        /// <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]);
                }
            }
        }
Exemplo n.º 2
0
  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);
	}
  }
Exemplo n.º 3
0
  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);
	}
  }
Exemplo n.º 4
0
  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);
	}
  }
Exemplo n.º 5
0
  public static void GribKeysIteratorRewind(GribKeysIterator kiter) {
    int ret = GribApiProxyPINVOKE.GribKeysIteratorRewind(kiter.Reference);
	
	if (ret != 0)
	{
		throw Grib.Api.Interop.GribApiException.Create(ret);
	}
  }
Exemplo n.º 6
0
 public static string GribKeysIteratorGetName(GribKeysIterator kiter) {
   string ret = GribApiProxyPINVOKE.GribKeysIteratorGetName(kiter.Reference);
   return ret;
 }
Exemplo n.º 7
0
  public static int GribKeysIteratorNext(GribKeysIterator kiter) {
    return GribApiProxyPINVOKE.GribKeysIteratorNext(kiter.Reference);
}