Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
41 lines
949 B
C#
41 lines
949 B
C#
using System;
|
|
using TellmePdmsPluging.Core;
|
|
using TellmePdmsPluging.Models;
|
|
|
|
namespace TellmePdmsPluging.Commands
|
|
{
|
|
public class SimplifyModelCommand : ICommand
|
|
{
|
|
public SimplifyModelCommand(SimplifyModelRequest request)
|
|
{
|
|
Request = request ?? new SimplifyModelRequest();
|
|
CommandId = Guid.NewGuid().ToString("N");
|
|
}
|
|
|
|
public string CommandId { get; }
|
|
|
|
public string CommandType
|
|
{
|
|
get { return "SimplifyModel"; }
|
|
}
|
|
|
|
public bool CanCancel
|
|
{
|
|
get { return false; }
|
|
}
|
|
|
|
public SimplifyModelRequest Request { get; }
|
|
|
|
public object Execute()
|
|
{
|
|
Request.ApplyDefaults();
|
|
return PdmsManager.Instance.SimplifyModel(Request);
|
|
}
|
|
|
|
public void Cancel()
|
|
{
|
|
throw new NotSupportedException("SimplifyModelCommand 不支持取消");
|
|
}
|
|
}
|
|
}
|