Show / Hide Table of Contents

Class ArasHttpConnection

The main implementation of a connection to an Aras instance over HTTP

Inheritance
System.Object
ArasHttpConnection
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Innovator.Client.Connection
Assembly: Innovator.Client.dll
Syntax
public class ArasHttpConnection : IRemoteConnection, IDisposable, IArasConnection, IAsyncConnection, IConnection

Constructors

| Improve this Doc View Source

ArasHttpConnection(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 Source

AmlContext

AML context used for creating AML objects and formatting AML statements

Declaration
public ElementFactory AmlContext { get; }
Property Value
Type Description
ElementFactory
Implements
IConnection.AmlContext
| Improve this Doc View Source

Compression

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
IArasConnection.Compression
| Improve this Doc View Source

Database

Name of the connected database

Declaration
public string Database { get; }
Property Value
Type Description
System.String
Implements
IConnection.Database
| Improve this Doc View Source

ServerInfo

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.

| Improve this Doc View Source

Url

URL that the instance resides at

Declaration
public Uri Url { get; }
Property Value
Type Description
System.Uri
Implements
IRemoteConnection.Url
| Improve this Doc View Source

UserId

ID of the authenticated user

Declaration
public string UserId { get; }
Property Value
Type Description
System.String
Implements
IConnection.UserId
| Improve this Doc View Source

Version

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
IArasConnection.Version

Methods

| Improve this Doc View Source

Clone(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
IRemoteConnection.Clone(Boolean)
| Improve this Doc View Source

CreateUploadCommand()

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
IConnection.CreateUploadCommand()
| Improve this Doc View Source

DefaultSettings(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
IRemoteConnection.DefaultSettings(Action<IHttpRequest>)
| Improve this Doc View Source

Dispose()

Causes the connection to logout.

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()
| Improve this Doc View Source

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

true if the specified ArasHttpConnection is equal to this instance (same URL, database, and user ID); otherwise, false.

| Improve this Doc View Source

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

true if the specified System.Object is equal to this instance; otherwise, false.

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

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
IRemoteConnection.GetDatabases()
| Improve this Doc View Source

GetHashCode()

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
System.Object.GetHashCode()
| Improve this Doc View Source

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
IRemoteConnection.Login(ICredentials)
| Improve this Doc View Source

Login(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
IRemoteConnection.Login(ICredentials, Boolean)
Exceptions
Type Condition
System.NotSupportedException

This connection implementation does not support the specified credential type

| Improve this Doc View Source

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
IRemoteConnection.Logout(Boolean)
| Improve this Doc View Source

Logout(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
IRemoteConnection.Logout(Boolean, Boolean)
| Improve this Doc View Source

MapClientUrl(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
IConnection.MapClientUrl(String)
| Improve this Doc View Source

Process(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
IConnection.Process(Command)
| Improve this Doc View Source

Process(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
IAsyncConnection.Process(Command, Boolean)
| Improve this Doc View Source

SetVaultStrategy(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 Source

IArasConnection.DefaultSettings

Declaration
List<Action<IHttpRequest>> IArasConnection.DefaultSettings { get; }
Returns
Type Description
System.Collections.Generic.List<System.Action<IHttpRequest>>
Implements
IArasConnection.DefaultSettings
| Improve this Doc View Source

IArasConnection.SetDefaultHeaders(Action<String, String>)

Declaration
void IArasConnection.SetDefaultHeaders(Action<string, string> writer)
Parameters
Type Name Description
System.Action<System.String, System.String> writer
Implements
IArasConnection.SetDefaultHeaders(Action<String, String>)

Extension Methods

ConnectionExtensions.Apply(IConnection, Command, Object[])
ConnectionExtensions.ApplyAsync(IAsyncConnection, Command, Boolean, Boolean, Object[])
ConnectionExtensions.ApplyAsync(IAsyncConnection, Command, CancellationToken, Object[])
ConnectionExtensions.ApplySql(IConnection, Command, Object[])
ConnectionExtensions.ApplySql(IAsyncConnection, Command, Boolean)
ConnectionExtensions.ApplySql(IAsyncConnection, Command, CancellationToken)
ConnectionExtensions.ItemById(IConnection, String, String)
ConnectionExtensions.ItemById<T>(IConnection, String, String, Func<IReadOnlyItem, T>)
ConnectionExtensions.ItemByKeyedName(IConnection, String, String)
ConnectionExtensions.ItemByQuery(IConnection, Command)
ConnectionExtensions.ItemByQuery(IConnection, Command, Boolean)
ConnectionExtensions.Lock(IConnection, String, String)
ConnectionExtensions.NextSequence(IConnection, String)
ConnectionExtensions.Promote(IConnection, String, String, String, String)
ConnectionExtensions.Unlock(IConnection, String, String)

See Also

IRemoteConnection
IArasConnection
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX