Class ElementFactory
Class for generating mutable AML objects
Inheritance
Inherited Members
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public class ElementFactory
Remarks
An ElementFactory is used to create AML objects (Items, properties,
attributes, and more). A
factory is needed to
create these objects because the objects need to know how to serialize and deserialize base
.Net types (e.g. System.DateTime) according to the time zone and context of a
particular server connection. You can get a ElementFactory from a
IConnection via the AmlContext property.
Alternatively, if you are processing AML without an Aras connection (e.g. reading an AML
export file), you can easily get an ElementFactory in from the
Local or the Utc static properties
for a factory using either the local or the UTC time zone respectively.
To create an AML structure (that you can easily modify) with an ElementFactory, you can either start with a parameter substituted AML string, or by creating the AML objects directly
var aml = conn.AmlContext;
var query = aml.FromXml(
@"<Item type='Part' action='get'>
<classification>@0</classification>
<created_on condition='lt'>@1</created_on>
</Item>", classification, DateTime.Now.AddMinutes(-20)).AssertItem();
query.State().Set("Preliminary");
- OR -
var aml = conn.AmlContext;
var query = aml.Item(aml.Type("Part"), aml.Action("get")
, aml.Classification(classification)
, aml.CreatedOn(aml.Condition(Condition.LessThan), DateTime.Now.AddMinutes(-20))
, aml.Property("state", "Preliminary")
);
return conn.Apply(query.ToAml()).Items();
When used in the second manner, the API should feel very similar to creating LINQ-to-XML objects. However, using ElementFactory should be preferred as, unlike LINQ, it properly serializes base types and handles time zone conversions
var query = new XElement(new XAttribute("type", "Part"), new XAttribute("action", "get")
, new XElement("classification", classification)
, new XElement("created_on", new XAttribute("condition", "lt"), DateTime.Now.AddMinutes(-20).ToString("s")
, new XElement("state", "Preliminary")
);
Examples
var aml = conn.AmlContext;
// --- OR ---
var aml = ElementFactory.Local;
IItem myItem = aml.Item(aml.Type(myType), aml.Action(myAction));
IResult myResult = aml.Result(resultText);
ServerException = aml.ServerException(errorMessage);
Constructors
| Improve this Doc View SourceElementFactory(IServerContext, IItemFactory)
Initializes a new instance of the ElementFactory class.
Declaration
public ElementFactory(IServerContext context, IItemFactory itemFactory = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IServerContext | context | The context. |
| IItemFactory | itemFactory | The item factory. |
Properties
| Improve this Doc View SourceItemFactory
Gets the factory for creating strongly-typed items.
Declaration
public IItemFactory ItemFactory { get; }
Property Value
| Type | Description |
|---|---|
| IItemFactory | The factory for creating strongly-typed items. |
Local
Return an ElementFactory using the local time zone and culture
Declaration
public static ElementFactory Local { get; }
Property Value
| Type | Description |
|---|---|
| ElementFactory |
LocalizationContext
Context for serializing/deserializing native types (e.g. DateTime, double, boolean, etc.)
Declaration
public IServerContext LocalizationContext { get; }
Property Value
| Type | Description |
|---|---|
| IServerContext |
Utc
Return an ElementFactory using the UTC time zone and current culture
Declaration
public static ElementFactory Utc { get; }
Property Value
| Type | Description |
|---|---|
| ElementFactory |
Methods
| Improve this Doc View SourceAction(String)
Create a new action attribute tag
Declaration
public IAttribute Action(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
Remarks
action [String] The name of the Method (or Built in Action Method) to apply to the Item.
Aml(Object[])
Create a new AML tag (for use with the ApplyAML method)
Declaration
public IElement Aml(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IElement |
And(Object[])
Create a logical or AML tag used with 'get' queries
Declaration
public ILogical And(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| ILogical |
Attribute(String)
Create a new attribute tag with the specified name
Declaration
public IAttribute Attribute(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name |
Returns
| Type | Description |
|---|---|
| IAttribute |
Attribute(String, Object)
Create a new attribute tag with the specified name and value
Declaration
public IAttribute Attribute(string name, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | |
| System.Object | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
CalcMd5(SecureToken)
Calculate the MD5 checksum of the securely stored value
Declaration
public string CalcMd5(SecureToken value)
Parameters
| Type | Name | Description |
|---|---|---|
| SecureToken | value |
Returns
| Type | Description |
|---|---|
| System.String |
CalcMd5(String)
Calculate the MD5 checksum of the string value
Declaration
public string CalcMd5(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| System.String |
Classification(Object[])
Create a new classification property
Declaration
public IProperty Classification(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Condition(Condition)
Create a new condition attribute
Declaration
public IAttribute Condition(Condition value)
Parameters
| Type | Name | Description |
|---|---|---|
| Condition | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
ConfigId(Object[])
Create a new config_id property
Declaration
public IProperty ConfigId(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
CreatedById(Object[])
Create a new created_by_id property
Declaration
public IProperty CreatedById(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
CreatedOn(Object[])
Create a new created_on property
Declaration
public IProperty CreatedOn(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Css(Object[])
Create a new css property
Declaration
public IProperty Css(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
CurrentState(Object[])
Create a new current_state property
Declaration
public IProperty CurrentState(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
DoGetItem(Boolean)
Create a new doGetItem attribute tag
Declaration
public IAttribute DoGetItem(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
Remarks
doGetItem [Boolean] If 0 then do not perform a final get action on the Item after the server performed that action as defined by the action attribute. Default is 1.
Element(String, Object[])
Create a generic AML tag given a name and the content
Declaration
public IElement Element(string name, params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The local name of the element |
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IElement |
FormatAml(String, Object[])
Formats an AML string by substituting the @0 style parameters with the arguments specified.
Declaration
public string FormatAml(string format, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | format | Query to format |
| System.Object[] | args | Arguments to substitute into the query |
Returns
| Type | Description |
|---|---|
| System.String |
FromXml(Command)
Return a result from a Command
Declaration
public IResult FromXml(Command aml)
Parameters
| Type | Name | Description |
|---|---|---|
| Command | aml | XML data |
Returns
| Type | Description |
|---|---|
| IResult |
FromXml(Stream)
Return a result from a stream
Declaration
public IResult FromXml(Stream xml)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | xml | XML data |
Returns
| Type | Description |
|---|---|
| IResult |
FromXml(Stream, Command, IConnection)
Return a result from an AML stream indicating that it is the result of a query performed on a specific connection
Declaration
public IReadOnlyResult FromXml(Stream xml, Command query, IConnection conn)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | xml | XML data |
| Command | query | The original query which produced the |
| IConnection | conn | The connection which was queried |
Returns
| Type | Description |
|---|---|
| IReadOnlyResult |
FromXml(TextReader)
Return a result from an AML text reader
Declaration
public IResult FromXml(TextReader xml)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.TextReader | xml | XML data |
Returns
| Type | Description |
|---|---|
| IResult |
FromXml(String, Command, IConnection)
Return a result from an AML string indicating that it is the result of a query performed on a specific connection
Declaration
public IReadOnlyResult FromXml(string xml, Command query, IConnection conn)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | xml | XML data |
| Command | query | The original query which produced the |
| IConnection | conn | The connection which was queried |
Returns
| Type | Description |
|---|---|
| IReadOnlyResult |
FromXml(String, Object[])
Return a result from an AML string by substituting the @0 style parameters with the arguments specified.
Declaration
public IResult FromXml(string xml, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | xml | Query to format |
| System.Object[] | args | Arguments to substitute into the query |
Returns
| Type | Description |
|---|---|
| IResult |
FromXml(XmlReader)
Return a result from an XML reader
Declaration
public IResult FromXml(XmlReader xml)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlReader | xml | XML data |
Returns
| Type | Description |
|---|---|
| IResult |
FromXml(XmlReader, Command, String)
Return a result from an XmlReader indicating that it is the result of a query performed on a specific connection
Declaration
public IReadOnlyResult FromXml(XmlReader xml, Command query, string database)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlReader | xml | XML data |
| Command | query | The original query which produced the |
| System.String | database | The name of the database which was queried |
Returns
| Type | Description |
|---|---|
| IReadOnlyResult |
Generation(Object[])
Create a new generation property
Declaration
public IProperty Generation(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Id(Nullable<Guid>)
Create a new where id attribute
Declaration
public IAttribute Id(Guid? value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.Guid> | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
Id(String)
Create a new where id attribute
Declaration
public IAttribute Id(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
IdList(String)
Create a new idlist attribute
Declaration
public IAttribute IdList(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
IdProp(Object[])
Create a new id property
Declaration
public IProperty IdProp(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
IsCurrent(Object[])
Create a new is_current property
Declaration
public IProperty IsCurrent(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
IsNull(Boolean)
Create a new is_null attribute
Declaration
public IAttribute IsNull(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
IsReleased(Object[])
Create a new is_released property
Declaration
public IProperty IsReleased(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Item(Object[])
Create a new Item AML tag
Declaration
public IItem Item(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IItem |
KeyedName(Object[])
Create a new keyed_name property
Declaration
public IProperty KeyedName(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
LockedById(Object[])
Create a new locked_by_id property
Declaration
public IProperty LockedById(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
MajorRev(Object[])
Create a new major_rev property
Declaration
public IProperty MajorRev(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
ManagedById(Object[])
Create a new managed_by_id property
Declaration
public IProperty ManagedById(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
MaxRecords(Int32)
Create a new maxRecords attribute
Declaration
public IAttribute MaxRecords(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
MinorRev(Object[])
Create a new minor_rev property
Declaration
public IProperty MinorRev(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
ModifiedById(Object[])
Create a new modified_by_id property
Declaration
public IProperty ModifiedById(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
ModifiedOn(Object[])
Create a new modified_on property
Declaration
public IProperty ModifiedOn(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
NewId()
Generate a new GUID id
Declaration
public string NewId()
Returns
| Type | Description |
|---|---|
| System.String |
NewVersion(Object[])
Create a new new_version property
Declaration
public IProperty NewVersion(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
NoItemsFoundException(String)
Creates a 'No items found' exception
Declaration
public NoItemsFoundException NoItemsFoundException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message |
Returns
| Type | Description |
|---|---|
| NoItemsFoundException |
NoItemsFoundException(String, Command)
Creates a 'No items found' exception
Declaration
public NoItemsFoundException NoItemsFoundException(string type, Command query)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | type | The ItemType name for the item which couldn't be found |
| Command | query | The AML query which didn't return any results |
Returns
| Type | Description |
|---|---|
| NoItemsFoundException |
NoItemsFoundException(String, Exception)
Creates a 'No items found' exception
Declaration
public NoItemsFoundException NoItemsFoundException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | |
| System.Exception | innerException |
Returns
| Type | Description |
|---|---|
| NoItemsFoundException |
Not(Object[])
Create a logical not AML tag used with 'get' queries
Declaration
public ILogical Not(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content |
Returns
| Type | Description |
|---|---|
| ILogical |
NotLockable(Object[])
Create a new not_lockable property
Declaration
public IProperty NotLockable(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Or(Object[])
Create a logical or AML tag used with 'get' queries
Declaration
public ILogical Or(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content |
Returns
| Type | Description |
|---|---|
| ILogical |
OrderBy(String)
Create a new orderBy attribute
Declaration
public IAttribute OrderBy(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
OwnedById(Object[])
Create a new owned_by_id property
Declaration
public IProperty OwnedById(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Page(Int32)
Create a new page attribute
Declaration
public IAttribute Page(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
PageSize(Int32)
Create a new pagesize attribute
Declaration
public IAttribute PageSize(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
PermissionId(Object[])
Create a new permission_id property
Declaration
public IProperty PermissionId(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Property(String, Object[])
Create a new property tag with the specified name
Declaration
public IProperty Property(string name, params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the property to create |
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
QueryDate(DateTime)
Create a new queryDate attribute
Declaration
public IAttribute QueryDate(DateTime value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.DateTime | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
QueryType(QueryType)
Create a new queryType attribute
Declaration
public IAttribute QueryType(QueryType value)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryType | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
RelatedExpand(Boolean)
Create a new related_expand attribute
Declaration
public IAttribute RelatedExpand(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
RelatedId(Object[])
Create a new related_id property
Declaration
public IProperty RelatedId(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Relationships(Object[])
Create a new Relationships tag
Declaration
public IRelationships Relationships(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content |
Returns
| Type | Description |
|---|---|
| IRelationships |
Result(Object[])
Create a new Result AML tag
Declaration
public IResult Result(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content |
Returns
| Type | Description |
|---|---|
| IResult |
Select(SelectNode[])
Create a new select attribute
Declaration
public IAttribute Select(params SelectNode[] properties)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectNode[] | properties |
Returns
| Type | Description |
|---|---|
| IAttribute |
Select(String)
Create a new select attribute
Declaration
public IAttribute Select(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
ServerEvents(Boolean)
Create a new serverEvents attribute
Declaration
public IAttribute ServerEvents(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
ServerException(String)
Create a new server exception
Declaration
public ServerException ServerException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message |
Returns
| Type | Description |
|---|---|
| ServerException |
ServerException(String, Exception)
Create a new server exception
Declaration
public ServerException ServerException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | |
| System.Exception | innerException |
Returns
| Type | Description |
|---|---|
| ServerException |
SourceId(Object[])
Create a new source_id property
Declaration
public IProperty SourceId(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
State(Object[])
Create a new state property
Declaration
public IProperty State(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
TeamId(Object[])
Create a new team_id property
Declaration
public IProperty TeamId(params object[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object[] | content | The initial content of the elment (attributes, elements, or values) |
Returns
| Type | Description |
|---|---|
| IProperty |
Type(String)
Create a new type attribute
Declaration
public IAttribute Type(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
Remarks
type [String] The ItemType name for which the Item is an instance.
TypeId(String)
Create a new typeId attribute
Declaration
public IAttribute TypeId(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
ValidationException(String, IReadOnlyItem, String)
Create a new validation exception
Declaration
public ValidationReportException ValidationException(string message, IReadOnlyItem item, string report)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | Exception message |
| IReadOnlyItem | item | Item being validated |
| System.String | report | HTML report to present to the user |
Returns
| Type | Description |
|---|---|
| ValidationReportException |
ValidationException(String, IReadOnlyItem, String[])
Create a new validation exception
Declaration
public ValidationException ValidationException(string message, IReadOnlyItem item, params string[] properties)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | Exception message |
| IReadOnlyItem | item | Item being validated |
| System.String[] | properties | Properties with errors |
Returns
| Type | Description |
|---|---|
| ValidationException |
ValidationException(String, Exception, IReadOnlyItem, String)
Create a new validation exception
Declaration
public ValidationReportException ValidationException(string message, Exception innerException, IReadOnlyItem item, string report)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | Exception message |
| System.Exception | innerException | Inner exception |
| IReadOnlyItem | item | Item being validated |
| System.String | report | HTML report to present to the user |
Returns
| Type | Description |
|---|---|
| ValidationReportException |
ValidationException(String, Exception, IReadOnlyItem, String[])
Create a new validation exception
Declaration
public ValidationException ValidationException(string message, Exception innerException, IReadOnlyItem item, params string[] properties)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | Exception message |
| System.Exception | innerException | Inner exception |
| IReadOnlyItem | item | Item being validated |
| System.String[] | properties | Properties with errors |
Returns
| Type | Description |
|---|---|
| ValidationException |
Where(String)
Create a new where attribute
Declaration
public IAttribute Where(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value |
Returns
| Type | Description |
|---|---|
| IAttribute |
Remarks
where [String] Used instead of the id attribute to specify the WHERE clause for the search criteria. Include the table name with the column name using the dot notation: where="[user].first_name like 'Tom%'"