Axis1.Util namespace reference


Stores a name/value collection with unconstrained types, that can be applied to AxParameterShed. In the Axisbase client, when you open the hyperlink properties of a cell and enter a list of arguments, those entries are used to populate an AxArgumentSet instance. That object is then passed to the target form, which applies the arguments to its parametershed. (See AxParameterShed.Apply)

object this[string] - Get or set a value by name. (Note: use the same syntax as you would with a Hashtable.)


Stores an Axisbase record type. AxCompoundType is immutable, meaning there are no methods available to change it once it is constructed. Use AxProposedCompoundType to create a new type or change a type.

string Name - The name

string Comment - The comment

bool IsSys - True if the type is a system type, starting with "^"

Dictionary<string, string> GetTypeData() - Returns a copy of the type level data

int PropertyCount - The number of properties

AxProperty Property(int i) - Returns a property by index

AxProperty[] Properties - A copy of an array of the properties


An extension to System.Data.DataSet. AxDataSet is defined to only contain tables which are AxDataTables. Note that the call to DataSet.Tables.Add(string) will create an instance of DataTable, so be sure to create AxDataTable instances, then add them to the AxDataSet.


An extension to System.Data.DataTable.

List<string> GetKeyedTypeNames() - Builds a list of record type names for all types whose key property name exists in the columns of the table. For example, if one of the colums in the table is named "SATURN.person.key", then one of the return strings would be "SATURN.person". This is used to determine which type(s) to attempt to update when changes to rows are saved.

static void SetReadOnly(Column c, bool enforced, bool suggested) - Sets a column's ReadOnly property and an extended property for "suggested readonly". When a column is not ReadOnly, but it is suggested readonly, then it can be changed in code but not by controls that inspect the suggested-read-only setting.

static bool GetReadOnly(Column c) - Get whether a column is either ReadOnly or suggested readonly, as set by SetReadOnly.

int MassageColumn(string name, MassageKind kind, string arg1, int arg2) - Change all rows in a table using the MassageKind and arguments. See MassageKind for details.

Hashtable ToHashtable(string axisID, string localType, int rowNo) - Converts one row to a fish hashtable, while de-qualifying property names. For example, the column "SATURN.person.dob" would be added to the hashtable as "dob". Pass the unqualified local type name for localType.

void ToObjects(string axisType, Type objType, IList ret) - Converts the table into a list of objects of the given type (objType). The type must have a parameterless constructor, and have public fields whose names match the table column names. The axisType argument is used as a column name prefix. For example, if a column is named "" and the Type objType has a public field Name, then the value in the column will be copied to Name only if axisType equals "SATURN.person" . An object is added to the ret argument for each row in the table.

string DefaultSortOrder - Gets or sets the sort order that is used in some contexts (namely the ListViewPanel) to set the sort order. The value can be a comma delimited list of column names, where each name can optionally be followed by " desc" to indicate descending order.

bool IsCompleteLoad - Gets a flag indicating whether the operation that loaded this table was run to completion. If false, then there were more records available but the max row limit was reached.


A struct to store a 4-byte date without a time, in a way that is unaffected by timezones.

When storing a date, it is common to use DateTime with a date, and "zero" time (12:00 AM). However, DateTime indicates an exact point in time in some timezone, so when read in a different time zone, it could show up as later on the same day, or as the previous day. Instead of using DateTime two different ways, Axisbase uses AxDate for dates, and DateTime for time-zone-adjusted times, and this avoids the time zone problems.

AxDate(DateTime) - Construct an instance from a DateTime

AxDate(short year, byte month, byte day) - Construct an instance fom a year, month, and day

DateTime ToDateTime() - Convert to DateTime, using 12:00 AM as the time

string ToString() - Convert to a string using the culture-invariant format yyyy-MM-dd

string ToString(string format) - Convert to a string by calling DateTime.ToString(format)


Stores information about one field in a record type. AxFieldInfo instances are obtained from AxPond.GetFieldInfo.

AxPrimitive ExtPrimitive - The primitive type

string Name - The property name, which might be in dot-notation for nested types. For example, if type "address" has property "postcode", and type "person" contains type "address", then one of the fields will be named "address.postcode".

AxProperty Property - The property that defines this field. In the case of a nested type, Property may be a property of the nested record type.


Stores the name, prompt, type, and value for one parameter in an AxParameterShed.

Parameters can be primitive types, or references to compound types (record types).

Parameters are either single valued or multiple valued; the two kinds are referenced differently. A single-valued parameter is NOT the same as a multi-valued parameter that happens to have one value. Attempting to access the single value of a multi-valued parameter results in an exception, and vice versa.

