public UnleashedClient(string apiId, string apiKey, string url = null) { _apiId = apiId; _apiKey = apiKey; _url = url ?? "https://api.unleashedsoftware.com/"; _executionService = new ClientExecutionService(this); _customers = new Lazy <CustomerResource>(() => new CustomerResource(_executionService), true); _products = new Lazy <ProductResource>(() => new ProductResource(_executionService), true); _salesOrders = new Lazy <SalesOrderResource>(() => new SalesOrderResource(_executionService), true); _salesInvoice = new Lazy <SalesInvoiceResource>(() => new SalesInvoiceResource(_executionService), true); _salesPerson = new Lazy <SalesPersonResource>(() => new SalesPersonResource(_executionService), true); _taxes = new Lazy <TaxResource>(() => new TaxResource(_executionService), true); _warehouses = new Lazy <WarehouseResource>(() => new WarehouseResource(_executionService), true); _unitOfMeasures = new Lazy <UnitOfMeasureResource>(() => new UnitOfMeasureResource(_executionService), true); _productGroups = new Lazy <ProductGroupResource>(() => new ProductGroupResource(_executionService), true); _suppliers = new Lazy <SupplierResource>(() => new SupplierResource(_executionService), true); _salesOrderGroups = new Lazy <SalesOrderGroupResource>(() => new SalesOrderGroupResource(_executionService), true); _customerTypes = new Lazy <CustomerTypeResource>(() => new CustomerTypeResource(_executionService), true); _salesShipments = new Lazy <SalesShipmentResource>(() => new SalesShipmentResource(_executionService), true); _shippingCompanies = new Lazy <ShippingCompanyResource>(() => new ShippingCompanyResource(_executionService), true); _billOfMaterials = new Lazy <BillOfMaterialResource>(() => new BillOfMaterialResource(_executionService), true); _purchaseOrders = new Lazy <PurchaseOrderResource>(() => new PurchaseOrderResource(_executionService), true); _stockAdjustments = new Lazy <StockAdjustmentResource>(() => new StockAdjustmentResource(_executionService), true); _deliveryMethods = new Lazy <DeliveryMethodResource>(() => new DeliveryMethodResource(_executionService), true); _paymentTerms = new Lazy <PaymentTermResource>(() => new PaymentTermResource(_executionService), true); _stockOnHand = new Lazy <StockOnHandResource>(() => new StockOnHandResource(_executionService), true); _warehouseStockTransfers = new Lazy <WarehouseStockTransferResource>(() => new WarehouseStockTransferResource(_executionService), true); }
public UnleashedClient(string apiId, string apiKey, string url = null) { _apiId = apiId; _apiKey = apiKey; _url = url ?? "https://api.unleashedsoftware.com/"; _executionService = new ClientExecutionService(this); _customers = new Lazy<CustomerResource>(() => new CustomerResource(_executionService), true); _products = new Lazy<ProductResource>(() => new ProductResource(_executionService), true); _salesOrders = new Lazy<SalesOrderResource>(() => new SalesOrderResource(_executionService), true); _salesInvoice = new Lazy<SalesInvoiceResource>(() => new SalesInvoiceResource(_executionService), true); _salesPerson = new Lazy<SalesPersonResource>(() => new SalesPersonResource(_executionService), true); _taxes = new Lazy<TaxResource>(() => new TaxResource(_executionService), true); _warehouses = new Lazy<WarehouseResource>(() => new WarehouseResource(_executionService), true); _unitOfMeasures = new Lazy<UnitOfMeasureResource>(() => new UnitOfMeasureResource(_executionService), true); _productGroups = new Lazy<ProductGroupResource>(() => new ProductGroupResource(_executionService), true); _suppliers = new Lazy<SupplierResource>(() => new SupplierResource(_executionService), true); _salesOrderGroups = new Lazy<SalesOrderGroupResource>(() => new SalesOrderGroupResource(_executionService), true); _customerTypes = new Lazy<CustomerTypeResource>(() => new CustomerTypeResource(_executionService), true); _salesShipments = new Lazy<SalesShipmentResource>(() => new SalesShipmentResource(_executionService), true); _shippingCompanies = new Lazy<ShippingCompanyResource>(() => new ShippingCompanyResource(_executionService), true); _billOfMaterials = new Lazy<BillOfMaterialResource>(() => new BillOfMaterialResource(_executionService), true); _purchaseOrders = new Lazy<PurchaseOrderResource>(() => new PurchaseOrderResource(_executionService), true); _stockAdjustments = new Lazy<StockAdjustmentResource>(() => new StockAdjustmentResource(_executionService), true); _deliveryMethods = new Lazy<DeliveryMethodResource>(() => new DeliveryMethodResource(_executionService), true); _paymentTerms = new Lazy<PaymentTermResource>(() => new PaymentTermResource(_executionService), true); _stockOnHand = new Lazy<StockOnHandResource>(() => new StockOnHandResource(_executionService), true); _warehouseStockTransfers = new Lazy<WarehouseStockTransferResource>(() => new WarehouseStockTransferResource(_executionService), true); }
internal ClientContext(ISerializationService serializationService, IClientClusterService clusterService, IClientPartitionService partitionService, IClientInvocationService invocationService, IClientExecutionService executionService, IClientListenerService listenerService, ProxyManager proxyManager, ClientConfig clientConfig) { this.serializationService = serializationService; this.clusterService = clusterService; this.partitionService = partitionService; this.invocationService = invocationService; this.executionService = executionService; this.listenerService = listenerService; this.proxyManager = proxyManager; this.clientConfig = clientConfig; }
internal ClientContext(ISerializationService serializationService, IClientClusterService clusterService, IClientPartitionService partitionService, IClientInvocationService invocationService, IClientExecutionService executionService, IClientListenerService listenerService, ProxyManager proxyManager, ClientConfig clientConfig) { _serializationService = serializationService; _clusterService = clusterService; _partitionService = partitionService; _invocationService = invocationService; _executionService = executionService; _listenerService = listenerService; _proxyManager = proxyManager; _clientConfig = clientConfig; }
private HazelcastClient(ClientConfig config) { this.config = config; var groupConfig = config.GetGroupConfig(); instanceName = "hz.client_" + id + (groupConfig != null ? "_" + groupConfig.GetName() : string.Empty); //threadGroup = new ThreadGroup(instanceName); lifecycleService = new LifecycleService(this); try { string partitioningStrategyClassName = null; //TODO make partition strategy parametric //Runtime.GetProperty(PropPartitioningStrategyClass); IPartitioningStrategy partitioningStrategy; if (partitioningStrategyClassName != null && partitioningStrategyClassName.Length > 0) { partitioningStrategy = null; } else { //new Instance for partitioningStrategyClassName; partitioningStrategy = new DefaultPartitioningStrategy(); } serializationService = new SerializationServiceBuilder().SetManagedContext(new HazelcastClientManagedContext(this, config.GetManagedContext())) .SetConfig(config.GetSerializationConfig()) .SetPartitioningStrategy(partitioningStrategy) .SetVersion(SerializationService.SerializerVersion) .Build(); } catch (Exception e) { throw ExceptionUtil.Rethrow(e); } proxyManager = new ProxyManager(this); //TODO EXECUTION SERVICE executionService = new ClientExecutionService(instanceName, config.GetExecutorPoolSize()); clusterService = new ClientClusterService(this); loadBalancer = config.GetLoadBalancer() ?? new RoundRobinLB(); connectionManager = new ClientConnectionManager(this, loadBalancer); invocationService = GetInvocationService(config); listenerService = new ClientListenerService(this); userContext = new ConcurrentDictionary <string, object>(); loadBalancer.Init(GetCluster(), config); proxyManager.Init(config); partitionService = new ClientPartitionService(this); }
public Servicem8Client(string apiUsername, string apiPassword, string url = null) { _apiPassword = apiPassword; _apiUsername = apiUsername; _url = url ?? "https://api.servicem8.com/api_1.0/"; _executionService = new ClientExecutionService(this); _companies = new Lazy <CompanyResource>(() => new CompanyResource(_executionService), true); _jobs = new Lazy <JobResource>(() => new JobResource(_executionService), true); _materials = new Lazy <MaterialResource>(() => new MaterialResource(_executionService), true); _jobMaterials = new Lazy <JobMaterialResource>(() => new JobMaterialResource(_executionService), true); _attachments = new Lazy <AttachmentResource>(() => new AttachmentResource(_executionService), true); _jobQueues = new Lazy <JobQueueResource>(() => new JobQueueResource(_executionService), true); _jobContacts = new Lazy <JobContactResource>(() => new JobContactResource(_executionService), true); _jobActivities = new Lazy <JobActivityResource>(() => new JobActivityResource(_executionService), true); _jobAllocations = new Lazy <JobAllocationResource>(() => new JobAllocationResource(_executionService), true); _staff = new Lazy <StaffResource>(() => new StaffResource(_executionService), true); }
private HazelcastClient(ClientConfig config) { _config = config; var groupConfig = config.GetGroupConfig(); _instanceName = "hz.client_" + _id + (groupConfig != null ? "_" + groupConfig.GetName() : string.Empty); _lifecycleService = new LifecycleService(this); try { //TODO make partition strategy parametric var partitioningStrategy = new DefaultPartitioningStrategy(); _serializationService = new SerializationServiceBuilder().SetManagedContext(new HazelcastClientManagedContext(this, config.GetManagedContext())) .SetConfig(config.GetSerializationConfig()) .SetPartitioningStrategy(partitioningStrategy) .SetVersion(SerializationService.SerializerVersion) .Build(); } catch (Exception e) { throw ExceptionUtil.Rethrow(e); } _proxyManager = new ProxyManager(this); //TODO EXECUTION SERVICE _executionService = new ClientExecutionService(_instanceName, config.GetExecutorPoolSize()); _clusterService = new ClientClusterService(this); _loadBalancer = config.GetLoadBalancer() ?? new RoundRobinLB(); _addressProvider = new AddressProvider(_config); _connectionManager = new ClientConnectionManager(this); _invocationService = CreateInvocationService(); _listenerService = new ClientListenerService(this); _userContext = new ConcurrentDictionary <string, object>(); _partitionService = new ClientPartitionService(this); _lockReferenceIdGenerator = new ClientLockReferenceIdGenerator(); _statistics = new Statistics(this); _nearCacheManager = new NearCacheManager(this); _credentialsFactory = InitCredentialsFactory(config); }
public StaffResource(IClientExecutionService client) : base(client) { }
public BillOfMaterialResource(IClientExecutionService client) : base(client) { }
public ShippingCompanyResource(IClientExecutionService client) : base(client) { }
public CustomerDeliveryAddressResource(IClientExecutionService client) : base(client) { }
public CustomerTypeResource(IClientExecutionService client) : base(client) { }
public DeliveryMethodResource(IClientExecutionService client) : base(client) { }
public JobActivityResource(IClientExecutionService client) : base(client) { }
public SalesShipmentResource(IClientExecutionService client) : base(client) { }
public SalesPersonResource(IClientExecutionService client) : base(client) { }
public StockOnHandResource(IClientExecutionService client) : base(client) { }
public PurchaseOrderResource(IClientExecutionService client) : base(client) { }
public WarehouseStockTransferResource(IClientExecutionService client) : base(client) { }
public AttachmentResource(IClientExecutionService client) : base(client) { }
public StockAdjustmentResource(IClientExecutionService client) : base(client) { }
public SupplierResource(IClientExecutionService client) : base(client) { }
public SalesInvoiceResource(IClientExecutionService settings) : base(settings) { }
public WarehouseResource(IClientExecutionService client) : base(client) { }
public ProductGroupResource(IClientExecutionService client) : base(client) { }
public JobAllocationResource(IClientExecutionService client) : base(client) { }
protected Resource(IClientExecutionService client) { Client = client; }
public SalesOrderResource(IClientExecutionService client) : base(client) { }
public PaymentTermResource(IClientExecutionService client) : base(client) { }
public UnitOfMeasureResource(IClientExecutionService client) : base(client) { }
public TaxResource(IClientExecutionService client) : base(client) { }
public JobContactResource(IClientExecutionService client) : base(client) { }
public JobQueueResource(IClientExecutionService client) : base(client) { }
public SalesOrderGroupResource(IClientExecutionService client) : base(client) { }