本文整理汇总了C#中IPersistentMap.containsKey方法的典型用法代码示例。如果您正苦于以下问题:C# IPersistentMap.containsKey方法的具体用法?C# IPersistentMap.containsKey怎么用?C# IPersistentMap.containsKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPersistentMap
的用法示例。
在下文中一共展示了IPersistentMap.containsKey方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EmitMethods
private static void EmitMethods(TypeBuilder proxyTB,
List<MethodSignature> sigs,
Dictionary<string,List<MethodSignature>> overloads,
Dictionary<string,FieldBuilder> varMap,
IPersistentMap exposesMethods)
{
foreach (MethodSignature sig in sigs)
{
FieldBuilder regularFB = varMap[sig.Name];
FieldBuilder overloadFB = null;
if (overloads.ContainsKey(sig.Name))
overloadFB = varMap[OverloadName(sig)];
switch (sig.Source)
{
case "super":
EmitForwardingMethod(proxyTB, false, regularFB, overloadFB, sig,
delegate(ILGen gen)
{
gen.EmitLoadArg(0); // gen.Emit(OpCodes.Ldarg_0);
for (int i = 0; i < sig.ParamTypes.Length; i++)
gen.EmitLoadArg(i + 1); // gen.Emit(OpCodes.Ldarg, (i + 1));
gen.Emit(OpCodes.Call, sig.Method); // not gen.EmitCall(sig.Method) -- we need call versus callvirt
});
break;
case "interface":
EmitForwardingMethod(proxyTB, false, regularFB, overloadFB, sig,
delegate(ILGen gen)
{
EmitUnsupported(gen, sig.Name);
});
break;
default:
EmitForwardingMethod(proxyTB, sig.IsStatic, regularFB, overloadFB, sig,
delegate(ILGen gen)
{
EmitUnsupported(gen, sig.Name);
});
break;
}
}
if (exposesMethods != null)
{
foreach (MethodSignature sig in sigs)
{
if (sig.Source == "super")
{
Symbol name = Symbol.intern(sig.Name);
if (exposesMethods.containsKey(name))
CreateSuperCall(proxyTB, (Symbol)exposesMethods.valAt(name), sig.Method);
}
}
}
}
示例2: read
public static Object read(PushbackTextReader r, IPersistentMap opts)
{
return read(r, !opts.containsKey(EOF), opts.valAt(EOF), false, opts);
}