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
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 Item | To access the item, use the AssertItem(String) method |
Item Collection | To access the items, use the Items() method |
String Result | To access the string, use the Value property |
Error | To access the error, use the System.Exception property. The other methods/properties will raise this exception if accessed. |
Properties
| Improve this Doc View SourceValue
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 SourceAdd(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 |
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 |
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 |