History

GSF.Core: Modified ConnectionStringParser to use only public instance properties from settingsObject which have both a getter and a setter.

StephenCWills committed 13 years ago

Commit fe3d5d01 parent f4f1cac2 files · +20 −6Browse files

Showing the changes to Source/Libraries/GSF.Core/Configuration/ConnectionStringParser.cs (1 of 2 files). Show all

Unified · Split

Source/Libraries/GSF.Core/Configuration/ConnectionStringParser.cs+6−3
@@ -384,7 +384,8 @@ namespace GSF.Configuration · 383 unmodified lines
384384 {
385385 SerializeSettingAttribute attribute;
386386
387− return t.GetProperties()
387+ return t.GetProperties(BindingFlags.Public | BindingFlags.Instance)
388+ .Where(property => property.CanRead && property.CanWrite)
388389 .Where(property => !property.TryGetAttribute(out attribute) || attribute.Serialize)
389390 .Select(property => new ConnectionStringProperty(property))
390391 .ToArray();
@@ -394,7 +395,8 @@ namespace GSF.Configuration · 3 unmodified lines
394395 {
395396 SerializeSettingAttribute attribute;
396397
397− return t.GetProperties()
398+ return t.GetProperties(BindingFlags.Public | BindingFlags.Instance)
399+ .Where(property => property.CanRead && property.CanWrite)
398400 .Where(property => property.TryGetAttribute(out attribute) && attribute.Serialize)
399401 .Select(property => new ConnectionStringProperty(property))
400402 .ToArray();
@@ -457,7 +459,8 @@ namespace GSF.Configuration · 56 unmodified lines
457459 {
458460 TParameterAttribute attribute;
459461
460− return t.GetProperties()
462+ return t.GetProperties(BindingFlags.Public | BindingFlags.Instance)
463+ .Where(property => property.CanRead && property.CanWrite)
461464 .Where(property => property.TryGetAttribute(out attribute))
462465 .Select(property => new ConnectionStringProperty(property))
463466 .ToArray();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t