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


C# IBinder类代码示例

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


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


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