AxParameter(string name, string prompt, bool isMulti, bool isRef, AxPrimitive primitive, string refAxisType, string displayType) - Full constructor. Upon construction, the parameter has no value. Please see the comments for each property for an explanation of each of the constructor arguments.

string Name - Gets the parameter name

AxPrimitive Primitive - Gets the primitive type of the parameter. If IsReference is true, Primitive will be AxPrimitive.KEY

string Prompt - Gets the prompt, which is what the user sees when entering the value

string RefAxisType - Gets or sets the qualified record type if this is a reference parameter. Example: "SATURN.person".

string DisplayType - The optional display type name, prefixed by the AxisID. For example, "SATURN.jobtypes"

bool IsMultiple - Returns true if this is a multi-valued parameter.

bool IsReference - Returns true if this is a reference to a type. In this case, RefAxisType is set, and Primitive equals AxPrimitive.KEY

bool IsSet - Returns true if the parameter has a value. Multi-valued parameters may be set to an empty list, which is considered to be set.

ArrayList MultiValue - Gets or sets the values of a multi-valued parameter.

object SingleValue - Gets or sets the value. You may not set SingleValue = null (use Clear() instead). It will convert types when possible to match the parameter's defined type.

void Clear() - clears the value


Stores a collection of AxParameters.

void Add(AxParameter ap, bool checkInconsistentType, bool overwrite) - Add one parameter. If checkInconsistentType is true, throws exception if the new parameter overwrites a parameter by the same name with a different type. If overwrite is true, overwrites an existing parameter of the same name.

void Add(AxParameterShed p2, bool checkInconsistentType, bool overwrite) - Add all parameters from another parametershed.

void Add(AxParameterShed p2, string name, bool checkInconsistentType) - Add one parameter from another parametershed.

void Apply(AxArgumentSet us) - For each value in the argument set whose name matches an existing name in the parameter shed, update the value to the value from the argument set, converting types if possible.

void Clear() - Clears the parametershed.

AxParameter Get(string name, bool throwException) - Get a parameter by name (case insensitive). If throwException is true, and the name is not found, throw an exception.

string[] GetNames() - Return the names of all parameters.

bool IsResolved() - Return true if all parameters have values.

void Remove(string name) - Remove a parameter by name.

int Count - Return the number of parameters in the parametershed.

OptionalFilterList OptionalFilters - Return the OptionalFilterList associated with the parametershed. You can change the returned instance.


An enumeration of the possible primitive types that record types may consist of.



A property definition in an AxCompoundType. AxProperty objects are immutable; you can construct a new one but not make changes to an existing one.

AxProperty(string aName, string aTypeName, string aDisplayTypeName, string aPrompt, string aComment, bool aIsReference, bool aIsUnique, Int64 aMinValue, Int64 aMaxValue, bool aRestrictRange, int aMinLength, int aMaxLength, bool aUpperCase) - Full constructor. See individual property descriptions for an explanation of each argument.

AxProperty(string aName, string aTypeName, string aPrompt, string aComment, int aMinLength, int aMaxLength, bool aUpperCase) - Shortened constructor for strings and blobs

AxProperty(string aName, string aTypeName, string aPrompt, string aComment) - Alternate shortened constructor

string Name - The property name - alphanumeric lower case

string TypeName - Either a primitive type name or a nonqualified type defined in the same pond as the type this property belongs to

string DisplayTypeName - A display type name or null (unqualified)

string Prompt - the usual prompt for building blocks

string Comment - Comment for documentation purposes

bool IsReference - If is compound and IsReference is true, this property is a reference to a separate object (a foreign key). If IsReference is false, the entire compound type is nested in the owning type. If is primitive, then IsReference must be false.

bool IsUnique - Controls whether all fish of this type in the database must have distinct values for this property. The unique rule extends to zero/empty values.

Int64 MinValue - Min value allowed. For numeric types only. Only used if RestrictRange is true.

Int64 MaxValue - Max value allowed. For numeric types only. Only used if RestrictRange is true.

bool RestrictRange - If true, MinValue/MaxValue are in effect

Int32 MinLength - Min length. For blobs and strings only.

Int32 MaxLength - Max length. For blobs and strings only.

bool Uppercase - If true, only uppercase strings are allowed.


Stores a modifiable copy of a compound type, or a new proposed type that hasn't been created yet.

AxProposedCompoundType() - Constructor

AxProposedCompoundType(AxCompoundType template) - Create a type based on a template

