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


C# IDispatcher类代码示例

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


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

示例1: CEvent

 //--------------------------------------
 // INITIALIZE
 //--------------------------------------
 public CEvent(int id, string name, object data, IDispatcher dispatcher)
 {
     _id = id;
     _name = name;
     _data = data;
     _dispatcher = dispatcher;
 }
开发者ID:goddie,项目名称:u3dGameFramework,代码行数:10,代码来源:CEvent.cs

示例2: LoadSolutionsCommand

 public LoadSolutionsCommand(SolutionsLauncherViewModel solutionsLauncherViewModel, ISolutionDetector solutionDetector, ISolutionPriorityResolver solutionPriorityResolver, IDispatcher dispatcher)
 {
     _solutionsLauncherViewModel = solutionsLauncherViewModel;
     _solutionDetector = solutionDetector;
     _solutionPriorityResolver = solutionPriorityResolver;
     _dispatcher = dispatcher;
 }
开发者ID:yanivru,项目名称:Mabado,代码行数:7,代码来源:LoadSolutionsCommand.cs

示例3: Publisher

        public Publisher(PublisherSettings settings, IHandlerSource handlerSource, IDispatcher[] dispatchers)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
            if (handlerSource == null)
            {
                throw new ArgumentNullException("handlerSource");
            }

            if (dispatchers == null)
            {
                throw new ArgumentNullException("dispatchers");
            }

            if (dispatchers.Any(x => ReferenceEquals(x, null)))
            {
                throw new ArgumentException("At least one of dispatches is null.", "dispatchers");
            }

            _settings = settings;
            _handlerSource = handlerSource;
            _dispatchers = dispatchers;
        }
开发者ID:Codestellation,项目名称:Emisstar,代码行数:25,代码来源:Publisher.cs

示例4: UnmanagedBitmapRenderer

 /// <summary>
 /// Initializes a new instance of the <see cref="UnmanagedBitmapRenderer" /> class.
 /// </summary>
 /// <param name="threadManager">The thread manager.</param>
 /// <param name="dispatcher">The dispatcher.</param>
 public UnmanagedBitmapRenderer(IThreadManager threadManager, IDispatcher dispatcher)
     : base(threadManager)
 {
     threadManager.Guard("threadManager");
     dispatcher.Guard("dispatcher");
     this.dispatcher = dispatcher;
 }
开发者ID:Melamew,项目名称:iLynx.Common,代码行数:12,代码来源:UnmanagedBitmapRenderer.cs

示例5: MemoryImageViewModel

 public MemoryImageViewModel(IGameBoy gameBoy, IDispatcher dispatcher)
 {
     _gameBoy = gameBoy;
       _dispatcher = dispatcher;
       _gameBoy.FrameCompleted += OnFrameCompleted;
       _memoryImage = new WriteableBitmap(256, 256, 96, 96, PixelFormats.Gray8, null);
 }
开发者ID:cristiandonosoc,项目名称:GBSharp,代码行数:7,代码来源:MemoryImageViewModel.cs

示例6: DiscreteDynamicsWorld

		///this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those
		public DiscreteDynamicsWorld(IDispatcher dispatcher, IBroadphaseInterface pairCache, IConstraintSolver constraintSolver, ICollisionConfiguration collisionConfiguration)
			: base(dispatcher, pairCache, collisionConfiguration)
		{
			m_ownsIslandManager = true;
			m_constraints = new ObjectArray<TypedConstraint>();
			m_actions = new List<IActionInterface>();
			m_nonStaticRigidBodies = new ObjectArray<RigidBody>();
			m_islandManager = new SimulationIslandManager();
			m_constraintSolver = constraintSolver;

			Gravity = new Vector3(0, -10, 0);
			m_localTime = 1f / 60f;
			m_profileTimings = 0;
			m_synchronizeAllMotionStates = false;

			if (m_constraintSolver == null)
			{
				m_constraintSolver = new SequentialImpulseConstraintSolver();
				m_ownsConstraintSolver = true;
			}
			else
			{
				m_ownsConstraintSolver = false;
			}
		}
开发者ID:HaKDMoDz,项目名称:InVision,代码行数:26,代码来源:DiscreteDynamicsWorld.cs

示例7: Acceptor

 public Acceptor(TcpListener listener, IDispatcher dispatcher)
 {
     _listener = listener;
     _listener.Start();
     _dispatcher = dispatcher;
     _dispatcher.Register(this);
 }
开发者ID:jeffrymorris,项目名称:reactor-pattern,代码行数:7,代码来源:Acceptor.cs

示例8: DynamicsWorld

 public DynamicsWorld(IDispatcher dispatcher, IBroadphaseInterface broadphase, ICollisionConfiguration collisionConfiguration)
     : base(dispatcher, broadphase, collisionConfiguration)
 {
     InternalTickCallback = null;
     InternalPreTickCallback = null;
     m_worldUserInfo = null;
 }
开发者ID:himapo,项目名称:ccm,代码行数:7,代码来源:DynamicsWorld.cs

