コード例 #1
0
 public EditorPageViewModel(ILogger <EditorPageViewModel> logger, IImageFilterService imageFilterService, INavigationService navigationService, IInOutService ioService)
 {
     this.logger             = logger;
     this.imageFilterService = imageFilterService;
     GaussFilterParams       = new GaussFilterParams()
     {
         Mid      = 0.2f,
         MidTop   = 0.2f,
         LeftMid  = 0.2f,
         RightMid = 0.2f,
         MidBot   = 0.2f
     };
     BinarizationFilterParams = new BinarizationFilterParams()
     {
         RedParameter        = 0.3f,
         GreenParameter      = 0.6f,
         BlueParameter       = 0.11f,
         PrecisionParameter  = 6,
         AdjustmentParameter = 0.15f
     };
     CurrentFilters = new ObservableCollection <FilterParamsBase>();
     InitializeCommands();
     NavigationService = navigationService;
     this.ioService    = ioService;
 }
コード例 #2
0
 public GalleryPageViewModel(ILogger <GalleryPageViewModel> logger, INavigationService navigationService, IInOutService inOutService, IPhotoViewModelFactory photoViewModelFactory, INotificationService notificationService)
 {
     this.logger                = logger;
     this.navigationService     = navigationService;
     this.inOutService          = inOutService;
     this.photoViewModelFactory = photoViewModelFactory;
     this.notificationService   = notificationService;
     Photos = new ObservableCollection <PhotoViewModel>();
     InitializeCommands();
 }
コード例 #3
0
        public ListCompaniesCommand(
            CompanyService service,
            IInOutService utilities,
            ILogger <ListCompaniesCommand> logger) :
            base("list", "Lists all known Companies in your Blue10 environment")
        {
            _service   = service;
            _utilities = utilities;
            _logger    = logger;

            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, "A query used to filter out results. NOTE: Dependant on output format. If output is 'json', this is a JMESPath query to filter results. https://jmespath.org/. If output is 'xml', this is an XPATH string. https://www.w3schools.com/xml/xpath_intro.asp"));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, "Enter path to write output of this command to file. Default output is console only"));
            Handler = CommandHandler.Create <string, EFormatType, FileInfo?>(ListCompaniesHandler);
        }
コード例 #4
0
        public PeekInvoiceCommand(
            InvoiceService service,
            IInOutService utilities,
            ILogger <PeekInvoiceCommand> logger) :
            base("peek", "Peek invoices to be posted")
        {
            _service   = service;
            _utilities = utilities;
            _logger    = logger;

            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, "A query used to filter out results. NOTE: Dependant on output format. If output is 'json', this is a JMESPath query to filter results. https://jmespath.org/. If output is 'xml', this is an XPATH string. https://www.w3schools.com/xml/xpath_intro.asp"));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, "Enter path to write output of this command to file. Default output is console only"));

            Handler = CommandHandler.Create <string?, EFormatType, FileInfo?>(PeekInvoiceHandler);
        }
コード例 #5
0
        public PullInvoicesCommand(
            InvoiceService service,
            IInOutService utilities,
            ILogger <PullInvoicesCommand> logger) :
            base("pull", "Pull all invoices to be posted")
        {
            _service   = service;
            _utilities = utilities;
            _logger    = logger;

            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, "A query used to filter out results. NOTE: Dependant on output format. If output is 'json', this is a JMESPath query to filter results. https://jmespath.org/. If output is 'xml', this is an XPATH string. https://www.w3schools.com/xml/xpath_intro.asp"));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <DirectoryInfo>(new[] { "-o", "--output" }, () => new DirectoryInfo(DEFAULT_DIRECTORY), "Enter path to write output of this command to the filesystem. Default output will create an 'invoices' directory in the root of the console"));

            Handler = CommandHandler.Create <string?, EFormatType, DirectoryInfo?>(PullInvoiceHandler);
        }
コード例 #6
0
        public CheckCredentialsCommand(
            ICredentialsService credentialService,
            IBlue10AsyncClient blue10,
            IInOutService utilities,
            ILogger <CheckCredentialsCommand> logger) :
            base("check", "checks if you can connect to blue10 ")
        {
            _credentialService = credentialService;
            _blue10            = blue10;
            _utilities         = utilities;
            _logger            = logger;

            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, "A query used to filter out results. NOTE: Dependant on output format. If output is 'json', this is a JMESPath query to filter results. https://jmespath.org/. If output is 'xml', this is an XPATH string. https://www.w3schools.com/xml/xpath_intro.asp"));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, "Enter path to write output of this command to file. Default output is console only"));

            Handler = CommandHandler.Create <string, EFormatType, FileInfo?>(CheckConnection);
        }
