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


C# IFuture类代码示例

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


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

示例1: QueueStep

 void ISchedulable.Schedule(TaskScheduler scheduler, IFuture future)
 {
     _Future = future;
     _Scheduler = scheduler;
     _Future.RegisterOnDispose(this.OnDisposed);
     QueueStep();
 }
开发者ID:pakoito,项目名称:Fracture,代码行数:7,代码来源:SchedulableGeneratorThunk.cs

示例2: CacheRecord

		public CacheRecord(IFuture future)
		{
			this.future = future;
			this.wait = new CountedEventWaitHandle(false, EventResetMode.ManualReset, "CacheRecord.Wait");
			this.refs = 1;
			CacheRecord.cacheRecordsExtant.crement(1);
		}
开发者ID:chharam,项目名称:Capstone_IPM_RV,代码行数:7,代码来源:CacheRecord.cs

示例3: Menu

        public Menu(Game game, string description, IFuture future, params IMenuItem[] items)
        {
            Game = game;
            Description = description;
            Font = game.UIText;

            Items.AddRange(items);
        }
开发者ID:kg,项目名称:rlms2013,代码行数:8,代码来源:Menu.cs

示例4: GetAccessFuture

		private IFuture GetAccessFuture(AccessMethod accessMethod, FutureFeatures openDocFeatures, params IFuture[] methodParams)
		{
			IFuture[] array = new IFuture[2 + methodParams.Length];
			array[0] = this.GetOpenDocumentFuture(openDocFeatures);
			array[1] = new ConstantFuture(new IntParameter((int)accessMethod));
			Array.Copy(methodParams, 0, array, 2, methodParams.Length);
			return new ApplyFuture(new ApplyVerbPresent(), array);
		}
开发者ID:chharam,项目名称:Capstone_IPM_RV,代码行数:8,代码来源:UnwarpedMapTileSource.cs

示例5: RequestRenderRegion

		public void RequestRenderRegion(IFuture asynchronousImageBoundsFuture)
		{
			if (this.renderRegion == null)
			{
				AsyncRef asyncRef = (AsyncRef)asynchronousImageBoundsFuture.Realize("LatentRegionHolder.RequestRenderRegion");
				asyncRef.AddCallback(new AsyncRecord.CompleteCallback(this.ImageBoundsAvailable));
				new PersistentInterest(asyncRef);
			}
		}
开发者ID:chharam,项目名称:Capstone_IPM_RV,代码行数:9,代码来源:LatentRegionHolder.cs

示例6: GetUserBounds

		public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features)
		{
			if (this.cachedUserBounds == null || this.lastUserBoundsRequest_latentRegionHolder != latentRegionHolder || this.lastUserBoundsRequest_features != features)
			{
				this.lastUserBoundsRequest_latentRegionHolder = latentRegionHolder;
				this.lastUserBoundsRequest_features = features;
				this.cachedUserBounds = this.backingSource.GetUserBounds(latentRegionHolder, features);
			}
			return this.cachedUserBounds;
		}
开发者ID:mikhp,项目名称:greatmaps,代码行数:10,代码来源:DisplayableSourceCache.cs

示例7: AsyncRecord

		public AsyncRecord(AsyncScheduler scheduler, IFuture cacheKeyToEvict, IFuture future)
		{
			this._cacheKeyToEvict = cacheKeyToEvict;
			this._future = future;
			this.scheduler = scheduler;
			this._present = null;
			this.asyncState = AsyncState.Prequeued;
			this.queuePriority = 0;
			this.qtpRef = new AsyncRef(this, "qRef");
		}
开发者ID:chharam,项目名称:Capstone_IPM_RV,代码行数:10,代码来源:AsyncRecord.cs

示例8: GetRenderRegionSynchronously

		public RenderRegion GetRenderRegionSynchronously(IFuture synchronousImageBoundsFuture)
		{
			Present present = synchronousImageBoundsFuture.Realize("LatentRegionHolder.GetRenderRegionSynchronously");
			this.StoreRenderRegion(present);
			if (this.renderRegion == null)
			{
				throw new Exception("Render region request failed, gasp: " + present.ToString());
			}
			return this.renderRegion;
		}
开发者ID:chharam,项目名称:Capstone_IPM_RV,代码行数:10,代码来源:LatentRegionHolder.cs

