<a id=“SuperOffice_WebApi_Agents_MDOAgent”></a> Class MDOAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll MDO Lists, reading, searching, and item lookup.
Inheritance
object ← AgentBase ← MDOAgentImplements
IMDOAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (MDOAgent agent = new MDOAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
<a id=“SuperOffice_WebApi_Agents_MDOAgent__ctor_System_Net_Http_HttpClient_”></a> MDOAgent(HttpClient)
Constructor: MDO Lists, reading, searching, and item lookup.Parameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
<a id=“SuperOffice_WebApi_Agents_MDOAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> MDOAgent(WebApiOptions, HttpClient)
Constructor: MDO Lists, reading, searching, and item lookup.Parameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetListAsync_System_String_System_Boolean_System_String_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetListAsync(string, bool, string, bool, RequestOptions)
Method to get a MDO list.Parameters
name string
Conceptual name of the MDO list-
forceFlatList bool
Force the list to be flat
additionalInfo string
Additional info to the MDO provider
onlyHistory bool
If true, return only history items
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<MDOListItem[]> Array of MDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetListIdByListNameAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetListIdByListNameAsync(string, RequestOptions)
Retrieve the UdListDefinition id of a list, by its name. Not all lists have such an ID, but those that are based on tables do (the list name is then the same as the table name)Parameters
name string
The list name, same as the table name for lists that are backed by tables
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> List id in the UdListDefinition table<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetListItemAsync_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetListItemAsync(string, int, RequestOptions)
Returns a single list itemParameters
listName string
Conceptual name of the MDO list
id int
Id of list item
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<MDOListItem> Single MDO list item<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetListNamesAsync_SuperOffice_WebApi_RequestOptions_”></a> GetListNamesAsync(RequestOptions)
Returns a list of all MDO List names. These names can also be used with the Archive agent as ProviderNames.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string[]> Array of list names.<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetListWithHistoryAsync_System_String_System_Boolean_System_String_System_Int32___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetListWithHistoryAsync(string, bool, string, int[], bool, RequestOptions)
Method to get a MDO list with own history list.Parameters
name string
Conceptual name of the MDO list-
forceFlatList bool
Force the list to be flat
additionalInfo string
Additional info to the MDO provider
historyItems int[]
An array of ids, used to get the history list
onlyHistory bool
If true, return only history items
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<MDOListItem[]> Array of MDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetListWithRestrictionAsync_System_String_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetListWithRestrictionAsync(string, string, string, RequestOptions)
Method to get a MDO list with restrictions.Parameters
name string
Conceptual name of the MDO list-
additionalInfo string
Additional info to the MDO provider
searchValue string
the value used to restrict the list
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<MDOListItem[]> Array of MDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetSelectableListAsync_System_String_System_Boolean_System_String_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetSelectableListAsync(string, bool, string, bool, RequestOptions)
Method to get a Selectable MDO list.Parameters
name string
Conceptual name of the MDO list.
forceFlatList bool
Force the list to be flat
additionalInfo string
Additional info to the MDO provider
onlyHistory bool
If true, return only history items
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectableMDOListItem[]> Array of SelectableMDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetSelectableListWithHistoryAsync_System_String_System_Boolean_System_String_System_Int32___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetSelectableListWithHistoryAsync(string, bool, string, int[], bool, RequestOptions)
Method to get a Selectable MDO list with own history list.Parameters
name string
Conceptual name of the MDO list.
forceFlatList bool
Force the list to be flat
additionalInfo string
Additional info to the MDO provider
historyItems int[]
An array of ids, used to get the history list
onlyHistory bool
If true, return only history items
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectableMDOListItem[]> Array of SelectableMDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetSelectableListWithRestrictionAsync_System_String_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSelectableListWithRestrictionAsync(string, string, string, RequestOptions)
Method to get a Selectable MDO list with restrictions.Parameters
name string
Conceptual name of the MDO list
additionalInfo string
Additional info to the MDO provider
searchValue string
the value used to restrict the list
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectableMDOListItem[]> Array of SelectableMDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetSelectableSimpleListAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSelectableSimpleListAsync(string, RequestOptions)
Method returns a flat Selectable MDO List.Parameters
name string
Conceptual name of the MDO list
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectableMDOListItem[]> Array of SelectableMDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_GetSimpleListAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSimpleListAsync(string, RequestOptions)
Method returns a simple flat MDO List.Parameters
name string
Conceptual name of the MDO list.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<MDOListItem[]> Array of MDOListItem<a id=“SuperOffice_WebApi_Agents_MDOAgent_SetSelectedAsync_System_String_System_String_SuperOffice_WebApi_Data_SelectableMDOListItem___SuperOffice_WebApi_RequestOptions_”></a> SetSelectedAsync(string, string, SelectableMDOListItem[], RequestOptions)
Saves the selected values as selected by their given list representation.Parameters
name string
Conceptual name of the MDO list
additionalInfo string
Additional info to the MDO provider
selectableMDOList SelectableMDOListItem[]
Items to be updated
requestOptions RequestOptions
Override language/culture codes on this request.