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

C# Tracker类代码示例

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

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



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

示例1: Tracker

 public Tracker()
 {
     flushListener = new FlushListener (this);
     startListener = new StartListener (this);
     startLocalStorageListener = new StartLocalStorageListener(this);
     tracker = this;
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:7,代码来源:Tracker.cs


示例2: Awake

    private void Awake()
    {
        proximitySensor = GetComponent<Proximity>();

        proximityRun = new Utility.IntervalRun(0.2f, (deltaTime) =>
        {
            proximitySensor.Detect(OnProximityDetect);
        });
        proximityRun.Start();
        isUsed = false;
        tracker = GetComponent<Tracker>();

        parentRoom = GetComponentInParent<Room>();
        if (parentRoom != null)
        {
            parentRoom.OnVisibilityChange += OnRoomChangeVisibility;
            if (parentRoom.IsPlayerInRoom)
            {
                enabled = true;
            }
            else
            {
                enabled = false;
            }
        }
    }
开发者ID:bodedoctor,项目名称:topresearch,代码行数:26,代码来源:Terminal.cs


示例3: basic_order_for_eight_handlers_interleaved

        public void basic_order_for_eight_handlers_interleaved()
        {
            var tracker = new Tracker();
            var unity = new UnityContainer()
                .RegisterInstance(tracker);

            var dispatcher = Dispatcher.Create(d => d
                .SetUnityContainer(unity)
                .RegisterHandler<Message1>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Byte)))
                .RegisterHandler<Message2>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Byte)))
                .RegisterHandler<Message1>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Int16)))
                .RegisterHandler<Message2>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Int16)))
                .RegisterHandler<Message2>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Int32)))
                .RegisterHandler<Message2>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Int64)))
                .RegisterHandler<Message1>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Int32)))
                .RegisterHandler<Message1>((m, s) => s.GetInstance<Tracker>().Handlers.Add(typeof(Int64)))
            );

            dispatcher.Dispatch(new Message1());
            Assert.That(tracker.Handlers.Count, Is.EqualTo(4));
            Assert.That(tracker.Handlers[0], Is.EqualTo(typeof(Byte)));
            Assert.That(tracker.Handlers[1], Is.EqualTo(typeof(Int16)));
            Assert.That(tracker.Handlers[2], Is.EqualTo(typeof(Int32)));
            Assert.That(tracker.Handlers[3], Is.EqualTo(typeof(Int64)));

            tracker.Reset();
            dispatcher.Dispatch(new Message2());
            Assert.That(tracker.Handlers.Count, Is.EqualTo(4));
            Assert.That(tracker.Handlers[0], Is.EqualTo(typeof(Byte)));
            Assert.That(tracker.Handlers[1], Is.EqualTo(typeof(Int16)));
            Assert.That(tracker.Handlers[2], Is.EqualTo(typeof(Int32)));
            Assert.That(tracker.Handlers[3], Is.EqualTo(typeof(Int64)));

        }
开发者ID:paralect,项目名称:Paralect.ServiceBus,代码行数:34,代码来源:BasicOrderTest.cs


示例4: PiwikAnalytics_Droid

		public PiwikAnalytics_Droid ()
		{
			if (_piwikTracker == null) {
				Piwik piwik = Piwik.GetInstance (AndroidApp.GetAppContext ());
				_piwikTracker = piwik.NewTracker(AppConfigConstants.PiwikBaseUrl, AppConfigConstants.PiwikSiteId);
			}
		}
开发者ID:RoyStobbelaar,项目名称:MedewerkerTemp,代码行数:7,代码来源:PiwikAnalytics_Droid.cs


示例5: Combine

        public static void Combine()
        {
            Tracker t1 = new Tracker();
            D a = new D(t1.A);
            D b = new D(t1.B);
            D c = new D(t1.C);
            D d = new D(t1.D);

            D nothing = (D)(Delegate.Combine());
            Assert.Null(nothing);

            D one = (D)(Delegate.Combine(a));
            t1.Clear();
            one(5);
            Assert.Equal(t1.S, "A5");
            CheckInvokeList(new D[] { a }, one, t1);

            D ab = (D)(Delegate.Combine(a, b));
            t1.Clear();
            ab(5);
            Assert.Equal(t1.S, "A5B5");
            CheckInvokeList(new D[] { a, b }, ab, t1);

            D abc = (D)(Delegate.Combine(a, b, c));
            t1.Clear();
            abc(5);
            Assert.Equal(t1.S, "A5B5C5");
            CheckInvokeList(new D[] { a, b, c }, abc, t1);

            D abcdabc = (D)(Delegate.Combine(abc, d, abc));
            t1.Clear();
            abcdabc(9);
            Assert.Equal(t1.S, "A9B9C9D9A9B9C9");
            CheckInvokeList(new D[] { a, b, c, d, a, b, c }, abcdabc, t1);
        }
