public void Handle(ObjectConvertedEvent eventToHandle)
        {
            var objectName  = _displayNameProvider.DisplayNameFor(eventToHandle.ConvertedObject);
            var objectType  = _context.TypeFor(eventToHandle.ConvertedObject);
            var fromVersion = eventToHandle.FromVersion;

            var command = new OSPSuiteInfoCommand
            {
                ObjectType  = _context.TypeFor(eventToHandle.ConvertedObject),
                Description = AppConstants.Commands.ObjectConvertedCommand(objectName, objectType, fromVersion.VersionDisplay, _applicationConfiguration.Version),
            };

            command.Run(_context);
            _context.AddToHistory(command);
        }
Esempio n. 2
0
 private void executeCommandAndAddToWorkspace(OSPSuiteInfoCommand command)
 {
     command.Run(_executionContext);
     _workspace.AddCommand(command);
 }