Show / Hide Table of Contents

Interface IResult

Represents a modifiable result of an Aras query that can either be a string, an exception, or zero or more items

Inherited Members
IReadOnlyResult.AssertItems()
IReadOnlyResult.AssertNoError()
IReadOnlyResult.Exception
IReadOnlyResult.Items()
IReadOnlyResult.Message
IAmlNode.ToAml(XmlWriter, AmlWriterSettings)
IErrorBuilder.ErrorContext(IReadOnlyItem)
IErrorBuilder.ErrorMsg(String)
IErrorBuilder.ErrorMsg(String, String[])
IErrorBuilder.ErrorMsg(String, IEnumerable<String>)
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public interface IResult : IReadOnlyResult, IAmlNode, IErrorBuilder
Remarks

The result of an Aras query might take one of the following forms:

Single ItemTo access the item, use the AssertItem(String) method
Item CollectionTo access the items, use the Items() method
String ResultTo access the string, use the Value property
ErrorTo access the error, use the System.Exception property. The other methods/properties will raise this exception if accessed.

Properties

| Improve this Doc View Source

Value

Get or set the string value of the result

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

The string value of the result

Methods

| Improve this Doc View Source

Add(IItem)

Add the specified item to the result

Declaration
IResult Add(IItem item)
Parameters
Type Name Description
IItem item

Item to add

Returns
Type Description
IResult

The current IResult object for chaining additional commands

| Improve this Doc View Source

AddMessage(Object[])

Adds content to the Message element of the result tag

Declaration
void AddMessage(params object[] content)
Parameters
Type Name Description
System.Object[] content

Content to add to the Message element

| Improve this Doc View Source

AssertItem(String)

Return a single item. If that is not possible, throw an appropriate exception (e.g. the exception returned by the server where possible)

Declaration
IItem AssertItem(string type = null)
Parameters
Type Name Description
System.String type

If specified, throw an exception if the item doesn't have the specified type

Returns
Type Description
IItem

A single IItem

Exceptions
Type Condition
ServerException

If the result does not represent exactly one item, either the exception returned from the server or a new exception will be thrown

Extension Methods

ItemExtensions.AssertItem<T>(IReadOnlyResult)
ItemExtensions.ToAml(IAmlNode, AmlWriterSettings)
ItemExtensions.ToAml(IAmlNode, XmlWriter)
ItemExtensions.ItemMax(IReadOnlyResult)
ItemExtensions.ItemsWithNoAccessCount(IReadOnlyResult)
ItemExtensions.ToXml(IAmlNode)
ItemExtensions.CreateReader(IReadOnlyResult)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX