A config file may be used to over-ride some aspects of DicomObjects.NET behaviour without the need to recompile. This is broadly equivalent to the registry as used in the COM version, but has the advantage of being application-specific, avoiding any side-effects for other applications.

The config file is a simple text file called DicomObjects.Config in the same directory as the copy of the DicomObjects dll being used (which is normally the same as the application using it). 

Each line is independent, and should conform to one of the following formats

A comment

This is any line starting with # ; ' or // e.g. :

# This is a comment

A “registry” value

This has the form:

Name = NumericValue

or:

Name = "Stringvalue"

The form with quotes is equivalent to DicomGlobal.SetRegString(Name, Stringvalue) and the form without is equivalent to DicomGlobal.SetRegWord(Name, NumericValue)

A Static Property

This has the form:

Class.Property = Value

The type of Value is determined internally by reflection to match the type of the property, and it may be a number (decimal or hex - preceded by 0x or &H), a string, a boolean or an Enum (in which case multiple value may be separated by commas) - e.g.

DicomDataSet.DefaultValidationTypes = Basic, CharacterSet
DicomGlobal.Timeout = 300
DicomGlobal.MoveTimesOut = False

A DicomGlobal method call

This has the form:

Methodname parameter, parameter, parameter etc.

As for the static property, the types of the parameters are determined by reflection and may be a wide variety of types

This is primarily used to initiate or override logging behaviour, e.g.

LogToFile "C:\Logs", 0x3F

A special internal mechanism is used to “freeze” any logging enabled via the Configuration file, such that it cannot subsequently be changed by internal program calls - allowing definitive control from the config file.