Try OpenEdge Now
skip to main content
.NET Open Clients
Accessing Proxy Properties : Relationship between RunTimeProperties and Connection objects
 

Relationship between RunTimeProperties and Connection objects

The values set in a Connection object supersede the static RunTimeProperties values. This relationship is particularly important if a static RunTimeProperties object is updated after a Connection object has been instantiated. In this situation, the effect on a Connection object instance depends on whether that specific property was overridden in that object after it was instantiated, as described in the following table.
Table 24. Relationship between RunTimeProperties and Connection object properties
If the RunTimeProperties property has . . .
And the property in the Connection object has . . .
Then the value of the property is returned from the . . .
Not changed
Not changed
RunTimeProperties class
Changed
Not changed
RunTimeProperties class
Not changed
Changed
Connection object
Changed
Changed
Connection object
Note: The converse of this relationship is not true. That is, changing the value of a property for a Connection object does not affect the static value of that property, nor does it affect the value of that property in any other object instance.
The following example uses the WaitifBusy property to illustrate the relationship between RunTimeProperties and Connection object properties:
Connection conn;
bool ret;

RunTimeProperties.WaitIfBusy = true;
conn = new Connection(url, userid, password, appserverInfo);
ret = conn.GetBooleanProperty("PROGRESS.Session.WaitIfBusy");
System.Console.WriteLine("(A) WaitIfBusy= " + ret);

RunTimeProperties.WaitIfBusy = false;// change static property
ret = conn.WaitIfBusy; // equivalent accessor method
System.Console.WriteLine("(B) WaitIfBusy= " + ret);

conn.WaitIfBusy = true; // change conn object property
ret = conn.GetBooleanProperty("PROGRESS.Session.WaitIfBusy");
System.Console.WriteLine("(C) WaitIfBusy= " + ret);
RunTimeProperties.SetBooleanProperty("PROGRESS.Session.WaitIfBusy",
false);
ret = conn.WaitIfBusy;
System.Console.WriteLine("(D) WaitIfBusy= " + ret);

RunTimeProperties.WaitIfBusy = true;
ret = conn.GetBooleanProperty("PROGRESS.Session.WaitIfBusy");
System.Console.WriteLine("(E) WaitIfBusy= " + ret);
When executed, this program prints the following result:
(A) WaitIfBusy= true
(B) WaitIfBusy= false
(C) WaitIfBusy= true
(D) WaitIfBusy= true
(E) WaitIfBusy= true