本文整理汇总了C#中CallInfo类的典型用法代码示例。如果您正苦于以下问题:C# CallInfo类的具体用法?C# CallInfo怎么用?C# CallInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CallInfo类属于命名空间,在下文中一共展示了CallInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSource
private IRacetrackSettingsSource CreateSource(CallInfo arg)
{
return new RacetrackSettingsSource(( double ) arg [ 0 ],
( double ) arg [ 1 ],
( bool ) arg [ 2 ],
( bool ) arg [ 3 ]);
}
示例2: SetUp
public void SetUp ()
{
ins = new Installer ();
state = new Hashtable ();
sub1 = new MyInstaller ();
sub2 = new MyInstaller ();
BfInstEvt = new CallInfo ();
AfInstEvt = new CallInfo ();
CommittingEvt = new CallInfo ();
CommittedEvt = new CallInfo ();
BfRbackEvt = new CallInfo ();
AfRbackEvt = new CallInfo ();
BfUninsEvt = new CallInfo ();
AfUninsEvt = new CallInfo ();;
ins.Installers.Add (sub1);
ins.Installers.Add (sub2);
ins.BeforeInstall += new InstallEventHandler (onBeforeInstall);
ins.AfterInstall += new InstallEventHandler (onAfterInstall);
ins.Committing += new InstallEventHandler (onCommitting);
ins.Committed += new InstallEventHandler (onCommitted);
ins.BeforeRollback += new InstallEventHandler (onBeforeRollback);
ins.AfterRollback += new InstallEventHandler (onAfterRollback);
ins.BeforeUninstall += new InstallEventHandler (onBeforeUninstall);
ins.AfterUninstall += new InstallEventHandler (onAfterUninstall);
}
示例3: ComInvokeBinder
internal ComInvokeBinder(
CallInfo callInfo,
DynamicMetaObject[] args,
bool[] isByRef,
BindingRestrictions restrictions,
Expression method,
Expression dispatch,
ComMethodDesc methodDesc
) {
Debug.Assert(callInfo != null, "arguments");
Debug.Assert(args != null, "args");
Debug.Assert(isByRef != null, "isByRef");
Debug.Assert(method != null, "method");
Debug.Assert(dispatch != null, "dispatch");
Debug.Assert(TypeUtils.AreReferenceAssignable(typeof(ComMethodDesc), method.Type), "method");
Debug.Assert(TypeUtils.AreReferenceAssignable(typeof(IDispatch), dispatch.Type), "dispatch");
_method = method;
_dispatch = dispatch;
_methodDesc = methodDesc;
_callInfo = callInfo;
_args = args;
_isByRef = isByRef;
_restrictions = restrictions;
// Set Instance to some value so that CallBinderHelper has the right number of parameters to work with
_instance = dispatch;
}
示例4: SetUp
public void SetUp ()
{
ins = new TransactedInstaller ();
state = new Hashtable ();
sub1 = new SucceedInstaller ();
sub2 = new FailureInstaller ();
sub3 = new SucceedInstaller ();
BfInstEvt = new CallInfo ();
AfInstEvt = new CallInfo ();
CommittingEvt = new CallInfo ();
CommittedEvt = new CallInfo ();
BfRbackEvt = new CallInfo ();
AfRbackEvt = new CallInfo ();
BfUninsEvt = new CallInfo ();
AfUninsEvt = new CallInfo ();
ins.Installers.Add (sub1);
string [] cmdLine = new string [] { "/logToConsole=false" };
ins.Context = new InstallContext ("", cmdLine); // no log file
ins.BeforeInstall += new InstallEventHandler (onBeforeInstall);
ins.AfterInstall += new InstallEventHandler (onAfterInstall);
ins.Committing += new InstallEventHandler (onCommitting);
ins.Committed += new InstallEventHandler (onCommitted);
ins.BeforeRollback += new InstallEventHandler (onBeforeRollback);
ins.AfterRollback += new InstallEventHandler (onAfterRollback);
ins.BeforeUninstall += new InstallEventHandler (onBeforeUninstall);
ins.AfterUninstall += new InstallEventHandler (onAfterUninstall);
}
示例5: Equality
public void Equality()
{
CallInfo a = new CallInfo(5, "a", "b");
CallInfo b = new CallInfo(5, "a", "b");
CallInfo c = new CallInfo(5, a.ArgumentNames);
CallInfo d = new CallInfo(5, "b", "a");
CallInfo e = new CallInfo(4, "a", "b");
CallInfo f = new CallInfo(5, "a");
CallInfo x = new CallInfo(3);
CallInfo y = new CallInfo(3);
CallInfo z = new CallInfo(2);
Assert.Equal(a, a);
Assert.Equal(a, b);
Assert.Equal(a, c);
Assert.NotEqual(a, d);
Assert.NotEqual(a, e);
Assert.NotEqual(a, f);
Assert.Equal(x, y);
Assert.NotEqual(x, z);
var dict = new Dictionary<CallInfo, int> { { a, 1 }, { x, 2 } };
Assert.Equal(1, dict[a]);
Assert.Equal(1, dict[b]);
Assert.Equal(1, dict[c]);
Assert.False(dict.ContainsKey(d));
Assert.False(dict.ContainsKey(e));
Assert.False(dict.ContainsKey(f));
Assert.Equal(2, dict[y]);
Assert.False(dict.ContainsKey(z));
}
示例6: CurrentLine
private static int CurrentLine (LuaState L, CallInfo ci) {
int pc = CurrentPC(L, ci);
if (pc < 0)
return -1; /* only active lua functions have current-line information */
else
return GetLine(CIFunc(ci).l.p, pc);
}
示例7: currentpc
private static int currentpc(LuaState L, CallInfo ci)
{
if (!isLua(ci)) return -1; /* function is not a Lua function? */
if (ci == L.ci)
ci.savedpc = InstructionPtr.Assign(L.savedpc);
return pcRel(ci.savedpc, ci_func(ci).l.p);
}
示例8: GetMember
public static MemberInfo GetMember(CallInfo callInfo)
{
var member = callInfo.MemberInfo;
if (member != null)
return member;
if (callInfo.MemberTypes == MemberTypes.Property)
{
member = callInfo.TargetType.Property(callInfo.Name, callInfo.BindingFlags);
if (member == null)
{
const string fmt = "No match for property with name {0} and flags {1} on type {2}.";
throw new MissingMemberException(string.Format(fmt, callInfo.Name, callInfo.BindingFlags, callInfo.TargetType));
}
callInfo.MemberInfo = member;
return member;
}
if (callInfo.MemberTypes == MemberTypes.Field)
{
member = callInfo.TargetType.Field(callInfo.Name, callInfo.BindingFlags);
if (member == null)
{
const string fmt = "No match for field with name {0} and flags {1} on type {2}.";
throw new MissingFieldException(string.Format(fmt, callInfo.Name, callInfo.BindingFlags, callInfo.TargetType));
}
callInfo.MemberInfo = member;
return member;
}
throw new ArgumentException(callInfo.MemberTypes + " is not supported");
}
示例9: ArgumentCountMatches
public void ArgumentCountMatches()
{
for (int i = 0; i != 10; ++i)
{
var info = new CallInfo(i);
Assert.Equal(i, info.ArgumentCount);
}
}
示例10: InvokeMemberBinder
/// <summary>
/// Initializes a new instance of the <see cref="InvokeMemberBinder" />.
/// </summary>
/// <param name="name">The name of the member to invoke.</param>
/// <param name="ignoreCase">true if the name should be matched ignoring case; false otherwise.</param>
/// <param name="callInfo">The signature of the arguments at the call site.</param>
protected InvokeMemberBinder(string name, bool ignoreCase, CallInfo callInfo) {
ContractUtils.RequiresNotNull(name, "name");
ContractUtils.RequiresNotNull(callInfo, "callInfo");
_name = name;
_ignoreCase = ignoreCase;
_callInfo = callInfo;
}
示例11: currentline
private static int currentline(LuaState L, CallInfo ci)
{
int pc = currentpc(L, ci);
if (pc < 0)
return -1; /* only active lua functions have current-line information */
else
return getline(ci_func(ci).l.p, pc);
}
示例12: CreateList
private IQueryable<ISlot> CreateList(CallInfo arg)
{
var list = new Collection <ISlot>
{
Substitute.For <ISlot>(),
Substitute.For <ISlot>()
};
return list.AsQueryable();
}
示例13: InvokePerArgumentActions
public void InvokePerArgumentActions(CallInfo callInfo)
{
var arguments = callInfo.Args();
var argSpecs = _argumentSpecifications;
for (var i = 0; i < arguments.Length; i++)
{
argSpecs[i].RunAction(arguments[i]);
}
}
示例14: FakeTokens
private IQueryable<ApiToken> FakeTokens(CallInfo callInfo)
{
var list = new List<ApiToken>
{
new ApiToken{Id = 1, Key = "1234ASDF", UserId = 1, Created = DateTime.Now.AddMinutes(-1), ValidUntil = DateTime.Now.AddDays(30)},
new ApiToken{Id = 1, Key = "2345ASDF", UserId = 1, Created = DateTime.Now.AddMinutes(-1), ValidUntil = DateTime.Now.AddDays(30)},
new ApiToken{Id = 1, Key = "3456ASDF", UserId = 2, Created = DateTime.Now.AddMinutes(-1), ValidUntil = DateTime.Now.AddDays(30)}
};
return list.AsQueryable();
}
示例15: GetField
public static FieldInfo GetField(CallInfo callInfo)
{
var field = callInfo.TargetType.Field(callInfo.Name, callInfo.BindingFlags);
if (field == null)
{
const string fmt = "No match for field with name {0} and flags {1} on type {2}.";
throw new MissingFieldException(string.Format(fmt, callInfo.Name, callInfo.BindingFlags, callInfo.TargetType));
}
callInfo.MemberInfo = field;
return field;
}