本文整理汇总了C#中IThreadManager类的典型用法代码示例。如果您正苦于以下问题:C# IThreadManager类的具体用法?C# IThreadManager怎么用?C# IThreadManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IThreadManager类属于命名空间,在下文中一共展示了IThreadManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DynamicHierarchy
/// <summary>
/// Constructs a new dynamic hierarchy broad phase.
/// </summary>
/// <param name="threadManager">Thread manager to use in the broad phase.</param>
public DynamicHierarchy(IThreadManager threadManager)
: base(threadManager)
{
multithreadedRefit = MultithreadedRefit;
multithreadedOverlap = MultithreadedOverlap;
QueryAccelerator = new DynamicHierarchyQueryAccelerator(this);
}
示例2: ContinuousPositionUpdater
///<summary>
/// Constructs the position updater.
///</summary>
///<param name="timeStepSettings">Time step settings to use.</param>
/// <param name="threadManager">Thread manager to use.</param>
public ContinuousPositionUpdater(TimeStepSettings timeStepSettings, IThreadManager threadManager)
: base(timeStepSettings, threadManager)
{
preUpdate = PreUpdate;
updateTimeOfImpact = UpdateTimeOfImpact;
updateContinuous = UpdateContinuousItem;
}
示例3: Space
///<summary>
/// Constructs a new space for things to live in.
///</summary>
///<param name="threadManager">Thread manager to use with the space.</param>
public Space(IThreadManager threadManager)
{
timeStepSettings = new TimeStepSettings();
this.threadManager = threadManager;
SpaceObjectBuffer = new SpaceObjectBuffer(this);
EntityStateWriteBuffer = new EntityStateWriteBuffer();
DeactivationManager = new DeactivationManager(TimeStepSettings, ThreadManager);
ForceUpdater = new ForceUpdater(TimeStepSettings, ThreadManager);
BoundingBoxUpdater = new BoundingBoxUpdater(TimeStepSettings, ThreadManager);
BroadPhase = new DynamicHierarchy(ThreadManager);
NarrowPhase = new NarrowPhase(TimeStepSettings, BroadPhase.Overlaps, ThreadManager);
Solver = new Solver(TimeStepSettings, DeactivationManager, ThreadManager);
NarrowPhase.Solver = Solver;
PositionUpdater = new ContinuousPositionUpdater(TimeStepSettings, ThreadManager);
BufferedStates = new BufferedStatesManager(ThreadManager);
DeferredEventDispatcher = new DeferredEventDispatcher();
DuringForcesUpdateables = new DuringForcesUpdateableManager(timeStepSettings, ThreadManager);
BeforeNarrowPhaseUpdateables = new BeforeNarrowPhaseUpdateableManager(timeStepSettings, ThreadManager);
BeforeSolverUpdateables = new BeforeSolverUpdateableManager(timeStepSettings, ThreadManager);
BeforePositionUpdateUpdateables = new BeforePositionUpdateUpdateableManager(timeStepSettings, ThreadManager);
EndOfTimeStepUpdateables = new EndOfTimeStepUpdateableManager(timeStepSettings, ThreadManager);
EndOfFrameUpdateables = new EndOfFrameUpdateableManager(timeStepSettings, ThreadManager);
}
示例4: Grid2DSortAndSweep
/// <summary>
/// Constructs a grid-based sort and sweep broad phase.
/// </summary>
/// <param name="threadManager">Thread manager to use for the broad phase.</param>
public Grid2DSortAndSweep(IThreadManager threadManager)
:base(threadManager)
{
updateEntry = UpdateEntry;
updateCell = UpdateCell;
QueryAccelerator = new Grid2DSortAndSweepQueryAccelerator(this);
}
示例5: BoundingBoxUpdater
///<summary>
/// Constructs the bounding box updater.
///</summary>
///<param name="timeStepSettings">Time step setttings to be used by the updater.</param>
/// <param name="threadManager">Thread manager to be used by the updater.</param>
public BoundingBoxUpdater(TimeStepSettings timeStepSettings, IThreadManager threadManager)
: this(timeStepSettings)
{
ThreadManager = threadManager;
AllowMultithreading = true;
}
示例6: Server
public Server(ILog log, Settings settings, IEndpointFactory endpointFactory, IThreadManager threadManager)
{
this.log = log;
this.settings = settings;
this.endpointFactory = endpointFactory;
this.threadManager = threadManager;
}
示例7: ToastPresenter
/// <summary>
/// Initializes a new instance of the <see cref="ToastPresenter"/> class.
/// </summary>
public ToastPresenter([NotNull] IThreadManager threadManager)
{
Should.NotBeNull(threadManager, "threadManager");
_threadManager = threadManager;
Background = Color.FromArgb(255, 105, 105, 105);
Foreground = Color.FromArgb(255, 247, 247, 247);
}
示例8: 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;
}
示例9: Endpoint
public Endpoint(ILog log, EndpointSettings settings, IFileSystem fileSystem, IListener listener, IHandlerFactory handlerFactory, IThreadManager threadManager)
{
this.log = log;
this.settings = settings;
this.fileSystem = fileSystem;
this.listener = listener;
this.handlerFactory = handlerFactory;
this.threadManager = threadManager;
}
示例10: Handler
public Handler(ILog log, EndpointSettings settings, ISessionStore sessionStore, IThreadManager threadManager, IContext context, IFileSystem fileSystem)
{
this.log = log;
this.settings = settings;
this.sessionStore = sessionStore;
this.threadManager = threadManager;
this.context = context;
this.fileSystem = fileSystem;
}
示例11: NavigationService
public NavigationService([NotNull] IThreadManager threadManager)
{
Should.NotBeNull(threadManager, "threadManager");
_threadManager = threadManager;
XamarinFormsExtensions.BackButtonPressed += ReflectionExtensions
.CreateWeakDelegate<NavigationService, CancelEventArgs, EventHandler<Page, CancelEventArgs>>(this,
(service, o, arg3) => service.OnBackButtonPressed((Page)o, arg3),
(o, handler) => XamarinFormsExtensions.BackButtonPressed -= handler, handler => handler.Handle);
UseAnimations = true;
}
示例12: ViewManager
public ViewManager([NotNull] IThreadManager threadManager,
[NotNull] IViewMappingProvider viewMappingProvider, [NotNull] IWrapperManager wrapperManager)
{
Should.NotBeNull(threadManager, "threadManager");
Should.NotBeNull(viewMappingProvider, "viewMappingProvider");
Should.NotBeNull(viewMappingProvider, "wrapperManager");
_threadManager = threadManager;
_viewMappingProvider = viewMappingProvider;
_wrapperManager = wrapperManager;
}
示例13: SetThreadManager
public override void SetThreadManager(IThreadManager paramThreadManager)
{
// base.SetThreadManager first.
base.SetThreadManager(paramThreadManager);
// Now spin up callback thread
List<Object> threadList = new List<Object>();
threadList.Add(new KeyValuePair<String, Delegate>(CallbackThreadActionStrings.customAction1String, new VoidObjectDelegate(this.ExecuteCustomAction1)));
threadList.Add(new KeyValuePair<String, Delegate>(CallbackThreadActionStrings.fullScreenString, new VoidVoidDelegate(this.ToggleFullScreen)));
threadManager.StartCallbackThread(threadList);
}
示例14: PoliteWebCrawler
public PoliteWebCrawler(
CrawlConfiguration crawlConfiguration,
ICrawlDecisionMaker crawlDecisionMaker,
IThreadManager threadManager,
IScheduler scheduler,
IPageRequester pageRequester,
IHyperLinkParser hyperLinkParser,
IMemoryManager memoryManager,
IDomainRateLimiter domainRateLimiter,
IRobotsDotTextFinder robotsDotTextFinder)
: base(crawlConfiguration, crawlDecisionMaker, threadManager, scheduler, pageRequester, hyperLinkParser, memoryManager)
{
_domainRateLimiter = domainRateLimiter ?? new DomainRateLimiter(_crawlContext.CrawlConfiguration.MinCrawlDelayPerDomainMilliSeconds);
_robotsDotTextFinder = robotsDotTextFinder ?? new RobotsDotTextFinder(new PageRequester(_crawlContext.CrawlConfiguration));
}
示例15: CustomFluidVolume
/// <summary>
/// Creates a fluid volume.
/// </summary>
/// <param name="upVector">Up vector of the fluid volume.</param>
/// <param name="gravity">Strength of gravity for the purposes of the fluid volume.</param>
/// <param name="surfaceTriangles">List of triangles composing the surface of the fluid. Set up as a list of length 3 arrays of Vector3's.</param>
/// <param name="depth">Depth of the fluid back along the surface normal.</param>
/// <param name="fluidDensity">Density of the fluid represented in the volume.</param>
/// <param name="linearDamping">Fraction by which to reduce the linear momentum of floating objects each update, in addition to any of the body's own damping.</param>
/// <param name="angularDamping">Fraction by which to reduce the angular momentum of floating objects each update, in addition to any of the body's own damping.</param>
/// <param name="queryAccelerator">System to accelerate queries to find nearby entities.</param>
/// <param name="threadManager">Thread manager used by the fluid volume.</param>
public CustomFluidVolume(Vector3 upVector, float gravity, List<Vector3[]> surfaceTriangles, float depth, float fluidDensity, float linearDamping, float angularDamping,
IQueryAccelerator queryAccelerator, IThreadManager threadManager)
{
Gravity = gravity;
SurfaceTriangles = surfaceTriangles;
MaxDepth = depth;
Density = fluidDensity;
LinearDamping = linearDamping;
AngularDamping = angularDamping;
UpVector = upVector;
QueryAccelerator = queryAccelerator;
ThreadManager = threadManager;
analyzeCollisionEntryDelegate = AnalyzeCollisionEntry;
}