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
384 {384 {
385 SerializeSettingAttribute attribute;385 SerializeSettingAttribute attribute;
386 386
387 return t.GetProperties()387 return t.GetProperties(BindingFlags.Public | BindingFlags.Instance)
388 .Where(property => property.CanRead && property.CanWrite)
388 .Where(property => !property.TryGetAttribute(out attribute) || attribute.Serialize)389 .Where(property => !property.TryGetAttribute(out attribute) || attribute.Serialize)
389 .Select(property => new ConnectionStringProperty(property))390 .Select(property => new ConnectionStringProperty(property))
390 .ToArray();391 .ToArray();
@@ -394,7 +395,8 @@ namespace GSF.Configuration · 3 unmodified lines
394 {395 {
395 SerializeSettingAttribute attribute;396 SerializeSettingAttribute attribute;
396 397
397 return t.GetProperties()398 return t.GetProperties(BindingFlags.Public | BindingFlags.Instance)
399 .Where(property => property.CanRead && property.CanWrite)
398 .Where(property => property.TryGetAttribute(out attribute) && attribute.Serialize)400 .Where(property => property.TryGetAttribute(out attribute) && attribute.Serialize)
399 .Select(property => new ConnectionStringProperty(property))401 .Select(property => new ConnectionStringProperty(property))
400 .ToArray();402 .ToArray();
@@ -457,7 +459,8 @@ namespace GSF.Configuration · 56 unmodified lines
457 {459 {
458 TParameterAttribute attribute;460 TParameterAttribute attribute;
459 461
460 return t.GetProperties()462 return t.GetProperties(BindingFlags.Public | BindingFlags.Instance)
463 .Where(property => property.CanRead && property.CanWrite)
461 .Where(property => property.TryGetAttribute(out attribute))464 .Where(property => property.TryGetAttribute(out attribute))
462 .Select(property => new ConnectionStringProperty(property))465 .Select(property => new ConnectionStringProperty(property))
463 .ToArray();466 .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