示例9: MethodEntityProcessor

        internal MethodEntityProcessor(MethodEntity methodEntity, 
            IDispatcher dispatcher, ICodeProvider codeProvider, IEntityDescriptor entityDescriptor = null,
            bool verbose = false)
            : base(methodEntity, entityDescriptor, dispatcher)
        {
            Contract.Assert(methodEntity != null);

            this.MethodEntity = methodEntity;
            this.EntityDescriptor = entityDescriptor==null?methodEntity.EntityDescriptor
                                                          :entityDescriptor;
            this.Verbose = true; // verbose;
            // It gets a code provider for the method.
            if (codeProvider!=null || dispatcher is OrleansDispatcher)
            {
                this.codeProvider = codeProvider;
                 //this.codeProvider = ProjectGrainWrapper.CreateProjectGrainWrapperAsync(methodEntity.MethodDescriptor).Result;
                //SetCodeProviderAsync(methodEntity.MethodDescriptor);
            }
            else
            {
                var pair = ProjectCodeProvider.GetProjectProviderAndSyntaxAsync(methodEntity.MethodDescriptor).Result;
                if (pair != null)
                {
                    this.codeProvider = pair.Item1;
                }
            }
            // We use the codeProvider for Propagation and HandleCall and ReturnEvents (in the method DiffProp that uses IsAssignable)
            // We can get rid of this by passing codeProvider as parameter in this 3 methods
            this.MethodEntity.PropGraph.SetCodeProvider(this.codeProvider);
        }
开发者ID:TubaKayaDev,项目名称:Call-Graph-Builder-DotNet,代码行数:30,代码来源:MethodEntityProcessor.cs

示例10: APUViewModel

 public APUViewModel(IGameBoy gameBoy, IDispatcher dispatcher)
 {
     _gameBoy = gameBoy;
       _dispatcher = dispatcher;
       _gameBoy.FrameCompleted += OnFrameCompleted;
       _spectrogram = new WriteableBitmap(_numberOfFramesPerImage, _fftSize, 96, 96, PixelFormats.Bgr32, null);
 }
开发者ID:cristiandonosoc,项目名称:GBSharp,代码行数:7,代码来源:APUViewModel.cs

示例11: DatabaseFileStorage

        public DatabaseFileStorage(IDispatcher dispatcher)
        {
            if (dispatcher == null)
                throw new ArgumentNullException(nameof(dispatcher));

            _dispatcher = dispatcher;
        }
开发者ID:dyatlov-a,项目名称:cEditor,代码行数:7,代码来源:DatabaseFileStorage.cs

示例12: ComponentDetailViewModel

        public ComponentDetailViewModel(string componentId, IDispatcher dispatcher, IActiveItemRepository<Component> components)
        {
            dispatcher.Background(() =>
            {
                Component component;
                if (!components.TryGetItem(componentId, out component))
                    throw new ArgumentException("Unknown component.");

                var description = component.Description;
                var services = component.DescribeServices();
                var metadata = component.Metadata;
                var sharing = component.Sharing;
                var lifetime = component.Lifetime;
                var activator = component.Activator;
                var ownership = component.Ownership;
                var target = component.TargetComponentId;
                var id = component.Id;

                dispatcher.Foreground(() =>
                {
                    Description = description;
                    Metadata = metadata;
                    Services = services;
                    Sharing = sharing.ToString();
                    Lifetime = lifetime.ToString();
                    Activator = activator.ToString();
                    Ownership = ownership.ToString();
                    Target = target;
                    Id = id;
                });
            });
        }
开发者ID:mustafatig,项目名称:whitebox,代码行数:32,代码来源:ComponentDetailViewModel.cs

示例13: RemoveOverlappingPair

		public Object RemoveOverlappingPair(BroadphaseProxy proxy0, BroadphaseProxy proxy1, IDispatcher dispatcher)
		{
			if (!HasDeferredRemoval())
			{
				BroadphasePair findPair = new BroadphasePair(proxy0,proxy1);

				int findIndex = m_overlappingPairArray.IndexOf(findPair);
				if (findIndex >= 0 && findIndex < m_overlappingPairArray.Count)
				{
					OverlappingPairCacheGlobals.gOverlappingPairs--;
					BroadphasePair pair = m_overlappingPairArray[findIndex];
					Object userData = pair.m_internalInfo1;
					CleanOverlappingPair(pair,dispatcher);
					if (m_ghostPairCallback != null)
					{
						m_ghostPairCallback.RemoveOverlappingPair(proxy0, proxy1,dispatcher);
					}
					//BroadphasePair temp = m_overlappingPairArray[findIndex];
					//m_overlappingPairArray[findIndex] = m_overlappingPairArray[m_overlappingPairArray.Count-1];
					//m_overlappingPairArray[m_overlappingPairArray.Count-1] = temp;
					m_overlappingPairArray.RemoveAt(m_overlappingPairArray.Count - 1);
					return userData;
				}
			}

			return 0;
		}
开发者ID:HaKDMoDz,项目名称:InVision,代码行数:27,代码来源:SortedOverlappingPairCache.cs

示例14: QueueSubscriptionFactory

 public QueueSubscriptionFactory( ISubscriptionManager subscriptions, IDispatcher dispatcher,
                                  IChannelProxyFactory proxyFactory )
 {
     Subscriptions = subscriptions;
     Dispatcher = dispatcher;
     ProxyFactory = proxyFactory;
 }
开发者ID:cmgator,项目名称:Symbiote,代码行数:7,代码来源:QueueSubscriptionFactory.cs

示例15: MyNodeOverlapCallback

		public MyNodeOverlapCallback(MultiSapBroadphase multiSap,MultiSapProxy multiProxy,IDispatcher dispatcher)
		{
			m_multiSap = multiSap;
			m_multiProxy = multiProxy;
			m_dispatcher = dispatcher;

		}
开发者ID:HaKDMoDz,项目名称:InVision,代码行数:7,代码来源:MyNodeOverlapCallback.cs


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