开发者ID:ESgarbi,项目名称:corefx,代码行数:35,代码来源:MulticastDelegateTests.cs


示例6: GUI

 public GUI(Tracker t, UDP udp, FlockOfBirds fob)
 {
     InitializeComponent();
       _Tracker = t;
       _udp = udp;
       _fob = fob;
 }
开发者ID:rpavlik,项目名称:chromium,代码行数:7,代码来源:GUI.cs


示例7: ReleaseTracker

 private void ReleaseTracker(Tracker tracker)
 {
     if(object.ReferenceEquals(_tracker, tracker))
     {
         _tracker = null;
     }
 }
开发者ID:pwkpwk,项目名称:Audiogen,代码行数:7,代码来源:PointerHandler.cs


示例8: Main

 static void Main(string[] args)
 {
     Torrent torrent = new Torrent(BenDecoder.Decode(args[0]));
     Tracker trackerClient = new Tracker(torrent);
     Console.WriteLine("Connecting to tracker at {0}", torrent.AnnounceUri);
     object cv = new object();
     trackerClient.Connected += delegate
         {
             Console.WriteLine("Connected to {0}", torrent.AnnounceUri);
         };
     trackerClient.Updated += delegate
         {
             if(trackerClient.LastResponse.IsSuccessful)
             {
                 Console.WriteLine("{0} Seeders, {1} leechers", trackerClient.LastResponse.NumberOfSeeds, trackerClient.LastResponse.NumberOfLeechers);
                 ConnectToPeers(trackerClient.LastResponse.Peers, torrent);
             }
             else
             {
                 QuitWithError(cv, trackerClient.LastResponse.FailureReason);
             }
            
         };
     trackerClient.Error += delegate(object sender, Exception e)
         {
             QuitWithError(cv, e.Message);
         };
     trackerClient.Start();
     lock(cv)
     {
         Monitor.Wait(cv);
     }
 }
开发者ID:worldspuppet,项目名称:torrentnet,代码行数:33,代码来源:Program.cs


示例9: AddTracker

 public void AddTracker(Tracker tracker)
 {
     if (trackers == null)
         trackers = new List<Tracker>();
     if (!trackers.Contains(tracker))
         trackers.Add(tracker);
 }
开发者ID:bodedoctor,项目名称:topresearch,代码行数:7,代码来源:HeadsUpDisplay.cs


示例10: InitTracker

    // Initializes the tracker of the given type
    // Initializing a tracker must not be done when the CameraDevice
    // is initialized or started. This function will return null if the
    // CameraDevice is currently initialized.
    public Tracker InitTracker(Tracker.Type trackerType)
    {
        if (Application.isEditor)
        {
            return null;
        }

        if (trackerManagerInitTracker((int)trackerType) == 0)
        {
            Debug.LogError("Could not initialize the tracker.");
            return null;
        }

        if (trackerType == Tracker.Type.IMAGE_TRACKER)
        {
            if (mImageTracker == null)
            {
                mImageTracker = new ImageTracker();
            }
            return mImageTracker;
        }
        else if (trackerType == Tracker.Type.MARKER_TRACKER)
        {
            if (mMarkerTracker == null)
            {
                mMarkerTracker = new MarkerTracker();
            }
            return mMarkerTracker;
        }
        else
        {
            Debug.LogError("Could not initialize tracker. Unknown tracker type.");
            return null;
        }
    }
开发者ID:n1rvana,项目名称:ZXing.NET,代码行数:39,代码来源:TrackerManager.cs


示例11: message_dispatching_with_locator

        public void message_dispatching_with_locator()
        {
            var tracker = new Tracker();
            var unity = new UnityContainer()
                .RegisterInstance(tracker);

            var dispatcher = Dispatcher.Create(d => d
                .SetUnityContainer(unity)
                .RegisterHandler<Message1>((m, s) => { s.GetInstance<Tracker>().Messages.Add(m.GetType()); })
                .RegisterHandler<Message2>((m, s) => { s.GetInstance<Tracker>().Messages.Add(m.GetType()); })
            );

            dispatcher.Dispatch(new Message1());
            Assert.That(tracker.Messages.Count, Is.EqualTo(1));
            Assert.That(tracker.Messages[0], Is.EqualTo(typeof(Message1)));

            tracker.Reset();
            dispatcher.Dispatch(new Message2());
            Assert.That(tracker.Messages.Count, Is.EqualTo(1));
            Assert.That(tracker.Messages[0], Is.EqualTo(typeof(Message2)));

            tracker.Reset();
            dispatcher.Dispatch(new Message3());
            Assert.That(tracker.Messages.Count, Is.EqualTo(0));
        }
开发者ID:paralect,项目名称:Paralect.ServiceBus,代码行数:25,代码来源:DispatcherTests.cs


