public static StorageDescriptor Current(LocalBuilder locIter, Type itemStorageType) {
Debug.Assert(locIter.LocalType.GetMethod("get_Current").ReturnType == itemStorageType,
"Type " + itemStorageType + " does not match type of Current property.");
StorageDescriptor storage = new StorageDescriptor();
storage.location = ItemLocation.Current;
storage.locationObject = locIter;
storage.itemStorageType = itemStorageType;
return storage;
}