string Name (see AxCompoundType)

string Comment (see AxCompoundType)

List<AxProperty> Properties (see AxCompoundType)

Dictionary<string, string> TypeData (see AxCompoundType)


Stores information about the effects of changing a record type. The object is returned from AxPond.AnalyzeTypeChange.

bool Allowed - If true, the type change is allowed.

List<TCIAffectedType> AffectedTypes - Set to a list of objects holding information about each affected type.


See AxTypeChangeInfo.

string TypeName - The local type name.

List<TCIField> Fields - List of the old and new properties affected by the change.

bool AnyRecordsAffected - True if there are records of the type.


See AxTypeChangeInfo and TCIAffectedType

string FieldName - The unqualified property name

AxProperty OldProperty - The original property

AxProperty NewProperty - The new proposed property

AxPrimitive OldExtPrimitive - The original primitive

AxPrimitive NewExtPrimitive - The new proposed primitive

object DefaultValue - The new default value for records that aren't converted

string Description - Description of what will happen in English.

PropertyChangeMode ChangeMode - one of NoChange, SafeConversion (the conversion will lose no information), LossConversion (the conversion will lose precision), Disallowed (the property change is disallowed, which makes the whole type change disallowed)

bool BelongsToOld - If true, the field belongs to the original type

bool BelongsToNew - If true, the field belongs to the new type


Contains static utility methods for common operations used throughout Axisbase.

static byte[] ObjectToBlob(object o) - Serialize an object to a byte array

static object BlobToObject(byte[] blob) - Deserialize a byte array to an object

static object Convert(object value, AxPrimitive prim) - Convert an object to the .NET type defined by prim

static object Convert(object value, Type toType) - Convert an object to another type. This method uses System.Convert, but it does more than that. It handles default values, so if value is "", the result will be zero, false, or the current time depending on the type. Conversions involving AxDate are supported.

static bool IsValidValue(AxPrimitive prim, AxProperty prop, object value) - Returns true if the given value is valid for the given primitive and property. Checks type, string length, numeric range, and uppercase.

static bool IsValidValue(AxProperty prop, object value) - Shortened version of the above.

static AxPrimitive PrimitiveByName(string name) - Returns the primitive having the given name. The name must be lower case, such as string, blob, int16, etc. Returns AxPrimitive.NULL if not found.

static Type PrimitiveToType(AxPrimitive p) - Convert a primitive to its .NET type.

static string PrimitiveValueToString(object o) - Converts primitive values to strings, with culture-invariant formats for dates.

static AxPrimitive TypeToPrimitive(Type t) - Converts a .NET type to the corresponding AxPrimitive.


Stores and evaluates an Axisbase expression.

Expr(string s) - Constructor, takes the expression text

event Expr_EvalIdentifierHandler EvalVariable - You must handle this event to supply the values of identifiers that are encountered in the expression.

object Calc() - Calculates the result


Interface for use with object relational mapping. A class that implements IAxObject exposes the AxisKey property. Also see Axis1.Data.AxObjectBase.

Int32 AxisKey {get; set;} - Gets or sets the key


Interface to be applied to forms or controls that can show the user the progress of a long-running operation. This is implemented by Axis1.Forms.ProgressForm, but you can also implement it separately if needed.

void ShowProgress(double frac, string displayValue, string logText) - When called frequently during a long-running process, the class implementing this method should update a progress indicator. Frac is between 0 and 1. DisplayValue is optional and overwrites the previous value if not null. If logText is not null, it may be written to a log.


Enumeration of table massages. See AxDataTable.

  • TrimLR - Trims a string column

  • Truncate - Truncates a column to a length (arg2 supplies the length)

  • SetValue - Sets a column to a value (arg2 is the value)

  • SetExpression - Sets a column to an expression result (arg1 is the expression)


A fishnet may have optional filters. In the Axisbase client, in the data subset window, this is indicated by non-blank text in the entry "Prompt to control whether filter is applied". An OptionalFilterList instance belongs to an AxParameterShed instance, and contains the list of optional filter prompts. It is used to dynamically remove filters from fishnets based on run time user input.

void Add(string) - Add a new, inactive prompt

void Clear() - Clear all prompts

string[] GetPrompts - Return the list of all prompts

string[] GetInactivePrompts - Return the list of inactive prompts

bool IsActive(string prompt) - Gets whether the given prompt is active

void SetActive(string prompt, bool active) - Sets whether a prompt is active

int Count

(c) 2014-2015 Divergent Labs, Inc.