CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
synchronization_context.h
1
2#pragma once
3#include <system/object.h>
4
5namespace System { namespace Threading {
6
12class ASPOSECPP_SHARED_CLASS SynchronizationContext : public Object
13{
15 RTTI_INFO(System::Threading::SynchronizationContext, ::System::BaseTypesInfo<System::Object>);
16
17public:
21 ASPOSECPP_SHARED_API SynchronizationContext();
22
26 static ASPOSECPP_SHARED_API const SharedPtr<SynchronizationContext>& get_Current();
27
31 static ASPOSECPP_SHARED_API void SetSynchronizationContext(const SharedPtr<SynchronizationContext>& syncContext);
32
33private:
36 static thread_local SharedPtr<SynchronizationContext> m_current;
37};
38
39}} // System::Threading
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Provides the basic functionality for propagating a synchronization context across various synchroniza...
Definition: synchronization_context.h:13
static const SharedPtr< SynchronizationContext > & get_Current()
Gets the synchronization context for the current thread.
SynchronizationContext()
Constructs a new instance of SynchronizationContext.
static void SetSynchronizationContext(const SharedPtr< SynchronizationContext > &syncContext)
Sets the synchronization context for the current thread.
Definition: db_command.h:9