| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using SHJX.Service.ServerClient;
- using SHJX.Service.Model.Control;
- namespace SHJX.Service.Control.PortOperate.Interface
- {
- public abstract class StorageOperateImp
- {
- protected string OpName { get; set; }
- protected readonly OptClient Client;
- protected StorageOperateImp(OptClient client)
- {
- Client = client;
- }
- /// <summary>
- /// 启动
- /// </summary>
- public virtual bool Start(object reserve = null)
- {
- PortArgs Args = new()
- {
- WriteWay = WriteWay.Start,
- TypeName = OpName,
- Reserve= reserve
- };
- return Client.Factory(OpName).Write(Args);
- }
- /// <summary>
- /// 停止
- /// </summary>
- public virtual bool Stop(object reserve = null)
- {
- PortArgs Args = new()
- {
- WriteWay = WriteWay.Stop,
- TypeName = OpName,
- Reserve = reserve
- };
- return Client.Factory(OpName).Write(Args);
- }
- }
- }
|