示例9: ArgumentNullException

        void ISchedulable.Schedule(TaskScheduler scheduler, IFuture future)
        {
            if (future == null)
                throw new ArgumentNullException("future");

            _Future = future;
            _Scheduler = scheduler;
            _Future.RegisterOnDispose(this.OnDisposed);
            QueueStep();
        }
开发者ID:sq,项目名称:Fracture,代码行数:10,代码来源:SchedulableGeneratorThunk.cs

示例10: Get

		public override Present Get(IFuture future, string refCredit)
		{
			if (SizeSensitiveCache.oneEntryAtATime)
			{
				Present present = base.Lookup(future);
				if (present != null)
				{
					return present;
				}
			}
			return base.Get(future, refCredit);
		}
开发者ID:mikhp,项目名称:greatmaps,代码行数:12,代码来源:SizeSensitiveCache.cs

示例11: QueueStepOnComplete

        void QueueStepOnComplete (IFuture f) {
            if (_WakeDiscardingResult && f.Failed) {
                Abort(f.Error);
                return;
            }

            if (WakeCondition != null) {
                _WakePrevious = WakeCondition;
                WakeCondition = null;
            }

            _Scheduler.QueueWorkItem(_Step);
        }
开发者ID:mbahar94,项目名称:fracture,代码行数:13,代码来源:SchedulableGeneratorThunk.cs

示例12: UserBoundsRefVerb

		public UserBoundsRefVerb(LatentRegionHolder latentRegionHolder, IFuture delayedStaticBoundsFuture)
		{
			RenderRegion renderRegion = latentRegionHolder.renderRegion;
			if (renderRegion == null)
			{
				this.userRegion = null;
			}
			else
			{
				this.userRegion = renderRegion.Copy(new DirtyEvent());
			}
			this.delayedStaticBoundsFuture = delayedStaticBoundsFuture;
		}
开发者ID:mikhp,项目名称:greatmaps,代码行数:13,代码来源:UserBoundsRefVerb.cs

示例13: Flush

		public void Flush()
		{
			this.cachedCoordSys = null;
			this.cachedRendererCredit = null;
			this.cachedUserBounds = null;
			this.cachedImageRequest = null;
		}
开发者ID:mikhp,项目名称:greatmaps,代码行数:7,代码来源:DisplayableSourceCache.cs

示例14: DispatchNewMessage

        static void DispatchNewMessage (Peer from, string message) {
            _MessageBuilder.Remove(0, _MessageBuilder.Length);
            if (from != null) {
                _MessageBuilder.Append("<");
                _MessageBuilder.Append(from);
                _MessageBuilder.Append("> ");
                _MessageBuilder.Append(message);
            } else {
                _MessageBuilder.Append("*** ");
                _MessageBuilder.Append(message);
            }

            Messages.Add(new Message { From = from, Text = message, DisplayText = _MessageBuilder.ToString() });

            if (Messages.Count > MaxMessagesToStore) {
                int numToRemove = MaxMessagesToStore / 2;
                Messages.RemoveRange(0, numToRemove);
                MessageIdBase += numToRemove;
            }

            if (WaitingForMessages != null) {
                WaitingForMessages.Complete();
                WaitingForMessages = null;
            }
        }
开发者ID:mbahar94,项目名称:fracture,代码行数:25,代码来源:Program.cs

示例15: ProcessWatcher

        public ProcessWatcher(TaskScheduler scheduler, params string[] processNames)
        {
            Scheduler = scheduler;

            foreach (var pname in processNames) {
                var invariant = Path.GetFileNameWithoutExtension(pname).ToLowerInvariant();
                ProcessNames.Add(invariant);

                foreach (var process in Process.GetProcessesByName(invariant)) {
                    RunningProcessIds.Add(process.Id);
                    NewProcesses.Enqueue(process);
                }
            }

            try {
                var query = new WqlEventQuery(@"SELECT * FROM Win32_ProcessStartTrace");
                Watcher = new ManagementEventWatcher(query);
                Watcher.Options.BlockSize = 1;
                Watcher.EventArrived += new EventArrivedEventHandler(OnEventArrived);
                Watcher.Start();
                WatcherEnabled = true;
            } catch {
                Watcher = null;
                WatcherEnabled = false;

                TimerTask = Scheduler.Start(InitTimer(), TaskExecutionPolicy.RunAsBackgroundTask);
            }
        }
开发者ID:kg,项目名称:shootblues,代码行数:28,代码来源:ProcessWatcher.cs


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