Class WebApiConnectorExtensions
Provides extension methods for instantiating WebAPI connector.
Inherited Members
Namespace: AXSharp.Connector
Assembly: AXSharp.Connector.S71500.WebAPI.dll
Syntax
public static class WebApiConnectorExtensions
Methods
| Edit this page View SourceCreateWebApi(ConnectorAdapterBuilder, string, string, string, bool, eTargetProjectPlatform, string, int, int)
Creates connector adapter for WebAPI communication.
Declaration
public static ConnectorAdapter CreateWebApi(this ConnectorAdapterBuilder adapter, string ipAddress, string userName, string password, bool ignoreSSLErros, eTargetProjectPlatform platform = eTargetProjectPlatform.SIMATICAX, string dbName = "\"TGlobalVariablesDB\"", int maxConcurrentRequest = 4, int concurrentRequestDelay = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| ConnectorAdapterBuilder | adapter | Adapter builder. |
| string | ipAddress | Target's IP address. |
| string | userName | User name. |
| string | password | Password. |
| bool | ignoreSSLErros | When true connection will ignore SSL errors. |
| eTargetProjectPlatform | platform | |
| string | dbName | Name of default DB. The DB used to store all data in an AX project is 'TGlobalVariablesDB'. |
| int | maxConcurrentRequest | Determines max concurrent R/W requests against the controller. |
| int | concurrentRequestDelay | Determines delay between concurrent requests. |
Returns
| Type | Description |
|---|---|
| ConnectorAdapter | Connector adapter for WebAPI connection. |
CreateWebApi(ConnectorAdapterBuilder, string, string, string, Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool>?, bool, eTargetProjectPlatform, string, int, int)
Creates connector adapter for WebAPI communication.
Declaration
public static ConnectorAdapter CreateWebApi(this ConnectorAdapterBuilder adapter, string ipAddress, string userName, string password, Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool>? customServerCertHandler, bool ignoreSslErrors = false, eTargetProjectPlatform platform = eTargetProjectPlatform.SIMATICAX, string dbName = "\"TGlobalVariablesDB\"", int maxConcurrentRequest = 4, int concurrentRequestDelay = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| ConnectorAdapterBuilder | adapter | Adapter builder. |
| string | ipAddress | Target's IP address. |
| string | userName | User name. |
| string | password | Password. |
| Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> | customServerCertHandler | Customized server certificate handler. |
| bool | ignoreSslErrors | When set to true ssl errors are ignored |
| eTargetProjectPlatform | platform | |
| string | dbName | Name of default DB. The DB used to store all data in an AX project is 'TGlobalVariablesDB'. |
| int | maxConcurrentRequest | Determines max concurrent R/W requests against the controller. |
| int | concurrentRequestDelay | Determines delay between concurrent requests. |
Returns
| Type | Description |
|---|---|
| ConnectorAdapter | Connector adapter for WebAPI connection. |
GetDateOnly(int)
Declaration
public static DateOnly GetDateOnly(this int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value |
Returns
| Type | Description |
|---|---|
| DateOnly |
GetDateOnly(long)
Declaration
public static DateOnly GetDateOnly(this long value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | value |
Returns
| Type | Description |
|---|---|
| DateOnly |
ToUtcDateTime(long)
Declaration
public static DateTime ToUtcDateTime(this long value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | value |
Returns
| Type | Description |
|---|---|
| DateTime |