//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static void verify(java.util.List<org.neo4j.kernel.api.index.IndexEntryUpdate<org.neo4j.internal.kernel.api.schema.SchemaDescriptorSupplier>> expected, IndexUpdateStorage<GenericKey,NativeIndexValue> storage) throws java.io.IOException private static void Verify(IList <IndexEntryUpdate <SchemaDescriptorSupplier> > expected, IndexUpdateStorage <GenericKey, NativeIndexValue> storage) { using (IndexUpdateCursor <GenericKey, NativeIndexValue> reader = storage.reader()) { foreach (IndexEntryUpdate <SchemaDescriptorSupplier> expectedUpdate in expected) { assertTrue(reader.Next()); assertEquals(expectedUpdate, AsUpdate(reader)); } assertFalse(reader.Next()); } }
private static IndexEntryUpdate <SchemaDescriptorSupplier> AsUpdate(IndexUpdateCursor <GenericKey, NativeIndexValue> reader) { switch (reader.UpdateMode()) { case ADDED: return(IndexEntryUpdate.add(reader.Key().EntityId, _descriptor, reader.Key().asValue())); case CHANGED: return(IndexEntryUpdate.change(reader.Key().EntityId, _descriptor, reader.Key().asValue(), reader.Key2().asValue())); case REMOVED: return(IndexEntryUpdate.remove(reader.Key().EntityId, _descriptor, reader.Key().asValue())); default: throw new System.ArgumentException(); } }