Constructors

Namespace: Digi21.DigiNG.Entities
Assembly: Digi21.DigiNG

Constructors of Code.

Constructor Table, Id Attributes Visible, VisiblePhotogrammetricWindow
Code(string name) null, null Empty dictionary 0xFFFFFFFF
Code(string name, IDictionary<string, object> attributes) null, null The attributes dictionary, without copying 0xFFFFFFFF
Code(string name, int table, int id) table, id Empty dictionary 0xFFFFFFFF
Code(string name, int? table, int? id) table, id Empty dictionary 0xFFFFFFFF

No constructor checks its parameters: name and attributes may be null.

The table number is its number in the database's catalog table (CATDBS or MSCATALOG). The drawing file's DatabaseTables property returns each table's name and number.

Code(string)

public Code(string name)

Creates a code with no database link.

Parameter Description
name Code name.
var código = new Code("020400");

Code(string, IDictionary<string, object>)

public Code(string name, IDictionary<string, object> atributes)

Creates a code with no database link and the specified attributes. The Attributes property contains the same dictionary passed to the constructor: subsequent dictionary changes are reflected in the code's attributes.

Parameter Description
atributes Code attributes: database field name and value. In the installed assembly, the parameter is named attributes.
var código = new Code("020400", new Dictionary<string, object>
{
    { "Propietario", "Dylan" },
    { "Alturas", 3 },
    { "Superficie", 200.0 },
});

Code(string, int, int)

public Code(string name, int table, int id)

Creates a code linked to record id in table number table.

Parameter Description
name Code name.
table Database table number.
id Record identifier in the table: its primary key value.
var código = new Code("020400", 2, 25522);

Code(string, int?, int?)

public Code(string name, int? table, int? id)

Creates a code with optional table and record. If table and id are null, this constructor is equivalent to Code(name).

Parameter Description
name Code name.
table Database table number, or null.
id Record identifier, or null.
int? tabla = null;
int? registro = null;
var código = new Code("020400", tabla, registro);