Class ArasHttpConnection
The main implementation of a connection to an Aras instance over HTTP
Inheritance
Inherited Members
Namespace: Innovator.Client.Connection
Assembly: Innovator.Client.dll
Syntax
public class ArasHttpConnection : IRemoteConnection, IDisposable, IArasConnection, IAsyncConnection, IConnection
Constructors
| Improve this Doc View SourceArasHttpConnection(HttpClient, String, IItemFactory)
Initializes a new instance of the ArasHttpConnection class.
Declaration
public ArasHttpConnection(HttpClient service, string innovatorServerUrl, IItemFactory itemFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpClient | service | The service. |
System.String | innovatorServerUrl | The innovator server URL. |
IItemFactory | itemFactory | The item factory. |
Properties
| Improve this Doc View SourceAmlContext
AML context used for creating AML objects and formatting AML statements
Declaration
public ElementFactory AmlContext { get; }
Property Value
Type | Description |
---|---|
ElementFactory |
Implements
| Improve this Doc View SourceCompression
Gets the compression setting to use when sending requests to the server.
Declaration
public CompressionType Compression { get; set; }
Property Value
Type | Description |
---|---|
CompressionType | The compression setting to use when sending requests to the server. |
Implements
| Improve this Doc View SourceDatabase
Name of the connected database
Declaration
public string Database { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
| Improve this Doc View SourceServerInfo
Gets the server information returned when logging in.
Declaration
public IEnumerable<KeyValuePair<string, string>> ServerInfo { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>> | The server information. |
Url
URL that the instance resides at
Declaration
public Uri Url { get; }
Property Value
Type | Description |
---|---|
System.Uri |
Implements
| Improve this Doc View SourceUserId
ID of the authenticated user
Declaration
public string UserId { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
| Improve this Doc View SourceVersion
Gets the major version of the Aras installation
Declaration
public int Version { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The major version of the Aras installation. |
Implements
Methods
| Improve this Doc View SourceClone(Boolean)
Gets a new connection logged in with the same credentials
Declaration
public IPromise<IRemoteConnection> Clone(bool async)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | async | Whether to perform this action asynchronously |
Returns
Type | Description |
---|---|
IPromise<IRemoteConnection> | A promise to return a new connection |
Implements
| Improve this Doc View SourceCreateUploadCommand()
Creates an upload request used for uploading files to the server
Declaration
public UploadCommand CreateUploadCommand()
Returns
Type | Description |
---|---|
UploadCommand | A new upload request used for uploading files to the server |
Implements
| Improve this Doc View SourceDefaultSettings(Action<IHttpRequest>)
Use a method to configure each outgoing HTTP request
Declaration
public void DefaultSettings(Action<IHttpRequest> settings)
Parameters
Type | Name | Description |
---|---|---|
System.Action<IHttpRequest> | settings | Action used to configure the request |
Implements
| Improve this Doc View SourceDispose()
Causes the connection to logout.
Declaration
public void Dispose()
Implements
Equals(ArasHttpConnection)
Determines whether the specified ArasHttpConnection, is equal to this instance.
Declaration
public bool Equals(ArasHttpConnection conn)
Parameters
Type | Name | Description |
---|---|---|
ArasHttpConnection | conn | The ArasHttpConnection to compare with this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Determines whether the specified System.Object, is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
GetDatabases()
Returns a set of databases which can be connected to using this URL
Declaration
public IEnumerable<string> GetDatabases()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | A set of databases which can be connected to using this URL |
Implements
| Improve this Doc View SourceGetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Login(ICredentials)
Log in to the database
Declaration
public void Login(ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
ICredentials | credentials | Credentials used for authenticating to the instance |
Implements
| Improve this Doc View SourceLogin(ICredentials, Boolean)
Log in to the database asynchronosuly
Declaration
public IPromise<string> Login(ICredentials credentials, bool async)
Parameters
Type | Name | Description |
---|---|---|
ICredentials | credentials | Credentials used for authenticating to the instance |
System.Boolean | async | Whether to perform this action asynchronously |
Returns
Type | Description |
---|---|
IPromise<System.String> | A promise to return the user ID as a string |
Implements
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | This connection implementation does not support the specified credential type |
Logout(Boolean)
Log out of the database
Declaration
public void Logout(bool unlockOnLogout)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | unlockOnLogout | Whether to unlock locked items while logging out |
Implements
| Improve this Doc View SourceLogout(Boolean, Boolean)
Log out of the database
Declaration
public void Logout(bool unlockOnLogout, bool async)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | unlockOnLogout | Whether to unlock locked items while logging out |
System.Boolean | async | Whether to perform this action asynchronously |
Implements
| Improve this Doc View SourceMapClientUrl(String)
Expands a relative URL to a full URL
Declaration
public string MapClientUrl(string relativeUrl)
Parameters
Type | Name | Description |
---|---|---|
System.String | relativeUrl | The relative URL |
Returns
Type | Description |
---|---|
System.String | A full URL relative to the connection |
Implements
| Improve this Doc View SourceProcess(Command)
Process a command by crafting the appropriate HTTP request and returning the HTTP response stream
Declaration
public Stream Process(Command request)
Parameters
Type | Name | Description |
---|---|---|
Command | request |
Returns
Type | Description |
---|---|
System.IO.Stream |
Implements
| Improve this Doc View SourceProcess(Command, Boolean)
Process a command asynchronously by crafting the appropriate HTTP request and returning the HTTP response stream
Declaration
public IPromise<Stream> Process(Command request, bool async)
Parameters
Type | Name | Description |
---|---|---|
Command | request | The query to execute |
System.Boolean | async | Whether the query should be executed asynchronously |
Returns
Type | Description |
---|---|
IPromise<System.IO.Stream> |
Implements
| Improve this Doc View SourceSetVaultStrategy(IVaultStrategy)
Sets the vault strategy.
Declaration
public void SetVaultStrategy(IVaultStrategy strategy)
Parameters
Type | Name | Description |
---|---|---|
IVaultStrategy | strategy | The strategy. |
Explicit Interface Implementations
| Improve this Doc View SourceIArasConnection.DefaultSettings
Declaration
List<Action<IHttpRequest>> IArasConnection.DefaultSettings { get; }
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Action<IHttpRequest>> |
Implements
| Improve this Doc View SourceIArasConnection.SetDefaultHeaders(Action<String, String>)
Declaration
void IArasConnection.SetDefaultHeaders(Action<string, string> writer)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String, System.String> | writer |