Show / Hide Table of Contents

Interface IServerContext

Context for serializing/deserializing native types (e.g. DateTime, double, boolean, etc.)

Inherited Members
System.IFormatProvider.GetFormat(System.Type)
System.ICustomFormatter.Format(System.String, System.Object, System.IFormatProvider)
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public interface IServerContext : IFormatProvider, ICustomFormatter

Properties

| Improve this Doc View Source

DefaultLanguageCode

Gets the default language code configured for the Aras user

Declaration
string DefaultLanguageCode { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

DefaultLanguageSuffix

Gets the default language suffix configured for the Aras user

Declaration
string DefaultLanguageSuffix { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LanguageCode

Gets the language code configured for the Aras user

Declaration
string LanguageCode { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LanguageSuffix

Gets the language suffix configured for the Aras user

Declaration
string LanguageSuffix { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Locale

Gets the locale configured for the user.

Declaration
string Locale { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

TimeZone

Gets the corporate time zone ID for the Aras installation

Declaration
string TimeZone { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

AsBoolean(Object)

Converts the System.Object to a System.Boolean based on the locale and time zone

Declaration
bool ? AsBoolean(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.Boolean>

null if value is null or empty. A System.Boolean if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

AsDateTime(Object)

Converts the System.Object representing a date in the corporate time zone to a System.DateTime in the local time zone

Declaration
DateTime? AsDateTime(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.DateTime>

null if value is null or empty. A System.DateTime if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

AsDateTimeOffset(Object)

Converts the System.Object representing a date in the corporate time zone to a System.DateTimeOffset in the local time zone

Declaration
DateTimeOffset? AsDateTimeOffset(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.DateTimeOffset>

null if value is null or empty. A System.DateTimeOffset if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

AsDateTimeUtc(Object)

Converts the System.Object representing a date in the corporate time zone to a System.DateTime in the UTC time zone

Declaration
DateTime? AsDateTimeUtc(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.DateTime>

null if value is null or empty. A System.DateTime if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

AsDecimal(Object)

Converts the System.Object to a System.Decimal based on the locale and time zone

Declaration
decimal ? AsDecimal(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.Decimal>

null if value is null or empty. A System.Decimal if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

AsDouble(Object)

Converts the System.Object to a System.Double based on the locale and time zone

Declaration
double ? AsDouble(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.Double>

null if value is null or empty. A System.Double if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

AsInt(Object)

Converts the System.Object to a System.Int32 based on the locale and time zone

Declaration
int ? AsInt(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.Int32>

null if value is null or empty. A System.Int32 if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

AsLong(Object)

Converts the System.Object to a System.Int64 based on the locale and time zone

Declaration
long ? AsLong(object value)
Parameters
Type Name Description
System.Object value

The value.

Returns
Type Description
System.Nullable<System.Int64>

null if value is null or empty. A System.Int64 if value is convertible. Otherwise, an exception is thrown

| Improve this Doc View Source

Format(Object)

Serializes the value to a string. Dates are converted to the corporate time zone

Declaration
string Format(object value)
Parameters
Type Name Description
System.Object value

The value to serialize.

Returns
Type Description
System.String

A string representing the value

Extension Methods

ItemExtensions.Now(IServerContext)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX