Пример #1
0
        public RemoveCommand(SeqConnectionFactory connectionFactory)
        {
            _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));

            _entityIdentity = Enable(new EntityIdentityFeature("workspace", "remove"));
            _entityOwner    = Enable(new EntityOwnerFeature("workspace", "remove", _entityIdentity));
            _connection     = Enable <ConnectionFeature>();
        }
Пример #2
0
 public ImportCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
 {
     if (config == null)
     {
         throw new ArgumentNullException(nameof(config));
     }
     _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));
     _fileInputFeature  = Enable(new FileInputFeature("File to import"));
     _entityOwner       = Enable(new EntityOwnerFeature("signal", "import"));
     _connection        = Enable <ConnectionFeature>();
 }
Пример #3
0
        public ListCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }
            _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));

            _entityIdentity = Enable(new EntityIdentityFeature("workspace", "list"));
            _entityOwner    = Enable(new EntityOwnerFeature("workspace", "list", _entityIdentity));
            _output         = Enable(new OutputFormatFeature(config.Output));
            _connection     = Enable <ConnectionFeature>();
        }
Пример #4
0
        public ImportCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }
            _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));

            Options.Add(
                "merge",
                "Update signals that have ids matching those in the imported data; the default is to always create new signals",
                _ => _merge = true);

            _fileInputFeature = Enable(new FileInputFeature("File to import"));
            _entityOwner      = Enable(new EntityOwnerFeature("signal", "import"));
            _connection       = Enable <ConnectionFeature>();
        }