HttpServerConnectionCompression Property |
Property specifies the way of compression of AML sent through IOM.HttpServerConnection.
Value from enumeration 'CompressionType' (namespace Aras.Common.Compression) can be set. Available values are:
- gzip
data compression to the gzip format
- deflate
data compression to the deflate format
- none
Default value. Data sent through IOM.HttpServerConnection aren't compressed.
It is highly recommended to store type of compression you are using in configuration file of your application.
Example section of application configuration file:
<configuration>
<appSettings>
<add key="CompressionType" value="gzip"/>
</appSettings >
</configuration>
Examples of setting value of Compression property from application configuration file.
Examples...
HttpServerConnection connection = CreateHttpServerConnection("innovatorServerUrl");
connaction.Compression = GetCompressionTypeFromAppConfig();
...
private CompressionType GetCompressionTypeFromAppConfig()
{
string value = ConfigurationManager.AppSettings["CompressionType"];
if (String.IsNullOrEmpty(value))
{
return CompressionType.none;
}
else
{
return (CompressionType)Enum.Parse(typeof(CompressionType), value);
}
}
...
Dim connection As HttpServerConnection = IomFactory.CreateHttpServerConnection("connectionstring")
connection.Compression = GetCompressionTypeFromAppConfig()
...
Private Function GetCompressionTypeFromAppConfig() As CompressionType
Dim value As String = ConfigurationManager.AppSettings("CompressionType")
If (String.IsNullOrEmpty(value)) Then
Return CompressionType.none
Else
Return CType([Enum].Parse(GetType(CompressionType), value), CompressionType)
End If
End Function
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Namespace:
Aras.IOM
Assembly:
IOM (in IOM.dll) Version: 14.0.9.36244
Syntaxpublic CompressionType Compression { get; set; }
Public Property Compression As CompressionType
Get
Set
/** @property */
public CompressionType get_Compression()
/** @property */
public void set_Compression(CompressionType value)
function get Compression () : CompressionType
function set Compression (value : CompressionType)
Property Value
Type:
CompressionType
See Also