当前位置: 首页>>代码示例>>C#>>正文


C# CallInfo类代码示例

本文整理汇总了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 ]);
 }
开发者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


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