IErpServices Interface
Provides the interface for working with a collection of ERP Services.
Namespace: powerGate.Erp.Client
Assembly: powerGate.Erp.Client.dll
Syntax
1 | public interface IErpServices : IEnumerable<IErpService> |
Properties
Type |
Name |
Description |
---|---|---|
Item[Uri url] |
Gets the service with the specified Uri. |
|
Item[string url] |
Gets the service with the specified url as string. |
Methods
Type |
Name |
Description |
---|---|---|
IEnumerable <IErpService> |
Find(string serviceName) |
Searches for services having the specified serviceName. |
IEnumerator <IErpService> |
GetEnumerator() |
Returns an enumerator that iterates through the collection.(Inherited from IEnumerable<T>). |
Remarks
The Item[] property and Find() function are supporting to pass only parts of the service Url (e.g. MaterialService instead of http://localhost:8080/PGS/ERP/MaterialService).)
Examples
In the following examples we are using public OData Services (http://services.odata.org) for demonstration purposes.
Get service by url
1 2 3 | //ErpClient already connected to Odata services var service = erpclient.Services[new Uri("http://services.odata.org/V4/Northwind/Northwind.svc")] Console.Write("Service: {0}", service.Name); |
Find service by name
1 2 3 4 | //ErpClient already connected to powerGateServer Catalogservice var services = erpclient.Services.Find("MaterialService"); foreach (IErpService service in services) Console.Write("Service: {0}", service.Name); |
See also
Reference