ScriptStack 1.0.4
Loading...
Searching...
No Matches
ScriptStack.Runtime.ArrayList Class Reference
Inheritance diagram for ScriptStack.Runtime.ArrayList:

Public Member Functions

void Add (object objectValue)
void Subtract (object objectValue)
override string ToString ()

Properties

new object this[object objectKey] [get, set]

Detailed Description

Definition at line 9 of file ArrayList.cs.

Member Function Documentation

◆ Add()

void ScriptStack.Runtime.ArrayList.Add ( object objectValue)

Definition at line 95 of file ArrayList.cs.

96 {
97
98 if (objectValue.GetType() == typeof(ArrayList))
99 AddArray((ArrayList)objectValue);
100
101 else
102 AddValue(objectValue);
103
104 }

◆ Subtract()

void ScriptStack.Runtime.ArrayList.Subtract ( object objectValue)

Definition at line 106 of file ArrayList.cs.

107 {
108
109 if (objectValue.GetType() == typeof(ArrayList))
110 SubtractArray((ArrayList)objectValue);
111
112 else SubtractValue(objectValue);
113
114 }

◆ ToString()

override string ScriptStack.Runtime.ArrayList.ToString ( )

Definition at line 116 of file ArrayList.cs.

117 {
118 string culture = Thread.CurrentThread.CurrentCulture.NumberFormat.PercentDecimalSeparator;
119 string decimalSeparator = ",";
120 //if (culture.ToString().Trim() == ",") decimalSeparator = ";";
121 StringBuilder stringBuilder = new StringBuilder();
122 stringBuilder.Append("{ ");
123 bool bFirst = true;
124 foreach (object objectKey in Keys)
125 {
126 if (!bFirst) stringBuilder.Append(decimalSeparator + " ");
127 bFirst = false;
128 OutputValue(stringBuilder, objectKey);
129 stringBuilder.Append(": ");
130 OutputValue(stringBuilder, this[objectKey]);
131 }
132 stringBuilder.Append(" }");
133 return stringBuilder.ToString();
134 }

Property Documentation

◆ this[object objectKey]

new object ScriptStack.Runtime.ArrayList.this[object objectKey]
getset

Definition at line 140 of file ArrayList.cs.

141 {
142
143 get
144 {
145
146 if (objectKey.GetType() == typeof(string) && ((string)objectKey) == "size")
147 return this.Count;
148
149 if (!ContainsKey(objectKey))
150 return NullReference.Instance;
151
152 return base[objectKey];
153
154 }
155 set
156 {
157
158 if (objectKey == null)
159 objectKey = NullReference.Instance;
160
161 if (objectKey.GetType() == typeof(string) && ((string)objectKey) == "size")
162 throw new ExecutionException("Der Member 'size' eines Arrays ist eine 'read-only' Eigenschaft.");
163
164 if (value == null)
165 base[objectKey] = NullReference.Instance;
166
167 else
168 base[objectKey] = value;
169
170 }
171
172 }

The documentation for this class was generated from the following file: