using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace WIDESEA_StorageTaskServices
|
{
|
public class PrintStatusContainer
|
{
|
// 线程安全锁(多线程访问必备)
|
private readonly object _lockObj = new object();
|
private bool _automaticPrint;
|
|
/// <summary>
|
/// 自动打印状态(线程安全)
|
/// </summary>
|
public bool AutomaticPrint
|
{
|
get
|
{
|
lock (_lockObj) return _automaticPrint;
|
}
|
set
|
{
|
lock (_lockObj) _automaticPrint = value;
|
}
|
}
|
}
|
}
|