/// <summary>
        /// Factory for creating <see cref="MessageQueueThreadSpec"/>s.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="kind">The kind.</param>
        /// <returns>The instance.</returns>
        public static MessageQueueThreadSpec Create(string name, MessageQueueThreadKind kind)
        {
            if (kind == MessageQueueThreadKind.DispatcherThread)
            {
                throw new NotSupportedException("Use the singleton MainUiThreadSpec instance.");
            }

            return(new MessageQueueThreadSpec(kind, name));
        }
        /// <summary>
        /// Factory for creating <see cref="MessageQueueThreadSpec"/>s.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="kind">The kind.</param>
        /// <returns>The instance.</returns>
        public static MessageQueueThreadSpec Create(string name, MessageQueueThreadKind kind)
        {
            if (kind == MessageQueueThreadKind.DispatcherThread)
            {
                throw new NotSupportedException(Invariant($"Use the singleton {nameof(DispatcherThreadSpec)} instance."));
            }

            return new MessageQueueThreadSpec(kind, name);
        }
        /// <summary>
        /// Factory for creating <see cref="MessageQueueThreadSpec"/>s.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="kind">The kind.</param>
        /// <returns>The instance.</returns>
        public static MessageQueueThreadSpec Create(string name, MessageQueueThreadKind kind)
        {
            if (kind == MessageQueueThreadKind.DispatcherThread)
            {
                throw new NotSupportedException(Invariant($"Use the singleton {nameof(DispatcherThreadSpec)} instance."));
            }

            return(new MessageQueueThreadSpec(kind, name));
        }
 private MessageQueueThreadSpec(MessageQueueThreadKind kind, string name)
 {
     Name = name;
     Kind = kind;
 }
 private MessageQueueThreadSpec(MessageQueueThreadKind kind, string name)
 {
     Name = name;
     Kind = kind;
 }