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;
private string _printIPAddress;
///
/// 自动打印状态(线程安全)
///
public bool AutomaticPrint
{
get
{
lock (_lockObj) return _automaticPrint;
}
set
{
lock (_lockObj) _automaticPrint = value;
}
}
///
/// 自动打印的楼层
///
public string PrintIPAddress
{
get
{
lock (_lockObj) return _printIPAddress;
}
set
{
lock (_lockObj) _printIPAddress = value;
}
}
}
}