コード例 #1
0
        /// <summary>
        /// Sets all required threading properties based on the given target thread.
        /// The name of the messenger is directly taken from the given ObjectThread.
        /// </summary>
        /// <param name="targetThread">The thread on which this Messanger should work on.</param>
        public void ApplyForGlobalSynchronization(ObjectThread targetThread)
        {
            targetThread.EnsureNotNull(nameof(targetThread));

            ApplyForGlobalSynchronization(
                SeeingSharpMessageThreadingBehavior.EnsureMainSyncContextOnSyncCalls,
                targetThread.Name,
                targetThread.SyncContext);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ObjectThreadSynchronizationContext"/> class.
 /// </summary>
 /// <param name="owner">The owner of this context.</param>
 public ObjectThreadSynchronizationContext(ObjectThread owner)
 {
     _owner = owner;
 }