コード例 #7
0
        public CreateVendorCommand(
            IVendorService vendorService,
            IInOutService utilities,
            ILogger <CreateVendorCommand> logger) :
            base("create", "Creates new vendor in the system")
        {
            _vendorService = vendorService;
            _utilities     = utilities;
            _logger        = logger;

            Add(new Option <string>(new[] { "-c", "--company-id" }, "The company identifyer under which this vendor will be created")
            {
                IsRequired = true
            });
            Add(new Option <string>(new[] { "-a", "--administration-code" }, "Unique identifyer of Vendor used in ERP")
            {
                IsRequired = true
            });
            Add(new Option <string>("--country", "ISO 3166 two-letter country code of the Vendor's host country")
            {
                IsRequired = true
            });
            Add(new Option <string>("--currency", "ISO 4217 three-letter currency code to set default currency for vendor")
            {
                IsRequired = true
            });
            Add(new Option <string[]>("--iban", "list of IBANs associated with this vendor")
            {
                IsRequired = true
            });

            Add(new Option <string?>(new[] { "-n", "--name" }, "Name of the vendor. Default value will be the administration-code"));

            Add(new Option <string>(new[] { "-l", "--ledger" }, () => string.Empty, "Documents from this vendor will be routed to this ledger, leave empty to not associate"));
            Add(new Option <string>(new[] { "-p", "--payment" }, () => string.Empty, "Documents from this vendor will be associated with this payment term, leave empty to not associate"));
            Add(new Option <string>(new[] { "-v", "--vat" }, () => string.Empty, "Documents from this vendor will be associated with this VAT code, leave empty to not associate"));

            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, "Enter path to write output of this command to file. Default output is console only"));

            Handler = CommandHandler.Create <CreateVendorInput>(CreateVendorHandler);
        }
コード例 #8
0
        public SyncVatCodesCommand(IVatCodeService vatCodeService, IInOutService utilities, ILogger <SyncVatCodesCommand> logger) : base("sync",
                                                                                                                                         Descriptions.SyncVatCodeDescription)
        {
            _vatCodeService = vatCodeService;
            _utilities      = utilities;
            _logger         = logger;

            Add(new Option <FileInfo?>(new[] { "-i", "--input" }, () => null, Descriptions.InputVatCodeDescription)
            {
                IsRequired = true
            });
            Add(new Option <EFormatType>(new[] { "--input-format" }, () => EFormatType.JSON, Descriptions.InputFormatDescription)
            {
                IsRequired = true
            });
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, Descriptions.OutputDescription));
            Add(new Option <EFormatType>(new[] { "-f", "--format", "--output-format" }, () => EFormatType.JSON, Descriptions.FormatDescription));

            Handler = CommandHandler.Create <FileInfo, EFormatType, FileInfo?, EFormatType>(ImportVatCodesHandler);
        }
コード例 #9
0
        public ListVendorsCommand(
            IVendorService vendorService,
            IInOutService utilities,
            ILogger <ListVendorsCommand> logger) :
            base("list", "Lists all known vendors in environment")
        {
            _vendorService = vendorService;
            _utilities     = utilities;
            _logger        = logger;

            Add(new Option <string?>(new[] { "-c", "--company-id" }, () => null, "The company identifier under which the vendor exists")
            {
                IsRequired = true
            });
            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, "A query used to filter out results. NOTE: Dependant on output format. If output is 'json', this is a JMESPath query to filter results. https://jmespath.org/. If output is 'xml', this is an XPATH string. https://www.w3schools.com/xml/xpath_intro.asp"));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, "Enter path to write output of this command to file. Default output is console only"));

            Handler = CommandHandler.Create <string, string, EFormatType, FileInfo?>(ListVendorsHandler);
        }
コード例 #10
0
        public ListGLAccountsCommand(
            IGLAccountService glaccountService,
            IInOutService utilities,
            ILogger <ListGLAccountsCommand> logger) :
            base("list", "Lists all known GLAccounts in a company")
        {
            _glaccountService = glaccountService;
            _utilities        = utilities;
            _logger           = logger;

            Add(new Option <string?>(new[] { "-c", "--company-id" }, () => null, "The company identifier under which the GLAccounts exists")
            {
                IsRequired = true
            });
            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, Descriptions.QueryDescription));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, Descriptions.FormatDescription));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, Descriptions.OutputDescription));

            Handler = CommandHandler.Create <string, string, EFormatType, FileInfo?>(ListGLAccountsHandler);
        }
コード例 #11
0
        public SignInvoiceCommand(
            InvoiceService service,
            IInOutService utilities,
            ILogger <PullInvoicesCommand> logger) :
            base("sign", "Sign-off invoice with a ledger entry number")
        {
            _service   = service;
            _utilities = utilities;
            _logger    = logger;

            Add(new Option <Guid>(new[] { "-i", "--invoice-id" }, "The Id of the invoice to be signed off")
            {
                IsRequired = true
            });
            Add(new Option <string>(new[] { "-c", "--ledger-entry-code" }, "The ledger entry code assigned to the invoice by the ERP system")
            {
                IsRequired = true
            });
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, "Output format."));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, "Enter path to write output of this command to file. Default output is console only"));

            Handler = CommandHandler.Create <Guid, string, EFormatType, FileInfo?>(SignInvoiceHandler);
        }
コード例 #12
0
 public FactorySong(IInOutService inOutService)
 {
     _inOutService = inOutService;
 }
コード例 #13
0
 public PhotoViewModelFactory(ILogger <PhotoViewModelFactory> logger, IInOutService inOutService)
 {
     this.logger       = logger;
     this.inOutService = inOutService;
 }