本文整理汇总了C#中IDispatcher类的典型用法代码示例。如果您正苦于以下问题:C# IDispatcher类的具体用法?C# IDispatcher怎么用?C# IDispatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDispatcher类属于命名空间,在下文中一共展示了IDispatcher类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: SimpleDynamicsWorld
/// <summary>
/// this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver
/// </summary>
/// <param name="dispatcher"></param>
/// <param name="pairCache"></param>
/// <param name="constraintSolver"></param>
public SimpleDynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache, IConstraintSolver constraintSolver)
: base(dispatcher, pairCache)
{
_constraintSolver = constraintSolver;
_ownsConstraintSolver = false;
_gravity = new Vector3(0, 0, -10);
}
开发者ID:Belxjander,项目名称:Asuna,代码行数:13,代码来源:SimpleDynamicsWorld.cs
示例17: DynamicsWorld
public DynamicsWorld(IDispatcher dispatcher,IBroadphaseInterface broadphase,ICollisionConfiguration collisionConfiguration)
:base(dispatcher,broadphase,collisionConfiguration)
{
m_internalTickCallback = null;
m_worldUserInfo = null;
m_solverInfo = new ContactSolverInfo();
}
开发者ID:bsamuels453,项目名称:BulletXNA,代码行数:7,代码来源:DynamicsWorld.cs
示例18: createProxy
public BroadphaseProxy createProxy(ref btVector3 aabbMin,ref btVector3 aabbMax,
BroadphaseNativeTypes shapeType, object userPtr,
short collisionFilterGroup, short collisionFilterMask, IDispatcher dispatcher,
object multiSapProxy)
{
DbvtProxy proxy = new DbvtProxy(aabbMin, aabbMax, userPtr,
collisionFilterGroup,
collisionFilterMask);
DbvtAabbMm aabb;// = DbvtAabbMm.FromMM(aabbMin, aabbMax);
DbvtAabbMm.FromMM(ref aabbMin, ref aabbMax, out aabb);
//bproxy->aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
proxy.stage = m_stageCurrent;
proxy.m_uniqueId = ++m_gid;
proxy.leaf = m_sets[0].insert(ref aabb, proxy);
listappend(ref proxy, ref m_stageRoots[m_stageCurrent]);
if (!m_deferedcollide)
{
DbvtTreeCollider collider = new DbvtTreeCollider(this);
collider.proxy = proxy;
m_sets[0].collideTV(m_sets[0].m_root, ref aabb, collider);
m_sets[1].collideTV(m_sets[1].m_root,ref aabb, collider);
}
return (proxy);
}
开发者ID:himapo,项目名称:ccm,代码行数:27,代码来源:DbvtBroadphase.cs
示例19: ViewModelBase
public ViewModelBase(IPersonService personService, IDispatcher dispatcher, IEventAggregator aggregator, IDialogService dialogService)
{
if (personService == null)
{
throw new ArgumentNullException("personService");
}
if (dispatcher == null)
{
throw new ArgumentNullException("dispatcher");
}
if (aggregator == null)
{
throw new ArgumentNullException("aggregator");
}
if (dialogService == null)
{
throw new ArgumentNullException("dialogService");
}
this.personService = personService;
this.dispatcher = dispatcher;
this.aggregator = aggregator;
this.dialogService = dialogService;
isBusy = false;
}
开发者ID:yovannyr,项目名称:mvvm-unittesting,代码行数:29,代码来源:ViewModelBase.cs
示例20: SolverService
public SolverService(
[NotNull] IMessageBus messageBus,
[NotNull] IGameService gameService,
[NotNull] IBoardSolverService boardSolverService,
[NotNull] IDispatcher dispatcher)
{
if (messageBus == null)
{
throw new ArgumentNullException(nameof(messageBus));
}
if (gameService == null)
{
throw new ArgumentNullException(nameof(gameService));
}
if (boardSolverService == null)
{
throw new ArgumentNullException(nameof(boardSolverService));
}
if (dispatcher == null)
{
throw new ArgumentNullException(nameof(dispatcher));
}
this.messageBus = messageBus;
this.gameService = gameService;
this.boardSolverService = boardSolverService;
this.dispatcher = dispatcher;
this.messageBus.Subscribe<BoardScrambled>(this.OnBoardScrambled);
this.messageBus.Subscribe<BoardResetted>(this.OnBoardResetted);
this.messageBus.Subscribe<SlideHappened>(this.OnSlideHappened);
}
开发者ID:LorandBiro,项目名称:SpeedSlidingTrainer,代码行数:35,代码来源:SolverService.cs
注:本文中的IDispatcher类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论