示例12: HttpTrackerTransportFactory

        public HttpTrackerTransportFactory(Tracker tracker)
        {
            if ((int)(tracker.Protocol & (TrackerProtocol.HTTP | TrackerProtocol.HTTPS)) == 0)
                throw new NotSupportedException();

            Tracker = tracker;
        }
开发者ID:Dozey,项目名称:Distribution2,代码行数:7,代码来源:HttpTrackerTransportFactory.cs


示例13: ActionTrackingAttribute

 public ActionTrackingAttribute(string trackingAccount, string trackingDomain, string actionDescription,
                                string actionUrl)
 {
     Tracker = new Tracker(trackingAccount, trackingDomain, new CookieBasedAnalyticsSession());
     ActionDescription = actionDescription;
     ActionUrl = actionUrl;
 }
开发者ID:matthawley,项目名称:GoogleAnalyticsTracker,代码行数:7,代码来源:ActionTrackingAttribute.cs


示例14: message_dispatching_not_generic

        public void message_dispatching_not_generic()
        {
            var tracker = new Tracker();
            var unity = new UnityContainer()
                .RegisterInstance(tracker);

            int m1 = 0;
            int m2 = 0;

            var dispatcher = Dispatcher.Create(d => d
                .SetUnityContainer(unity)
                .RegisterHandler(m => { m1++; }, typeof(Message1))
                .RegisterHandler(m => { m2++; }, typeof(Message2))
            );

            dispatcher.Dispatch(new Message1());

            Assert.That(m1, Is.EqualTo(1));
            Assert.That(m2, Is.EqualTo(0));
            m1 = m2 = 0;

            dispatcher.Dispatch(new Message2());

            Assert.That(m1, Is.EqualTo(0));
            Assert.That(m2, Is.EqualTo(1));
        }
开发者ID:paralect,项目名称:Paralect.ServiceBus,代码行数:26,代码来源:DispatcherTests.cs


示例15: OnEnable

 void OnEnable()
 {
     tracker = (Tracker)target;
     foldouts = new bool[tracker.serialized_objs.Count];
     //for (int i = 0; i < tracker.serialized_objs.Count; i++)
     //	foldouts[i] = true;
 }
开发者ID:dimmondslice,项目名称:CAVE_DodgeGame,代码行数:7,代码来源:TrackerControl.cs


示例16: Unity

        public IUnityContainer Unity()
        {
            var tracker = new Tracker();
            var unity = new UnityContainer().RegisterInstance(tracker);

            return unity;
        }
开发者ID:paralect,项目名称:Paralect.ServiceBus,代码行数:7,代码来源:DelegateHandlersTest.cs


示例17: DeinitTracker

    // Deinitializes the tracker of the given type and frees any resources
    // used by the tracker.
    // Deinitializing a tracker must not be done when the CameraDevice
    // is initialized or started. This function will return false if the
    // tracker of the given type has not been initialized or if the
    // CameraDevice is currently initialized.
    public override bool DeinitTracker(Tracker.Type trackerType)
    {
        if (QCARWrapper.Instance.TrackerManagerDeinitTracker((int)trackerType) == 0)
        {
            Debug.LogError("Could not deinitialize the tracker.");
            return false;
        }

        if (trackerType == Tracker.Type.IMAGE_TRACKER)
        {
            mImageTracker = null;
        }
        else if (trackerType == Tracker.Type.MARKER_TRACKER)
        {
            mMarkerTracker = null;
        }
        else if (trackerType == Tracker.Type.TEXT_TRACKER)
        {
            mTextTracker = null;
        }
        else
        {
            Debug.LogError("Could not deinitialize tracker. Unknown tracker type.");
            return false;
        }

        return true;
    }
开发者ID:enriqif,项目名称:app000-ikaro,代码行数:34,代码来源:TrackerManagerImpl.cs


示例18: OnStart

		protected override void OnStart ()
		{
			base.OnStart ();
			// set your tracking code here.
			tracker = GoogleAnalytics.GetInstance (this).GetTracker ("UA-XXXX-Y");

			tracker.SendView ("/HomeScreen");
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:8,代码来源:TestActivity.cs


示例19: TrackerPeersAdded

        public TrackerPeersAdded(TorrentManager manager, int peersAdded, int total, Tracker.Tracker tracker)
            : base(manager, peersAdded, total)
        {
            if (tracker == null)
                throw new ArgumentNullException(nameof(tracker));

            Tracker = tracker;
        }
开发者ID:haroldma,项目名称:Universal.Torrent,代码行数:8,代码来源:TrackerPeersAdded.cs


示例20: ClosingTrackerClosesSocket

 public void ClosingTrackerClosesSocket()
 {
     tracker = new Tracker(file, socket);
     tracker.Start();
     Assert.IsTrue(socket.Connected);
     tracker.Close();
     Assert.IsFalse(socket.Connected);
 }
开发者ID:worldspuppet,项目名称:torrentnet,代码行数:8,代码来源:TrackerTests.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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