TellmePdmsPluging/Commands/ExportIfcCommand.cs

40 lines
917 B
C#

using TellmePdmsPluging.Core;
using TellmePdmsPluging.Models;
namespace TellmePdmsPluging.Commands
{
public class ExportIfcCommand : ICommand
{
public ExportIfcCommand(ExportIfcRequest request)
{
Request = request ?? new ExportIfcRequest();
CommandId = System.Guid.NewGuid().ToString("N");
}
public string CommandId { get; }
public string CommandType
{
get { return "ExportIfc"; }
}
public bool CanCancel
{
get { return false; }
}
public ExportIfcRequest Request { get; }
public object Execute()
{
Request.ApplyDefaults();
return PdmsManager.Instance.ExportIfc(Request);
}
public void Cancel()
{
throw new System.NotSupportedException("ExportIfcCommand 不支持取消");
}
}
}