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 不支持取消"); } } }