Skip to content

Instantly share code, notes, and snippets.

@radiosterne
radiosterne / me.il
Created October 25, 2015 17:42
Generated via Reflection.emit
IL_0000: ldarg.1
IL_0001: callvirt instance bool [mscorlib]System.Threading.Tasks.Task::get_IsCompleted()
IL_0006: brfalse IL_0022
IL_000b: ldarg.0
IL_000c: ldfld class [DynaCache]DynaCache.MemoryCacheEntry CacheEntryRenewerWrapper::_entry
IL_0011: ldarg.1
IL_0012: callvirt instance !0 class [mscorlib]System.Threading.Tasks.Task`1<!!T>::get_Result()
IL_0017: box !!T
IL_001c: callvirt instance void [DynaCache]DynaCache.MemoryCacheEntry::Renew(object)
@radiosterne
radiosterne / csc.il
Created October 25, 2015 17:41
Generated by CSC
IL_0000: nop
IL_0001: ldarg.1
IL_0002: callvirt instance bool [mscorlib]System.Threading.Tasks.Task::get_IsCompleted()
IL_0007: ldc.i4.0
IL_0008: ceq
IL_000a: stloc.0
IL_000b: ldloc.0
IL_000c: brtrue.s IL_0028
IL_000e: nop
@radiosterne
radiosterne / gist:025786f10ba3af1bb08a
Created December 22, 2014 15:16
ES-null handling
while ((token = parser.nextToken()) != XContentParser.Token.END_ARRAY) {
Object value = parser.objectBytes();
if (value == null) {
throw new QueryParsingException(parseContext.index(), "No value specified for terms filter");
}
terms.add(value);
}