Class ArasMethod
Simplify usage of ArasExtensions in the top class for an Aras method
Namespace: BitAddict.Aras
Assembly: BitAddict.Aras.dll
Syntax
public abstract class ArasMethod
Properties
Innovator
Shared Aras Innovator instance
Declaration
public Innovator Innovator { get; set; }
Property Value
| Type | Description |
|---|---|
| Aras.IOM.Innovator |
Logger
Shared logger instance
Declaration
public Logger Logger { get; }
Property Value
| Type | Description |
|---|---|
| Logger |
Methods
Apply(Item)
Setup logging, innovator and error handling, then run method.
Declaration
public Item Apply(Item item)
Parameters
| Type | Name | Description |
|---|---|---|
| Aras.IOM.Item | item |
Returns
| Type | Description |
|---|---|
| Aras.IOM.Item |
ApplyAML(String)
Run AML query, log query and result
Declaration
public Item ApplyAML(string aml)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | aml |
Returns
| Type | Description |
|---|---|
| Aras.IOM.Item |
ApplyItem(Item, Boolean)
Run Item query, log query and result
Declaration
public Item ApplyItem(Item item, bool logResult = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Aras.IOM.Item | item | |
| System.Boolean | logResult | Log result (default true). Disable for speedups. |
Returns
| Type | Description |
|---|---|
| Aras.IOM.Item |
ApplySQL(String)
Run SQL query, log query and result
Declaration
public Item ApplySQL(string sql)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | sql |
Returns
| Type | Description |
|---|---|
| Aras.IOM.Item |
DoApply(Item)
Main method code. Everything is setup prior to this being called. Excpetions from this method are caught, logged and returned as error item.
Declaration
public abstract Item DoApply(Item root)
Parameters
| Type | Name | Description |
|---|---|---|
| Aras.IOM.Item | root | Item the Aras method was called with |
Returns
| Type | Description |
|---|---|
| Aras.IOM.Item | Method result item |
FetchRelationships(Item, String, String)
Fetch relationships, log query and result
Declaration
public Item FetchRelationships(Item item, string relationShipTypeName, string selectList)
Parameters
| Type | Name | Description |
|---|---|---|
| Aras.IOM.Item | item | |
| System.String | relationShipTypeName | |
| System.String | selectList | What to select from relationshiptype |
Returns
| Type | Description |
|---|---|
| Aras.IOM.Item |
Log(String, String)
Log a message to log file
Declaration
public void Log(string tag, string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | tag | Where message occurs |
| System.String | message | Actual log message |