本文整理汇总了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;
}
示例2: LoadSolutionsCommand
public LoadSolutionsCommand(SolutionsLauncherViewModel solutionsLauncherViewModel, ISolutionDetector solutionDetector, ISolutionPriorityResolver solutionPriorityResolver, IDispatcher dispatcher)
{
_solutionsLauncherViewModel = solutionsLauncherViewModel;
_solutionDetector = solutionDetector;
_solutionPriorityResolver = solutionPriorityResolver;
_dispatcher = dispatcher;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
}
示例7: Acceptor
public Acceptor(TcpListener listener, IDispatcher dispatcher)
{
_listener = listener;
_listener.Start();
_dispatcher = dispatcher;
_dispatcher.Register(this);
}
示例8: DynamicsWorld
public DynamicsWorld(IDispatcher dispatcher, IBroadphaseInterface broadphase, ICollisionConfiguration collisionConfiguration)
: base(dispatcher, broadphase, collisionConfiguration)
{
InternalTickCallback = null;
InternalPreTickCallback = null;
m_worldUserInfo = null;
}
示例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);
}
示例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);
}
示例11: DatabaseFileStorage
public DatabaseFileStorage(IDispatcher dispatcher)
{
if (dispatcher == null)
throw new ArgumentNullException(nameof(dispatcher));
_dispatcher = dispatcher;
}
示例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;
});
});
}
示例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;
}
示例14: QueueSubscriptionFactory
public QueueSubscriptionFactory( ISubscriptionManager subscriptions, IDispatcher dispatcher,
IChannelProxyFactory proxyFactory )
{
Subscriptions = subscriptions;
Dispatcher = dispatcher;
ProxyFactory = proxyFactory;
}
示例15: MyNodeOverlapCallback
public MyNodeOverlapCallback(MultiSapBroadphase multiSap,MultiSapProxy multiProxy,IDispatcher dispatcher)
{
m_multiSap = multiSap;
m_multiProxy = multiProxy;
m_dispatcher = dispatcher;
}