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

C# IBinder类代码示例

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

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



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

示例1: Formula

		/// <summary>
		/// Instantiates a new Formula predicate.
		/// </summary>
		/// <param name="resolutionType">The type of resolution for the formula.</param>
		/// <param name="bob">The business object binder to use when evaluating the formula, or null.</param>
		/// <param name="expression">The expression value, i.e. the C# code source that should be computable.</param>
		/// <param name="evaluator">A precompiled evaluator, or null.</param>
		private Formula(FormulaResolutionType resolutionType, IBinder bob, string expression, IDictionaryEvaluator evaluator):base(expression) {
			this.resolutionType = resolutionType;
			this.bob = bob;
			this.expression = expression;
			this.evaluator = evaluator;
			this.functionSignature = null;
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:14,代码来源:Formula.cs


示例2: RecordTime_Manual

 public static void RecordTime_Manual(
     DateTime startTime,
     IBinder binder,
     TextWriter logger)
 {
     RecordTime(binder, logger);
 }
开发者ID:sakapon,项目名称:Samples-2016,代码行数:7,代码来源:Functions.cs


示例3: OnBind

		// This gets called once, the first time any client bind to the Service
		// and returns an instance of the LocationServicethis._binder. All future clients will
		// reuse the same instance of the this._binder
		public override IBinder OnBind (Intent intent)
		{
			Log.Debug (this._LogTag, "Client now bound to service");

			this._binder = new TaskBinder (this);
			return this._binder;
		}
开发者ID:ddomengeaux,项目名称:xamarin-amccorma,代码行数:10,代码来源:TaskService.cs


示例4: RecordTime_Queue

 public static void RecordTime_Queue(
     [QueueTrigger("test")] object args,
     IBinder binder,
     TextWriter logger)
 {
     RecordTime(binder, logger);
 }
开发者ID:sakapon,项目名称:Samples-2016,代码行数:7,代码来源:Functions.cs


示例5: RibNinjectModule

 protected RibNinjectModule([NotNull] IBinderHelper binderHelper, [NotNull] IBinder binder)
 {
     if (binderHelper == null) throw new ArgumentNullException(nameof(binderHelper));
     if (binder == null) throw new ArgumentNullException(nameof(binder));
     _binderHelper = binderHelper;
     _binder = binder;
 }
开发者ID:riberk,项目名称:Rib.Common,代码行数:7,代码来源:RibNinjectModule.cs


示例6: OnServiceConnected

        public void OnServiceConnected(ComponentName name, IBinder binder)
        {
            _binder = binder as AndroidSensusServiceBinder;

            if (_binder != null && ServiceConnected != null)
                ServiceConnected(this, new AndroidServiceConnectedEventArgs(_binder));
        }
开发者ID:shamik94,项目名称:sensus,代码行数:7,代码来源:AndroidSensusServiceConnection.cs


示例7: PerformProcess

        public void PerformProcess(IBinder binder)
        {
            // generate dummy business objects
            IDictionary businessObjects = DummyData.GetInstance().GetBusinessObjects(nbDecaCustomers);

            // instantiate an inference engine, bind my data and process the rules
            IInferenceEngine ie = new IEImpl(binder);
            ie.LoadRuleBase(new RuleML09NafDatalogAdapter(ruleBaseFile, System.IO.FileAccess.Read));
            ie.Process(businessObjects);

            // processing is done, let's analyze the results
            IList<IList<Fact>> qrs = ie.RunQuery("Fraudulent Customers");
            Console.WriteLine("\nDetected {0} fraudulent customers.", qrs.Count);
            if (qrs.Count != 2 * nbDecaCustomers)
                Console.WriteLine("\nError! " + 2* nbDecaCustomers + " was expected.");

            // check if the customer objects have been flagged correctly
            int flaggedCount = 0;
            foreach(Customer customer in (ArrayList)businessObjects["CUSTOMERS"])
                if (customer.Fraudulent)
                    flaggedCount++;

            if (flaggedCount != 2 * nbDecaCustomers)
                throw new Exception("\nError! " + 2* nbDecaCustomers + " flagged Customer objects were expected.\n");
            else
                Console.WriteLine("\nCustomer objects were correctly flagged\n");
        }
开发者ID:Ghasan,项目名称:NxBRE,代码行数:27,代码来源:FraudControl.cs


示例8: OnBind

		// This gets called once, the first time any client bind to the Service
		// and returns an instance of the LocationServiceBinder. All future clients will
		// reuse the same instance of the binder
		public override IBinder OnBind (Intent intent)
		{
			Log.Debug (logTag, "Client now bound to service");

			binder = new LocationServiceBinder (this);
			return binder;
		}
开发者ID:Gryphyn23,项目名称:in1go-tracker,代码行数:10,代码来源:LocationService.cs


示例9: OnServiceConnected

		public void OnServiceConnected (ComponentName name, IBinder service)
		{
			Service =   IAdditionServiceStub.AsInterface(service);
			_activity.Service = (IAdditionService) Service;
			_activity.IsBound = Service != null;

		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:7,代码来源:AdditionServiceConnection.cs


示例10: BindAsync

        public override async Task BindAsync(IBinder binder, Stream stream, IReadOnlyDictionary<string, string> bindingData)
        {
            string boundQueueName = QueueName;
            if (bindingData != null)
            {
                boundQueueName = _queueNameBindingTemplate.Bind(bindingData);
            }

            if (FileAccess == FileAccess.Write)
            {
                Stream queueStream = binder.Bind<Stream>(new QueueAttribute(boundQueueName));
                await queueStream.CopyToAsync(stream);
            }
            else
            {
                IAsyncCollector<byte[]> collector = binder.Bind<IAsyncCollector<byte[]>>(new QueueAttribute(boundQueueName));
                byte[] bytes;
                using (MemoryStream ms = new MemoryStream())
                {
                    stream.CopyTo(ms);
                    bytes = ms.ToArray();
                }
                await collector.AddAsync(bytes);
            }
        }
开发者ID:wondenge,项目名称:azure-webjobs-sdk-script,代码行数:25,代码来源:QueueBinding.cs


示例11: OnBind

		public override IBinder OnBind(Intent intent)
		{
			// This method must always be implemented
			Log.Debug(TAG, "OnBind");
			this.Binder = new TimestampBinder(this);
			return this.Binder;
		}
开发者ID:xamarin,项目名称:monodroid-samples,代码行数:7,代码来源:TimestampService.cs


示例12: OnBeforeAddBinding

 /// <summary>
 /// Handles the before add binding container event.
 /// 
 /// Used to ensure the binding value is a <see cref="UnityEngine.MonoBehaviour"/>.
 /// </summary>
 /// <param name="source">Source.</param>
 /// <param name="binding">Binding.</param>
 protected void OnBeforeAddBinding(IBinder source, ref BindingInfo binding)
 {
     if (binding.value is Type &&
         TypeUtils.IsAssignable(typeof(MonoBehaviour), binding.value as Type)) {
         throw new BindingException(CANNOT_RESOLVE_MONOBEHAVIOUR);
     }
 }
开发者ID:lmlynik,项目名称:cardgame,代码行数:14,代码来源:UnityBindingContainerExtension.cs


示例13: QueueToBlob

 /// <summary>
 /// Reads a message from the "orders" queue and writes a blob in the "orders" container
 /// </summary>
 public static void QueueToBlob(
     [QueueTrigger("orders")] string orders, 
     IBinder binder)
 {
     TextWriter writer = binder.Bind<TextWriter>(new BlobAttribute("orders/" + orders));
     writer.Write("Completed");
 }
开发者ID:raycdut,项目名称:azure-webjobs-sdk-samples,代码行数:10,代码来源:Functions.cs


示例14: SetUp

        public void SetUp()
        {
            testCommand = Substitute.For<CommandTest>();
            testBinder = Substitute.For<IBinder>();

            testSignal = new TestSignal();
            testSignal.injector = testBinder;
        }
开发者ID:jpennell,项目名称:miranda,代码行数:8,代码来源:SignalTest.cs


示例15: OnServiceConnected

 public void OnServiceConnected(ComponentName name, IBinder service)
 {
     var mediaPlayerServiceBinder = service as MediaPlayerServiceBinder;
     if (mediaPlayerServiceBinder != null)
     {
        instance.OnServiceConnected(mediaPlayerServiceBinder);
     }
 }
开发者ID:martijn00,项目名称:XamarinMediaManager,代码行数:8,代码来源:MediaPlayerServiceConnection.cs


示例16: OnServiceConnected

		public void OnServiceConnected (ComponentName name, IBinder service)
		{
			var serviceBinder = service as StepServiceBinder;
			if (serviceBinder != null) {
				activity.Binder = serviceBinder;
				activity.IsBound = true;
			}
		}
开发者ID:magicdukeman,项目名称:Giannios_John_Portfolio,代码行数:8,代码来源:StepServiceConnection.cs


示例17: OnServiceConnected

 public void OnServiceConnected(ComponentName name, IBinder service)
 {
     if (service is CompassServiceBinder)
     {
         _compassServiceBinder = (CompassServiceBinder)service;
         OpenOptionsMenu();
     }
 }
开发者ID:42Spikes,项目名称:F2S,代码行数:8,代码来源:CompassMenuActivity.cs


示例18: OnServiceConnected

		public void OnServiceConnected (ComponentName name, IBinder service)
		{
			DataSyncBinderServiceProperty = service as DataSyncBinderService;
			this.IsBackgroundSyncBound = true;
			Task.Run (() => {
				DataSyncBinderServiceProperty.Service.SyncData (App.WorkoutCreatorContext.StaffMember.GymID);
			});

		}
开发者ID:MobileFit,项目名称:CoachV2,代码行数:9,代码来源:DataSyncConnectionService.cs


示例19: Function

		/// <summary>
		/// Instantiates a new function predicate.
		/// </summary>
		/// <param name="resolutionType">The type of resolution for the function.</param>
		/// <param name="predicate">The predicate value, i.e. the string representation of the function predicate.</param>
		/// <param name="bob">The business object binder to use when evaluating the function, or null.</param>
		/// <param name="name">The name of the function, as it was analyzed by the binder.</param>
		/// <param name="arguments">The array of arguments of the function, as it was analyzed by the binder.</param>
		public Function(FunctionResolutionType resolutionType, string predicate, IBinder bob, string name, params string[] arguments):base(predicate) {
			this.resolutionType = resolutionType;
			this.bob = bob;
			this.name = name;
			this.arguments = arguments;
			
			// precalculate the function signature to use in the binder to evaluate the function
			functionSignature = Parameter.BuildFunctionSignature(name, arguments);
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:17,代码来源:Function.cs


示例20: OnServiceConnected

		/// <summary>
		/// This is called when the connection with the service has been established.
		/// </summary>
		/// <param name="name">Name.</param>
		/// <param name="service">Service.</param>
		public void OnServiceConnected(ComponentName name, IBinder service)
		{
			LocationServiceBinder serviceBinder = service as LocationServiceBinder;

			if (serviceBinder != null) {
				this.binder = serviceBinder;
				ConnectionChanged(this, new ServiceConnectionEventArgs(true));
			}
		}
开发者ID:flolovebit,项目名称:xamarin-evolve-2014,代码行数:14,代码来源:LocationServiceConnection.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IBinding类代码示例发布时间:2022-05-24
下一篇:
C# IBindCtx类代码示例发布时间: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