• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CallInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CallInfo的典型用法代码示例。如果您正苦于以下问题:C# CallInfo类的具体用法?C# CallInfo怎么用?C# CallInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CallInfo类属于命名空间,在下文中一共展示了CallInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateSource

 private IRacetrackSettingsSource CreateSource(CallInfo arg)
 {
     return new RacetrackSettingsSource(( double ) arg [ 0 ],
                                        ( double ) arg [ 1 ],
                                        ( bool ) arg [ 2 ],
                                        ( bool ) arg [ 3 ]);
 }
开发者ID:tschroedter,项目名称:Selkie.WPF,代码行数:7,代码来源:RacetrackSettingsSourceManagerTests.cs


示例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);
	}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:28,代码来源:InstallerTest.cs


示例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;
        }
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:31,代码来源:ComInvokeBinder.cs


示例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);
	}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:30,代码来源:TransactedInstallerTest.cs


示例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));
        }
开发者ID:ESgarbi,项目名称:corefx,代码行数:32,代码来源:CallInfoTests.cs


示例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);
		}
开发者ID:ZoneBeat,项目名称:FAForeverMapEditor,代码行数:7,代码来源:ldebug.cs


示例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);
 }
开发者ID:chenzuo,项目名称:SharpLua,代码行数:7,代码来源:ldebug.cs


示例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");
        }
开发者ID:devworker55,项目名称:Mammatus,代码行数:30,代码来源:LookupUtils.cs


示例9: ArgumentCountMatches

 public void ArgumentCountMatches()
 {
     for (int i = 0; i != 10; ++i)
     {
         var info = new CallInfo(i);
         Assert.Equal(i, info.ArgumentCount);
     }
 }
开发者ID:dotnet,项目名称:corefx,代码行数:8,代码来源:CallInfoTests.cs


示例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;
        }
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:14,代码来源:InvokeMemberBinder.cs


示例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);
 }
开发者ID:chenzuo,项目名称:SharpLua,代码行数:8,代码来源:ldebug.cs


示例12: CreateList

        private IQueryable<ISlot> CreateList(CallInfo arg)
        {
            var list = new Collection <ISlot>
                       {
                           Substitute.For <ISlot>(),
                           Substitute.For <ISlot>()
                       };

            return list.AsQueryable();
        }
开发者ID:tschroedter,项目名称:DoctorsAppointment,代码行数:10,代码来源:RequestHandlerTests.cs


示例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]);
            }
        }
开发者ID:tanujmathur,项目名称:NSubstitute,代码行数:10,代码来源:CallSpecification.cs


示例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();
 }
开发者ID:justinobney,项目名称:jobney.ef.learning,代码行数:10,代码来源:RequiredTokenTests.cs


示例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;
 }
开发者ID:devworker55,项目名称:Mammatus,代码行数:11,代码来源:LookupUtils.cs


示例16: Create

 private ITrailDetails Create(CallInfo callInfo)
 {
     return new TrailDetails(( int ) callInfo [ 0 ],
                             ( int[] ) callInfo [ 1 ],
                             ( double ) callInfo [ 2 ],
                             ( double ) callInfo [ 3 ],
                             ( double ) callInfo [ 4 ],
                             ( string ) callInfo [ 5 ],
                             ( double ) callInfo [ 6 ],
                             ( double ) callInfo [ 7 ],
                             ( double ) callInfo [ 8 ]);
 }
开发者ID:tschroedter,项目名称:Selkie.WPF,代码行数:12,代码来源:TrailHistoryModelTests.cs


示例17: LineForIndex

        private ILine LineForIndex(CallInfo callInfo)
        {
            switch ( m_NodeIndexToLineConverter.NodeIndex )
            {
                case 0:
                case 1:
                    return m_LineOne;

                default:
                    return m_LineTwo;
            }
        }
开发者ID:tschroedter,项目名称:Selkie.WPF,代码行数:12,代码来源:NodeIndexHelperTests.cs


示例18: GetConstructor

        public static ConstructorInfo GetConstructor(CallInfo callInfo)
        {
            var constructor = callInfo.MemberInfo as ConstructorInfo;
            if (constructor != null)
                return constructor;

            constructor = callInfo.TargetType.Constructor(callInfo.BindingFlags, callInfo.ParamTypes);
            if (constructor == null)
                throw new MissingMemberException("Constructor does not exist");
            callInfo.MemberInfo = constructor;
            callInfo.MethodParamTypes = constructor.GetParameters().ToTypeArray();
            return constructor;
        }
开发者ID:devworker55,项目名称:Mammatus,代码行数:13,代码来源:LookupUtils.cs


示例19: StationOnCallInfoAdded

        private void StationOnCallInfoAdded(object sender, CallInfo callInfo)
        {
            var fromAccount  = GetAccount(callInfo.Source);
            var toAccount = GetAccount(callInfo.Target);
            if (fromAccount == null) return;
            double outCost = fromAccount.AddIncomingMinutes(callInfo.Duration.TotalMinutes);

            if (toAccount == null) return;
            double inCost = toAccount.AddIncomingMinutes(callInfo.Duration.TotalMinutes);

            AddCallStatistic(fromAccount, new CallStatistic(callInfo, outCost));
            AddCallStatistic(toAccount, new CallStatistic(callInfo, inCost));
        }
开发者ID:IIITanbI,项目名称:EpamProjects,代码行数:13,代码来源:BillingSystem.cs


示例20: BindComInvoke

 private DynamicMetaObject BindComInvoke(DynamicMetaObject[] args, ComMethodDesc method, CallInfo callInfo, bool[] isByRef) {
     return new ComInvokeBinder(
         callInfo,
         args,
         isByRef,
         IDispatchRestriction(),
         Expression.Constant(method),
         Expression.Property(
             Helpers.Convert(Expression, typeof(IDispatchComObject)),
             typeof(IDispatchComObject).GetProperty("DispatchObject")
         ),
         method
     ).Invoke();
 }
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:14,代码来源:IDispatchMetaObject.cs



注:本文中的CallInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CallSignature类代码示例发布时间:2022-05-24
下一篇:
C# CallEmitter类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap