History

1) Removed warnings occuring from new code additions. 2) More reorganization and code clean-up. 3) Globally applied static Endian order classes where possible.

ritchiecarroll committed 12 years ago

Commit 51177ba1 parent 0465735147 files · +968 −906Browse files

Unified · Split

147 files
  1. Source/Applications/Wave Demo Apps/WavSubscriptionDemo/AudioPlayback.cs +2 −2
  2. Source/GridSolutionsFramework.sln +64 −61
  3. Source/Libraries/Adapters/AdoAdapters/AdoInputAdapter.cs +6 −6
  4. Source/Libraries/Adapters/AdoAdapters/AdoOutputAdapter.cs +2 −2
  5. Source/Libraries/Adapters/DataQualityMonitoring/Services/AlarmService.cs +1 −1
  6. Source/Libraries/Adapters/FileAdapters/FileBlockReader.cs +2 −2
  7. Source/Libraries/Adapters/FileAdapters/FileBlockWriter.cs +2 −2
  8. Source/Libraries/Adapters/PIAdapters/PIPBInputAdapter.cs +1 −1
  9. Source/Libraries/Adapters/PIAdapters/PIRTInputAdapter.cs +1 −1
  10. Source/Libraries/GSF.COMTRADE/Parser.cs +4 −4
  11. Source/Libraries/GSF.COMTRADE/Writer.cs +5 −5
  12. Source/Libraries/GSF.Communication/Payload.cs +1 −1
  13. Source/Libraries/GSF.Communication/Radius/RadiusPacket.cs +16 −24
  14. Source/Libraries/GSF.Communication/Radius/RadiusPacketAttribute.cs +2 −2
  15. Source/Libraries/GSF.Communication/TcpClient.cs +1 −1
  16. Source/Libraries/GSF.Communication/TcpServer.cs +1 −1
  17. Source/Libraries/GSF.Communication/TlsClient.cs +4 −4
  18. Source/Libraries/GSF.Communication/TlsServer.cs +4 −4
  19. Source/Libraries/GSF.Core/Collections/ListCollection.cs +84 −55
  20. Source/Libraries/GSF.Core/Configuration/ConnectionStringParser.cs +3 −3
  21. Source/Libraries/GSF.Core/EndianOrder.cs +14 −10
  22. Source/Libraries/GSF.Core/GuidExtensions.cs +52 −58
  23. Source/Libraries/GSF.Core/IO/Compression/PatternCompressor.cs +4 −4
  24. Source/Libraries/GSF.Core/IO/Compression/PatternDecompressor.cs +2 −2
  25. Source/Libraries/GSF.Core/IO/StreamExtensions.cs +1 −1
  26. Source/Libraries/GSF.Core/Identity/UserAccountControl.cs +1 −1
  27. Source/Libraries/GSF.Core/Parsing/BinaryImageParserBase.cs +5 −1
  28. Source/Libraries/GSF.Core/Parsing/CommonHeaderBase.cs +1 −1
  29. Source/Libraries/GSF.Core/Parsing/IBinaryImageParser.cs +10 −3
  30. Source/Libraries/GSF.Core/Parsing/ISupportBinaryImage.cs +2 −2
  31. Source/Libraries/GSF.Core/Parsing/ISupportSourceIdentifiableFrameImage.cs +3 −2
  32. Source/Libraries/GSF.Core/Parsing/MultiSourceFrameImageParserBase.cs +18 −25
  33. Source/Libraries/GSF.Core/Threading/ThreadContainerBase.cs +2 −0
  34. Source/Libraries/GSF.Historian/DataServices/MetadataService.cs +3 −3
  35. Source/Libraries/GSF.Historian/DataServices/TimeSeriesDataService.cs +2 −2
  36. Source/Libraries/GSF.Historian/Files/ArchiveDataBlockPointer.cs +4 −4
  37. Source/Libraries/GSF.Historian/Files/ArchiveDataPoint.cs +6 −6
  38. Source/Libraries/GSF.Historian/Files/ArchiveFileAllocationTable.cs +18 −18
  39. Source/Libraries/GSF.Historian/Files/IntercomRecord.cs +10 −10
  40. Source/Libraries/GSF.Historian/Files/MetadataRecord.cs +36 −36
  41. Source/Libraries/GSF.Historian/Files/MetadataRecordAnalogFields.cs +21 −21
  42. Source/Libraries/GSF.Historian/Files/MetadataRecordComposedFields.cs +20 −20
  43. Source/Libraries/GSF.Historian/Files/MetadataRecordConstantFields.cs +4 −4
  44. Source/Libraries/GSF.Historian/Files/MetadataRecordDigitalFields.cs +4 −4
  45. Source/Libraries/GSF.Historian/Files/MetadataRecordSummary.cs +18 −18
  46. Source/Libraries/GSF.Historian/Files/StateRecord.cs +7 −7
  47. Source/Libraries/GSF.Historian/Files/StateRecordDataPoint.cs +3 −3
  48. Source/Libraries/GSF.Historian/Files/StateRecordSummary.cs +3 −3
  49. Source/Libraries/GSF.Historian/Packets/PacketCommonHeader.cs +1 −1
  50. Source/Libraries/GSF.Historian/Packets/PacketType1.cs +10 −10
  51. Source/Libraries/GSF.Historian/Packets/PacketType101.cs +4 −4
  52. Source/Libraries/GSF.Historian/Packets/PacketType101DataPoint.cs +8 −8
  53. Source/Libraries/GSF.Historian/Packets/PacketType2.cs +18 −18
  54. Source/Libraries/GSF.Historian/Packets/PacketType5.cs +2 −2
  55. Source/Libraries/GSF.Historian/Packets/QueryPacketBase.cs +6 −6
  56. Source/Libraries/GSF.Media/RiffChunk.cs +3 −3
  57. Source/Libraries/GSF.Media/RiffHeaderChunk.cs +1 −1
  58. Source/Libraries/GSF.Media/WaveDataChunk.cs +1 −1
  59. Source/Libraries/GSF.Media/WaveFormatChunk.cs +15 −15
  60. Source/Libraries/GSF.Media/WaveFormatExtensible.cs +6 −6
  61. Source/Libraries/GSF.PQDIF/Physical/ScalarElement.cs +26 −26
  62. Source/Libraries/GSF.PQDIF/Physical/VectorElement.cs +14 −14
  63. Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/CommonFrameHeader.cs +17 −17
  64. Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/ConfigurationCell.cs +4 −4
  65. Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/ConfigurationFrame.cs +10 −10
  66. Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/DataCell.cs +3 −3
  67. Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/DataFrame.cs +10 −10
  68. Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/FrequencyValue.cs +2 −2
  69. Source/Libraries/GSF.PhasorProtocols/ConfigurationCellBase.cs +1 −1
  70. Source/Libraries/GSF.PhasorProtocols/FrameParserBase.cs +8 −5
  71. Source/Libraries/GSF.PhasorProtocols/IFrameParser.cs +1 −1
  72. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/AnalogDefinition.cs +2 −2
  73. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/CommandFrame.cs +1 −1
  74. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/Common.cs +5 −5
  75. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/CommonFrameHeader.cs +23 −23
  76. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/ConfigurationCell.cs +12 −12
  77. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/ConfigurationFrame.cs +6 −6
  78. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/DataFrame.cs +2 −2
  79. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/DigitalDefinition.cs +4 −4
  80. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/FrequencyDefinition.cs +2 −2
  81. Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/PhasorDefinition.cs +2 −2
  82. Source/Libraries/GSF.PhasorProtocols/Ieee1344/CommandFrame.cs +5 −5
  83. Source/Libraries/GSF.PhasorProtocols/Ieee1344/CommonFrameHeader.cs +6 −6
  84. Source/Libraries/GSF.PhasorProtocols/Ieee1344/ConfigurationCell.cs +8 −8
  85. Source/Libraries/GSF.PhasorProtocols/Ieee1344/ConfigurationFrame.cs +2 −2
  86. Source/Libraries/GSF.PhasorProtocols/Ieee1344/DigitalDefinition.cs +2 −2
  87. Source/Libraries/GSF.PhasorProtocols/Ieee1344/FrequencyDefinition.cs +2 −2
  88. Source/Libraries/GSF.PhasorProtocols/Ieee1344/FrequencyValue.cs +4 −4
  89. Source/Libraries/GSF.PhasorProtocols/Ieee1344/PhasorDefinition.cs +2 −2
  90. Source/Libraries/GSF.PhasorProtocols/IeeeC37_118/ConfigurationCell3.cs +25 −25
  91. Source/Libraries/GSF.PhasorProtocols/IeeeC37_118/ConfigurationFrame3.cs +3 −3
  92. Source/Libraries/GSF.PhasorProtocols/IeeeC37_118/FrameParser.cs +1 −1
  93. Source/Libraries/GSF.PhasorProtocols/Macrodyne/CommandFrame.cs +1 −1
  94. Source/Libraries/GSF.PhasorProtocols/Macrodyne/CommonFrameHeader.cs +3 −3
  95. Source/Libraries/GSF.PhasorProtocols/Macrodyne/ConfigurationFrame.cs +2 −2
  96. Source/Libraries/GSF.PhasorProtocols/Macrodyne/DataCell.cs +5 −5
  97. Source/Libraries/GSF.PhasorProtocols/Macrodyne/FrequencyValue.cs +1 −1
  98. Source/Libraries/GSF.PhasorProtocols/SelFastMessage/CommandFrame.cs +3 −3
  99. Source/Libraries/GSF.PhasorProtocols/SelFastMessage/CommonFrameHeader.cs +7 −7
  100. Source/Libraries/GSF.PhasorProtocols/SelFastMessage/DataCell.cs +1 −1
  101. Source/Libraries/GSF.PhasorProtocols/SelFastMessage/FrequencyValue.cs +2 −2
  102. Source/Libraries/GSF.PhasorProtocols/SelFastMessage/PhasorValue.cs +4 −4
  103. Source/Libraries/GSF.PhasorProtocols/UI/DataModels/CalculatedMeasurement.cs +1 −1
  104. Source/Libraries/GSF.PhasorProtocols/UI/DataModels/Device.cs +1 −1
  105. Source/Libraries/GSF.PhasorProtocols/UI/DataModels/InputWizardDevice.cs +2 −2
  106. Source/Libraries/GSF.PhasorProtocols/UI/DataModels/Phasor.cs +1 −1
  107. Source/Libraries/GSF.ServiceModel/Service.cs +3 −2
  108. Source/Libraries/GSF.ServiceProcess/ClientInfo.cs +1 −1
  109. Source/Libraries/GSF.ServiceProcess/ClientRequest.cs +1 −1
  110. Source/Libraries/GSF.ServiceProcess/ServiceHelper.cs +1 −1
  111. Source/Libraries/GSF.TimeSeries/Adapters/AdapterBase.cs +2 −2
  112. Source/Libraries/GSF.TimeSeries/Adapters/AdapterCollectionBase.cs +3 −3
  113. Source/Libraries/GSF.TimeSeries/Adapters/FacileActionAdapterBase.cs +3 −3
  114. Source/Libraries/GSF.TimeSeries/Adapters/InputAdapterBase.cs +2 −2
  115. Source/Libraries/GSF.TimeSeries/Adapters/OutputAdapterBase.cs +3 −3
  116. Source/Libraries/GSF.TimeSeries/ConcentratorBase.cs +7 −7
  117. Source/Libraries/GSF.TimeSeries/Configuration/BinaryFileConfigurationLoader.cs +2 −0
  118. Source/Libraries/GSF.TimeSeries/Configuration/WebServiceConfigurationLoader.cs +2 −0
  119. Source/Libraries/GSF.TimeSeries/Configuration/XMLConfigurationLoader.cs +2 −0
  120. Source/Libraries/GSF.TimeSeries/FrameQueue.cs +5 −1
  121. Source/Libraries/GSF.TimeSeries/IMeasurement.cs +1 −1
  122. Source/Libraries/GSF.TimeSeries/Measurement.cs +1 −1
  123. Source/Libraries/GSF.TimeSeries/MeasurementKey.cs +1 −1
  124. Source/Libraries/GSF.TimeSeries/ServiceHostBase.cs +17 −6
  125. Source/Libraries/GSF.TimeSeries/TrackingFrame.cs +1 −1
  126. Source/Libraries/GSF.TimeSeries/Transport/ClientConnection.cs +4 −4
  127. Source/Libraries/GSF.TimeSeries/Transport/CompactMeasurement.cs +12 −12
  128. Source/Libraries/GSF.TimeSeries/Transport/DataPublisher.cs +11 −11
  129. Source/Libraries/GSF.TimeSeries/Transport/DataSubscriber.cs +17 −17
  130. Source/Libraries/GSF.TimeSeries/Transport/SerializableMeasurement.cs +18 −16
  131. Source/Libraries/GSF.TimeSeries/Transport/SignalIndexCache.cs +14 −12
  132. Source/Libraries/GSF.TimeSeries/Transport/SynchronizedClientSubscription.cs +3 −3
  133. Source/Libraries/GSF.TimeSeries/Transport/UnsynchronizedClientSubscription.cs +6 −6
  134. Source/Libraries/GSF.TimeSeries/UI/CommonFunctions.cs +1 −1
  135. Source/Libraries/GSF.TimeSeries/UI/Converters/DictionaryToKeyValuePairConverter.cs +2 −2
  136. Source/Libraries/GSF.TimeSeries/UI/Converters/IndexToBooleanConverter.cs +3 −3
  137. Source/Libraries/GSF.TimeSeries/UI/Converters/ObjectToVisibilityConverter.cs +1 −1
  138. Source/Libraries/GSF.TimeSeries/UI/Converters/RoleBasedVisibilityConverter.cs +2 −2
  139. Source/Libraries/GSF.TimeSeries/UI/Converters/StringToBooleanConverter.cs +1 −1
  140. Source/Libraries/GSF.TimeSeries/UI/Converters/StringToStatusColorConverter.cs +1 −1
  141. Source/Libraries/GSF.TimeSeries/UI/DataModels/Measurement.cs +1 −1
  142. Source/Libraries/GSF.Web/Embedded/SecurityPortal.aspx.cs +1 −1
  143. Source/Libraries/GSF.Windows/Forms/AboutDialog.cs +1 −1
  144. Source/Libraries/GSF.Windows/Forms/SecureForm.cs +1 −1
  145. Source/Libraries/Hadoop.Replication/HadoopReplicationProvider.cs +1 −1
  146. Source/Libraries/Tests/GSF.Core.Tests/EndianOrderTest.cs +3 −0
  147. Source/Libraries/Tests/GSF.Core.Tests/GuidExtensionsTest.cs +2 −1
Source/Applications/Wave Demo Apps/WavSubscriptionDemo/AudioPlayback.cs+2−2
@@ -696,7 +696,7 @@ namespace NAudioWpfDemo · 695 unmodified lines
696696
697697 // Assuming 16-bit integer samples for WAV files
698698 if (sample[i] != null)
699− channelValue = EndianOrder.LittleEndian.GetBytes((short)sample[i].Value);
699+ channelValue = LittleEndian.GetBytes((short)sample[i].Value);
700700 else
701701 channelValue = new byte[2];
702702
@@ -737,7 +737,7 @@ namespace NAudioWpfDemo · 34 unmodified lines
737737 }
738738 finally
739739 {
740− if (buffer != null)
740+ if ((object)buffer != null)
741741 BufferPool.ReturnBuffer(buffer);
742742 }
743743 }
Source/GridSolutionsFramework.sln+64−61
@@ -259,6 +259,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{06 · 258 unmodified lines
259259 EndProject
260260 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "File", "File", "{198CE128-2E28-4591-91C1-C83176C3BE51}"
261261 EndProject
262+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Structured Data Encoding", "Structured Data Encoding", "{E4120DD8-64F7-4D60-8B41-F2FDC27CC708}"
263+EndProject
262264 Global
263265 GlobalSection(TeamFoundationVersionControl) = preSolution
264266 SccNumberOfProjects = 81
@@ -1451,6 +1453,7 @@ Global · 1186 unmodified lines
14511453 {00B924AB-0DC8-4826-8A63-3263E39C2EBF} = {13006BBE-434A-4027-940B-EAD752844137}
14521454 {6DCB8ABF-D899-41A9-BBCD-556590754175} = {13006BBE-434A-4027-940B-EAD752844137}
14531455 {D429E017-FC8B-4077-8CEB-CCA277008091} = {13006BBE-434A-4027-940B-EAD752844137}
1456+ {B3986636-8741-4D97-AE46-2A5BA1338B41} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14541457 {FF3FCBA6-F01A-4EC2-BC3F-6BA832AFCF88} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14551458 {2B2EB9BE-E6A9-406F-BFE6-FF46DD6BD264} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14561459 {4060E729-EFFD-4E50-A0D5-99C0990EF7DA} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
@@ -1459,15 +1462,30 @@ Global · 2 unmodified lines
14591462 {2E23E926-CF64-4607-BDE1-1B2FC76F4919} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14601463 {0501C2DC-3428-4413-AE92-F0D82FF3DBBC} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14611464 {EA70C8AA-60DE-4FFD-B1D9-B5406395B1AF} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
1465+ {99F344EA-D35D-42C8-882B-B495527B5F40} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14621466 {0F8E8EFC-E7C7-4843-8EE6-8C7C7353892A} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14631467 {72713097-3BE3-4FA7-97B5-7EC3A2BA8316} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
1464− {DE23EEF6-EE66-42DE-81B0-890B3A77B83C} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
14651468 {78C67B09-D6EB-4A79-A591-47146025A277} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
1466− {99F344EA-D35D-42C8-882B-B495527B5F40} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
1467− {B3986636-8741-4D97-AE46-2A5BA1338B41} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
1468− {6BFB4BFD-6906-4E92-8078-3AB5641AAFAB} = {1C4124EF-0F9C-47B9-B1CB-B2CA39AB0E57}
1469+ {DE23EEF6-EE66-42DE-81B0-890B3A77B83C} = {D7805B20-D771-4546-90DD-CD98C4BA4436}
1470+ {1B63485E-46C7-4185-B968-216A02396B88} = {0C19430B-01AC-4184-ACDA-6DE690649CD8}
1471+ {7C825A52-3ADB-40BD-8D49-1519A4D534A1} = {0C19430B-01AC-4184-ACDA-6DE690649CD8}
1472+ {B48642A1-1163-4E1D-948A-50EE19DCD38D} = {0C19430B-01AC-4184-ACDA-6DE690649CD8}
1473+ {B15B1BEF-7631-43C0-B048-AD51692FD0C7} = {1B63485E-46C7-4185-B968-216A02396B88}
1474+ {129F9272-157F-4A37-B0A4-0F9E5E4A0FE6} = {1B63485E-46C7-4185-B968-216A02396B88}
1475+ {933BE44C-B124-4ACC-8BE8-A6A22AAC4413} = {1B63485E-46C7-4185-B968-216A02396B88}
1476+ {07016E6A-01B1-4B3D-B1D6-F9131A1BEB6E} = {1B63485E-46C7-4185-B968-216A02396B88}
1477+ {2E9DA7CC-960A-40A6-BC90-1FBD7B7994F0} = {1B63485E-46C7-4185-B968-216A02396B88}
1478+ {E349DD08-3707-4542-8ED3-BB9E106FE6FB} = {1B63485E-46C7-4185-B968-216A02396B88}
1479+ {7D81CF8E-6F49-4AF8-B039-9C3210140194} = {1B63485E-46C7-4185-B968-216A02396B88}
1480+ {1B3CA936-9D8A-4B40-8B08-E98AA2375E69} = {1B63485E-46C7-4185-B968-216A02396B88}
1481+ {252A5667-C00C-4427-A5E8-2EB4886877C4} = {1B63485E-46C7-4185-B968-216A02396B88}
1482+ {3029C3DC-E302-46E5-8126-8082B6EC1C1A} = {1B63485E-46C7-4185-B968-216A02396B88}
1483+ {35027A69-1A76-4312-B57B-F5826F0B87AF} = {1B63485E-46C7-4185-B968-216A02396B88}
1484+ {1C4124EF-0F9C-47B9-B1CB-B2CA39AB0E57} = {B15B1BEF-7631-43C0-B048-AD51692FD0C7}
1485+ {C00E78E4-081D-409A-ABB2-EA9FC50EE51E} = {B15B1BEF-7631-43C0-B048-AD51692FD0C7}
14691486 {216C7D13-CB2B-4E98-87D5-D8CA53FE97F7} = {1C4124EF-0F9C-47B9-B1CB-B2CA39AB0E57}
14701487 {D04BF4AB-96CB-4671-B1D3-41700F554C78} = {1C4124EF-0F9C-47B9-B1CB-B2CA39AB0E57}
1488+ {6BFB4BFD-6906-4E92-8078-3AB5641AAFAB} = {1C4124EF-0F9C-47B9-B1CB-B2CA39AB0E57}
14711489 {10184FDE-42E4-4BC5-ADDC-F211D25FD94C} = {F06A2E20-D5DD-4B88-9ABC-CEE7245829E3}
14721490 {044C17D3-DEC9-4A57-9B4F-3664393C888E} = {F06A2E20-D5DD-4B88-9ABC-CEE7245829E3}
14731491 {CC2B0A07-3D70-4261-A96E-D5A747A7B74F} = {F06A2E20-D5DD-4B88-9ABC-CEE7245829E3}
@@ -1479,77 +1497,62 @@ Global · 5 unmodified lines
14791497 {D405B0BE-88EE-4224-AA8C-4A6817481C17} = {F06A2E20-D5DD-4B88-9ABC-CEE7245829E3}
14801498 {4093E2B8-2948-468F-94B2-B2EF815E1A1B} = {C00E78E4-081D-409A-ABB2-EA9FC50EE51E}
14811499 {9512CFD3-76D7-4C42-8DB6-B848600303C3} = {C00E78E4-081D-409A-ABB2-EA9FC50EE51E}
1500+ {2E8D7CE0-8816-4893-848B-05E2A38FE898} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
1501+ {412F9F59-D9B9-4C8E-96D2-20492644198C} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
1502+ {F3B5720A-27E0-46C7-A9E1-A91B9D18F59A} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
1503+ {2A542BE8-8D17-44C3-BCD2-768DF480FF82} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
14821504 {BB0CAA29-229E-4648-80A0-1474B3A0FACF} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1505+ {198CE128-2E28-4591-91C1-C83176C3BE51} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1506+ {51797AFD-D313-4E14-A3E9-531F28C698C2} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
14831507 {A04A48C2-112D-4EE3-A6B0-3784A1315BCF} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
14841508 {374F5805-28DB-4BCA-8062-BF802793BD4F} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1509+ {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
14851510 {69846364-E3F5-4086-B9FE-D447BB7E56C3} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1486− {51797AFD-D313-4E14-A3E9-531F28C698C2} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1487− {CD3C7F74-B7F2-422F-8417-1E9045155352} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
14881511 {917EA50B-D09B-4B96-B8DD-5D91C7DFBF38} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1489− {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1490− {198CE128-2E28-4591-91C1-C83176C3BE51} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1491− {7C825A52-3ADB-40BD-8D49-1519A4D534A1} = {0C19430B-01AC-4184-ACDA-6DE690649CD8}
1492− {1B63485E-46C7-4185-B968-216A02396B88} = {0C19430B-01AC-4184-ACDA-6DE690649CD8}
1493− {B48642A1-1163-4E1D-948A-50EE19DCD38D} = {0C19430B-01AC-4184-ACDA-6DE690649CD8}
1512+ {CD3C7F74-B7F2-422F-8417-1E9045155352} = {2E8D7CE0-8816-4893-848B-05E2A38FE898}
1513+ {40FACE0F-06DF-474C-A87C-59C8EAC0B3F8} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1514+ {08F5CCE4-10C4-477C-B5C9-37F7D49748BC} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1515+ {43A322EE-37D2-4B13-BA16-023E88772F8D} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1516+ {7B0EEB2B-6F25-4D59-A15D-F39EA9DC94D3} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1517+ {A8861372-0FE2-45E5-9DED-73B55AC4196C} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1518+ {AF33B063-D523-493E-951A-29C930A49002} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1519+ {5E1CD41C-6CB0-45D1-AA73-191A36028CE7} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1520+ {B74CF4DA-2972-489B-AF08-419560EE57EF} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1521+ {C4F3C41D-D76A-4283-8732-681B67B7AD74} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1522+ {AD054F7A-C944-4BA3-8CD8-CA275184BD33} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1523+ {1FEC4033-C80F-4CF1-835C-BBEE0E7F6803} = {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5}
1524+ {C4145EB5-FEF9-4419-AC5E-31D4F23AD311} = {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5}
1525+ {383F4F83-8228-4B9A-9757-250043B6E30B} = {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5}
1526+ {26F261F8-8660-46D3-8090-BCDA9EFF5427} = {917EA50B-D09B-4B96-B8DD-5D91C7DFBF38}
1527+ {3F0B62F6-99B8-4F57-8C58-0B4B862358EA} = {917EA50B-D09B-4B96-B8DD-5D91C7DFBF38}
14941528 {5E75D20E-228E-4ACC-B73D-E9471D9E0852} = {7C825A52-3ADB-40BD-8D49-1519A4D534A1}
14951529 {D78C3B1B-F673-45EB-86CB-93DCB4572905} = {7C825A52-3ADB-40BD-8D49-1519A4D534A1}
1496− {7E1ABF87-8936-44E5-85C0-37044E0D3877} = {F3B5720A-27E0-46C7-A9E1-A91B9D18F59A}
1497− {B561487F-79CC-4982-848E-C12F44B4669C} = {F3B5720A-27E0-46C7-A9E1-A91B9D18F59A}
1498− {F68BED5B-410C-4D02-87C0-8AC74E374821} = {78C67B09-D6EB-4A79-A591-47146025A277}
1499− {7FB89A9F-D6FD-46CD-960A-7A9E90D82C2C} = {78C67B09-D6EB-4A79-A591-47146025A277}
1500− {9B93C212-786C-45C9-9B90-8CEFD24EF19D} = {F68BED5B-410C-4D02-87C0-8AC74E374821}
1501− {B4B5A12E-412E-4382-B991-3B67653F533C} = {F68BED5B-410C-4D02-87C0-8AC74E374821}
1502− {2C42B95F-A58A-413D-97E2-1968C087C472} = {F68BED5B-410C-4D02-87C0-8AC74E374821}
1503− {B3FBA8D6-7C89-4FE9-8E90-F617604A7C3C} = {7FB89A9F-D6FD-46CD-960A-7A9E90D82C2C}
1504− {74B3264B-4740-4C2F-9DCB-373FDCD3A848} = {7FB89A9F-D6FD-46CD-960A-7A9E90D82C2C}
1505− {54CA98CC-2F0A-41F2-879D-0E42B17E8544} = {7FB89A9F-D6FD-46CD-960A-7A9E90D82C2C}
1506− {4F46CF24-163D-4541-9EBF-C291053C0948} = {99F344EA-D35D-42C8-882B-B495527B5F40}
1530+ {DEAE7327-1628-4D6D-B682-257335B86B22} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1531+ {FC5B2769-89FD-420B-9722-D6E0B029ABDD} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1532+ {DCFB7880-2C6B-41D0-B603-661BCE089DD7} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1533+ {C6631FD6-24F9-402D-BFE3-FEB3F780BA6A} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1534+ {4508009C-7011-4981-B35F-594F42CC0D1F} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
15071535 {AEB62271-270D-4F3E-B596-2297B382A95F} = {99F344EA-D35D-42C8-882B-B495527B5F40}
1508− {A818C4B5-52B5-4E12-917E-4854C9AB4EF3} = {4F46CF24-163D-4541-9EBF-C291053C0948}
1509− {57261E91-7636-4F92-8D93-744A4AAD7EB0} = {4F46CF24-163D-4541-9EBF-C291053C0948}
1536+ {4F46CF24-163D-4541-9EBF-C291053C0948} = {99F344EA-D35D-42C8-882B-B495527B5F40}
15101537 {94F36768-E9A0-4783-BB0F-8C2C1771352E} = {AEB62271-270D-4F3E-B596-2297B382A95F}
15111538 {134819C5-C1BB-4ED1-BE23-49AB5FB33744} = {AEB62271-270D-4F3E-B596-2297B382A95F}
15121539 {7ED01B57-DD71-4A38-BB29-65D629224A12} = {AEB62271-270D-4F3E-B596-2297B382A95F}
15131540 {5AF0D55A-30BF-46A5-8A47-FA885F56BFEF} = {AEB62271-270D-4F3E-B596-2297B382A95F}
1514− {35027A69-1A76-4312-B57B-F5826F0B87AF} = {1B63485E-46C7-4185-B968-216A02396B88}
1515− {129F9272-157F-4A37-B0A4-0F9E5E4A0FE6} = {1B63485E-46C7-4185-B968-216A02396B88}
1516− {E349DD08-3707-4542-8ED3-BB9E106FE6FB} = {1B63485E-46C7-4185-B968-216A02396B88}
1517− {933BE44C-B124-4ACC-8BE8-A6A22AAC4413} = {1B63485E-46C7-4185-B968-216A02396B88}
1518− {3029C3DC-E302-46E5-8126-8082B6EC1C1A} = {1B63485E-46C7-4185-B968-216A02396B88}
1519− {07016E6A-01B1-4B3D-B1D6-F9131A1BEB6E} = {1B63485E-46C7-4185-B968-216A02396B88}
1520− {2E9DA7CC-960A-40A6-BC90-1FBD7B7994F0} = {1B63485E-46C7-4185-B968-216A02396B88}
1521− {1B3CA936-9D8A-4B40-8B08-E98AA2375E69} = {1B63485E-46C7-4185-B968-216A02396B88}
1522− {252A5667-C00C-4427-A5E8-2EB4886877C4} = {1B63485E-46C7-4185-B968-216A02396B88}
1523− {7D81CF8E-6F49-4AF8-B039-9C3210140194} = {1B63485E-46C7-4185-B968-216A02396B88}
1524− {B15B1BEF-7631-43C0-B048-AD51692FD0C7} = {1B63485E-46C7-4185-B968-216A02396B88}
1525− {DCFB7880-2C6B-41D0-B603-661BCE089DD7} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1526− {4508009C-7011-4981-B35F-594F42CC0D1F} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1527− {DEAE7327-1628-4D6D-B682-257335B86B22} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1528− {C6631FD6-24F9-402D-BFE3-FEB3F780BA6A} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1529− {FC5B2769-89FD-420B-9722-D6E0B029ABDD} = {B48642A1-1163-4E1D-948A-50EE19DCD38D}
1530− {C00E78E4-081D-409A-ABB2-EA9FC50EE51E} = {B15B1BEF-7631-43C0-B048-AD51692FD0C7}
1531− {1C4124EF-0F9C-47B9-B1CB-B2CA39AB0E57} = {B15B1BEF-7631-43C0-B048-AD51692FD0C7}
1532− {412F9F59-D9B9-4C8E-96D2-20492644198C} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
1533− {F3B5720A-27E0-46C7-A9E1-A91B9D18F59A} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
1534− {2E8D7CE0-8816-4893-848B-05E2A38FE898} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
1535− {2A542BE8-8D17-44C3-BCD2-768DF480FF82} = {B3986636-8741-4D97-AE46-2A5BA1338B41}
1536− {C4F3C41D-D76A-4283-8732-681B67B7AD74} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1537− {B74CF4DA-2972-489B-AF08-419560EE57EF} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1538− {AF33B063-D523-493E-951A-29C930A49002} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1539− {5E1CD41C-6CB0-45D1-AA73-191A36028CE7} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1540− {AD054F7A-C944-4BA3-8CD8-CA275184BD33} = {51797AFD-D313-4E14-A3E9-531F28C698C2}
1541+ {B561487F-79CC-4982-848E-C12F44B4669C} = {F3B5720A-27E0-46C7-A9E1-A91B9D18F59A}
1542+ {7E1ABF87-8936-44E5-85C0-37044E0D3877} = {F3B5720A-27E0-46C7-A9E1-A91B9D18F59A}
15411543 {8A1BCFAA-19E8-408A-8C72-170B1211DC27} = {CD3C7F74-B7F2-422F-8417-1E9045155352}
15421544 {8BDA86DB-B944-4880-9D97-E4FF04577C03} = {CD3C7F74-B7F2-422F-8417-1E9045155352}
15431545 {3FD4D092-3E0F-41C1-BE8A-E0A924E76039} = {CD3C7F74-B7F2-422F-8417-1E9045155352}
1544− {26F261F8-8660-46D3-8090-BCDA9EFF5427} = {917EA50B-D09B-4B96-B8DD-5D91C7DFBF38}
1545− {3F0B62F6-99B8-4F57-8C58-0B4B862358EA} = {917EA50B-D09B-4B96-B8DD-5D91C7DFBF38}
1546− {1FEC4033-C80F-4CF1-835C-BBEE0E7F6803} = {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5}
1547− {383F4F83-8228-4B9A-9757-250043B6E30B} = {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5}
1548− {C4145EB5-FEF9-4419-AC5E-31D4F23AD311} = {06BCB1F6-1992-4B1B-A98F-4F4EA04441B5}
1549− {7B0EEB2B-6F25-4D59-A15D-F39EA9DC94D3} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1550− {A8861372-0FE2-45E5-9DED-73B55AC4196C} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1551− {08F5CCE4-10C4-477C-B5C9-37F7D49748BC} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1552− {43A322EE-37D2-4B13-BA16-023E88772F8D} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1553− {40FACE0F-06DF-474C-A87C-59C8EAC0B3F8} = {198CE128-2E28-4591-91C1-C83176C3BE51}
1546+ {7FB89A9F-D6FD-46CD-960A-7A9E90D82C2C} = {78C67B09-D6EB-4A79-A591-47146025A277}
1547+ {F68BED5B-410C-4D02-87C0-8AC74E374821} = {78C67B09-D6EB-4A79-A591-47146025A277}
1548+ {E4120DD8-64F7-4D60-8B41-F2FDC27CC708} = {78C67B09-D6EB-4A79-A591-47146025A277}
1549+ {74B3264B-4740-4C2F-9DCB-373FDCD3A848} = {7FB89A9F-D6FD-46CD-960A-7A9E90D82C2C}
1550+ {54CA98CC-2F0A-41F2-879D-0E42B17E8544} = {7FB89A9F-D6FD-46CD-960A-7A9E90D82C2C}
1551+ {57261E91-7636-4F92-8D93-744A4AAD7EB0} = {4F46CF24-163D-4541-9EBF-C291053C0948}
1552+ {A818C4B5-52B5-4E12-917E-4854C9AB4EF3} = {4F46CF24-163D-4541-9EBF-C291053C0948}
1553+ {2C42B95F-A58A-413D-97E2-1968C087C472} = {F68BED5B-410C-4D02-87C0-8AC74E374821}
1554+ {B4B5A12E-412E-4382-B991-3B67653F533C} = {F68BED5B-410C-4D02-87C0-8AC74E374821}
1555+ {9B93C212-786C-45C9-9B90-8CEFD24EF19D} = {F68BED5B-410C-4D02-87C0-8AC74E374821}
1556+ {B3FBA8D6-7C89-4FE9-8E90-F617604A7C3C} = {E4120DD8-64F7-4D60-8B41-F2FDC27CC708}
15541557 EndGlobalSection
15551558 EndGlobal
Source/Libraries/Adapters/AdoAdapters/AdoInputAdapter.cs+6−6
@@ -403,7 +403,7 @@ namespace AdoAdapters · 402 unmodified lines
403403 if (data.Read(buffer, 0, 4) != 4)
404404 throw new EndOfStreamException();
405405
406− signalIndexCacheImageSize = EndianOrder.LittleEndian.ToInt32(buffer, 0);
406+ signalIndexCacheImageSize = LittleEndian.ToInt32(buffer, 0);
407407
408408 // Resize buffer to accomodate exact signal index cache
409409 buffer = new byte[signalIndexCacheImageSize];
@@ -419,13 +419,13 @@ namespace AdoAdapters · 9 unmodified lines
419419 if (data.Read(buffer, 0, 4) != 4)
420420 throw new EndOfStreamException();
421421
422− compactMeasurementSize = EndianOrder.LittleEndian.ToInt32(buffer, 0);
422+ compactMeasurementSize = LittleEndian.ToInt32(buffer, 0);
423423
424424 // Read the total number of compact measurements from the file
425425 if (data.Read(buffer, 0, 4) != 4)
426426 throw new EndOfStreamException();
427427
428− totalMeasurements = EndianOrder.LittleEndian.ToInt32(buffer, 0);
428+ totalMeasurements = LittleEndian.ToInt32(buffer, 0);
429429
430430 // Resize buffer to accomodate compact measurement if needed (not likely)
431431 if (buffer.Length < compactMeasurementSize)
@@ -608,16 +608,16 @@ namespace AdoAdapters · 176 unmodified lines
608608 int compactMeasurementSize = (new CompactMeasurement(signalIndexCache)).BinaryLength;
609609
610610 // Write the signal index cache image size to the file
611− data.Write(EndianOrder.LittleEndian.GetBytes(signalIndexCacheImage.Length), 0, 4);
611+ data.Write(LittleEndian.GetBytes(signalIndexCacheImage.Length), 0, 4);
612612
613613 // Write the signal index cache image to the file
614614 data.Write(signalIndexCacheImage, 0, signalIndexCacheImage.Length);
615615
616616 // Write the size of each compact measurement to the file
617− data.Write(EndianOrder.LittleEndian.GetBytes(compactMeasurementSize), 0, 4);
617+ data.Write(LittleEndian.GetBytes(compactMeasurementSize), 0, 4);
618618
619619 // Write the total number of compact measurements to the file
620− data.Write(EndianOrder.LittleEndian.GetBytes(m_dbMeasurements.Count), 0, 4);
620+ data.Write(LittleEndian.GetBytes(m_dbMeasurements.Count), 0, 4);
621621
622622 // Write each compact measurement image to the file
623623 for (int i = 0; i < m_dbMeasurements.Count; i++)
Source/Libraries/Adapters/AdoAdapters/AdoOutputAdapter.cs+2−2
@@ -266,7 +266,7 @@ namespace AdoAdapters · 265 unmodified lines
266266 }
267267
268268 // Get bulk insert limit
269− if(settings.TryGetValue("bulkInsertLimit", out setting))
269+ if (settings.TryGetValue("bulkInsertLimit", out setting))
270270 m_bulkInsertLimit = int.Parse(setting);
271271 else
272272 m_bulkInsertLimit = 1024;
@@ -407,7 +407,7 @@ namespace AdoAdapters · 134 unmodified lines
407407 if (valuesBuilder.Length > 0)
408408 valuesBuilder.Append(',');
409409
410− if (value == null)
410+ if ((object)value == null)
411411 {
412412 valuesBuilder.Append("NULL");
413413 continue;
Source/Libraries/Adapters/DataQualityMonitoring/Services/AlarmService.cs+1−1
@@ -72,7 +72,7 @@ namespace DataQualityMonitoring.Services · 71 unmodified lines
7272 }
7373 set
7474 {
75− if (value == null)
75+ if ((object)value == null)
7676 throw new ArgumentNullException("value");
7777
7878 m_alarmAdapter = value;
Source/Libraries/Adapters/FileAdapters/FileBlockReader.cs+2−2
@@ -635,9 +635,9 @@ namespace FileAdapters · 634 unmodified lines
635635
636636 // Copy file info into the buffer
637637 fileNameByteLength = Encoding.Unicode.GetByteCount(fileInfo.Name);
638− EndianOrder.BigEndian.CopyBytes(fileNameByteLength, buffer, 1);
638+ BigEndian.CopyBytes(fileNameByteLength, buffer, 1);
639639 Encoding.Unicode.GetBytes(fileInfo.Name, 0, fileInfo.Name.Length, buffer, 5);
640− EndianOrder.BigEndian.CopyBytes(fileInfo.Length, buffer, 5 + fileNameByteLength);
640+ BigEndian.CopyBytes(fileInfo.Length, buffer, 5 + fileNameByteLength);
641641 bytesRead = 1 + 4 + fileNameByteLength + 8;
642642
643643 // Wait for lock to open the file
Source/Libraries/Adapters/FileAdapters/FileBlockWriter.cs+2−2
@@ -180,9 +180,9 @@ namespace FileAdapters · 179 unmodified lines
180180 if (bufferBlock[0] != 0)
181181 {
182182 // Start of a new file - read file info
183− int fileNameByteLength = EndianOrder.BigEndian.ToInt32(bufferBlock, 1);
183+ int fileNameByteLength = BigEndian.ToInt32(bufferBlock, 1);
184184 string fileName = Encoding.Unicode.GetString(bufferBlock, 5, fileNameByteLength);
185− long fileSize = EndianOrder.BigEndian.ToInt64(bufferBlock, 5 + fileNameByteLength);
185+ long fileSize = BigEndian.ToInt64(bufferBlock, 5 + fileNameByteLength);
186186
187187 // Notify of new file creation
188188 OnStatusMessage("Now writing to file {0}...", fileName);
Source/Libraries/Adapters/PIAdapters/PIPBInputAdapter.cs+1−1
@@ -122,7 +122,7 @@ namespace PIAdapters · 121 unmodified lines
122122 {
123123 base.RequestedOutputMeasurementKeys = value;
124124
125− if (value != null)
125+ if ((object)value != null)
126126 HandleNewMeasurementsRequest(value);
127127 }
128128 }
Source/Libraries/Adapters/PIAdapters/PIRTInputAdapter.cs+1−1
@@ -160,7 +160,7 @@ namespace PIAdapters · 159 unmodified lines
160160 set
161161 {
162162 base.RequestedOutputMeasurementKeys = value;
163− if (value != null && value.Any())
163+ if ((object)value != null && value.Any())
164164 HandleNewMeasurementsRequest(value);
165165 }
166166 }
Source/Libraries/GSF.COMTRADE/Parser.cs+4−4
@@ -355,7 +355,7 @@ namespace GSF.COMTRADE · 354 unmodified lines
355355 int index = 0;
356356
357357 // Read sample index
358− uint sample = EndianOrder.LittleEndian.ToUInt32(buffer, index);
358+ uint sample = LittleEndian.ToUInt32(buffer, index);
359359 index += 4;
360360
361361 // Get timestamp of this record
@@ -372,7 +372,7 @@ namespace GSF.COMTRADE · 10 unmodified lines
372372 }
373373
374374 // Read microsecond timestamp
375− uint microseconds = EndianOrder.LittleEndian.ToUInt32(buffer, index);
375+ uint microseconds = LittleEndian.ToUInt32(buffer, index);
376376 index += 4;
377377
378378 // Fall back on specified microsecond time
@@ -383,7 +383,7 @@ namespace GSF.COMTRADE · 4 unmodified lines
383383 for (int i = 0; i < m_schema.AnalogChannels.Length; i++)
384384 {
385385 // Read next value
386− m_values[i] = EndianOrder.LittleEndian.ToInt16(buffer, index) * m_schema.AnalogChannels[i].Multiplier + m_schema.AnalogChannels[i].Adder;
386+ m_values[i] = LittleEndian.ToInt16(buffer, index) * m_schema.AnalogChannels[i].Multiplier + m_schema.AnalogChannels[i].Adder;
387387 index += 2;
388388 }
389389
@@ -394,7 +394,7 @@ namespace GSF.COMTRADE · 4 unmodified lines
394394 for (int i = 0; i < digitalWords; i++)
395395 {
396396 // Read next digital word
397− digitalWord = EndianOrder.LittleEndian.ToUInt16(buffer, index);
397+ digitalWord = LittleEndian.ToUInt16(buffer, index);
398398 index += 2;
399399
400400 // Distribute each bit of digital word through next 16 digital values
Source/Libraries/GSF.COMTRADE/Writer.cs+5−5
@@ -412,8 +412,8 @@ namespace GSF.COMTRADE · 411 unmodified lines
412412 double value;
413413 bool isFirstDigital = true;
414414
415− output.Write(EndianOrder.LittleEndian.GetBytes(sample), 0, 4);
416− output.Write(EndianOrder.LittleEndian.GetBytes(microseconds), 0, 4);
415+ output.Write(LittleEndian.GetBytes(sample), 0, 4);
416+ output.Write(LittleEndian.GetBytes(microseconds), 0, 4);
417417
418418 for (int i = 0; i < values.Length; i++)
419419 {
@@ -430,15 +430,15 @@ namespace GSF.COMTRADE · 10 unmodified lines
430430 isFirstDigital = false;
431431
432432 if (injectFracSecValue)
433− output.Write(EndianOrder.LittleEndian.GetBytes(fracSecValue), 0, 2);
433+ output.Write(LittleEndian.GetBytes(fracSecValue), 0, 2);
434434 }
435435
436− output.Write(EndianOrder.LittleEndian.GetBytes((ushort)value), 0, 2);
436+ output.Write(LittleEndian.GetBytes((ushort)value), 0, 2);
437437 }
438438
439439 // Make sure FRACSEC values are injected
440440 if (isFirstDigital && injectFracSecValue)
441− output.Write(EndianOrder.LittleEndian.GetBytes(fracSecValue), 0, 2);
441+ output.Write(LittleEndian.GetBytes(fracSecValue), 0, 2);
442442 }
443443 }
444444 }
Source/Libraries/GSF.Communication/Payload.cs+1−1
@@ -73,7 +73,7 @@ namespace GSF.Communication · 72 unmodified lines
7373 Buffer.BlockCopy(marker, 0, result, 0, marker.Length);
7474
7575 // Then, copy the payload's size to the buffer after the payload marker
76− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(length), 0, result, marker.Length, LengthSegment);
76+ Buffer.BlockCopy(LittleEndian.GetBytes(length), 0, result, marker.Length, LengthSegment);
7777
7878 // At last, copy the payload after the payload marker and payload size
7979 Buffer.BlockCopy(buffer, offset, result, marker.Length + LengthSegment, length);
Source/Libraries/GSF.Communication/Radius/RadiusPacket.cs+16−24
@@ -208,10 +208,10 @@ namespace GSF.Communication.Radius · 207 unmodified lines
208208 }
209209 set
210210 {
211− if (value == null)
211+ if ((object)value == null)
212212 throw new ArgumentNullException("value");
213213
214− if (value == null || value.Length != 16)
214+ if ((object)value == null || value.Length != 16)
215215 throw new ArgumentException("Value must 16-byte long.");
216216
217217 m_authenticator = value;
@@ -263,7 +263,7 @@ namespace GSF.Communication.Radius · 45 unmodified lines
263263 /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is null.</exception>
264264 public int ParseBinaryImage(byte[] buffer, int startIndex, int length)
265265 {
266− if (buffer == null)
266+ if ((object)buffer == null)
267267 throw new ArgumentNullException("buffer");
268268
269269 int imageLength = BinaryLength;
@@ -289,11 +289,9 @@ namespace GSF.Communication.Radius · 19 unmodified lines
289289
290290 return imageLength;
291291 }
292− else
293− {
294− // Binary image does not have sufficient data.
295− return 0;
296− }
292+
293+ // Binary image does not have sufficient data.
294+ return 0;
297295 }
298296
299297 /// <summary>
@@ -393,7 +391,7 @@ namespace GSF.Communication.Radius · 93 unmodified lines
393391 // where:
394392 // Code, Identifier, Length & Attributes are from the response RADIUS packet
395393 // Request Authenticator is from the request RADIUS packet
396− // Shared Secret is the shared secret ket
394+ // Shared Secret is the shared secret key
397395 int length = responsePacket.BinaryLength;
398396 byte[] sharedSecretBytes = Encoding.GetBytes(sharedSecret);
399397 byte[] buffer = BufferPool.TakeBuffer(length + sharedSecretBytes.Length);
@@ -408,7 +406,7 @@ namespace GSF.Communication.Radius · 8 unmodified lines
408406 }
409407 finally
410408 {
411− if (buffer != null)
409+ if ((object)buffer != null)
412410 BufferPool.ReturnBuffer(buffer);
413411 }
414412 }
@@ -423,21 +421,15 @@ namespace GSF.Communication.Radius · 8 unmodified lines
423421 public static byte[] EncryptPassword(string password, string sharedSecret, byte[] requestAuthenticator)
424422 {
425423 // Avoiding Null Dereferences
426− if ((string.IsNullOrEmpty(sharedSecret)))
427− {
428− throw new ArgumentException("Shared secret cannot be null or empty.");
429− }
424+ if (string.IsNullOrEmpty(sharedSecret))
425+ throw new ArgumentException("Shared secret cannot be null or empty.");
430426
431− if ((string.IsNullOrEmpty(password)))
432− {
427+ if (string.IsNullOrEmpty(password))
433428 throw new ArgumentException("Password cannot be null or empty.");
434− }
435429
436430 if ((object)requestAuthenticator == null)
437− {
438431 throw new ArgumentException("Request authenticator cannot be null.");
439− }
440−
432+
441433 // Max length of the password can be 130 according to RFC 2865. Since 128 is the closest multiple
442434 // of 16 (password segment length), we allow the password to be no longer than 128 characters.
443435 if (password.Length <= 128)
@@ -479,8 +471,10 @@ namespace GSF.Communication.Radius · 35 unmodified lines
479471 // For passwords that are more than 16 characters in length, each consecutive 16-byte
480472 // segment of the password is XORed with MD5 hash value that's computed as follows:
481473 // MD5(Shared secret key + XOR bytes used in the previous segment)
474+ // ReSharper disable once PossibleNullReferenceException
482475 Buffer.BlockCopy(xorBytes, 0, md5HashInputBytes, sharedSecretBytes.Length, xorBytes.Length);
483476 }
477+
484478 xorBytes = md5Provider.ComputeHash(md5HashInputBytes);
485479
486480 // XOR the password bytes in the current segment with the XOR bytes.
@@ -492,10 +486,8 @@ namespace GSF.Communication.Radius · 5 unmodified lines
492486
493487 return result;
494488 }
495− else
496− {
497− throw new ArgumentException("Password can be a maximum of 128 characters in length.");
498− }
489+
490+ throw new ArgumentException("Password can be a maximum of 128 characters in length.");
499491 }
500492
501493 #endregion
Source/Libraries/GSF.Communication/Radius/RadiusPacketAttribute.cs+2−2
@@ -323,7 +323,7 @@ namespace GSF.Communication.Radius · 322 unmodified lines
323323 set
324324 {
325325 // By definition, attribute value cannot be null or zero-length.
326− if (value == null || value.Length == 0)
326+ if ((object)value == null || value.Length == 0)
327327 throw new ArgumentNullException("value");
328328
329329 m_value = value;
@@ -359,7 +359,7 @@ namespace GSF.Communication.Radius · 29 unmodified lines
359359 /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is null.</exception>
360360 public int ParseBinaryImage(byte[] buffer, int startIndex, int length)
361361 {
362− if (buffer == null)
362+ if ((object)buffer == null)
363363 throw new ArgumentNullException("buffer");
364364
365365 int imageLength = BinaryLength;
Source/Libraries/GSF.Communication/TcpClient.cs+1−1
@@ -301,7 +301,7 @@ namespace GSF.Communication · 300 unmodified lines
301301 }
302302 set
303303 {
304− if (value == null || value.Length == 0)
304+ if ((object)value == null || value.Length == 0)
305305 throw new ArgumentNullException("value");
306306
307307 m_payloadMarker = value;
Source/Libraries/GSF.Communication/TcpServer.cs+1−1
@@ -301,7 +301,7 @@ namespace GSF.Communication · 300 unmodified lines
301301 }
302302 set
303303 {
304− if (value == null || value.Length == 0)
304+ if ((object)value == null || value.Length == 0)
305305 throw new ArgumentNullException("value");
306306
307307 m_payloadMarker = value;
Source/Libraries/GSF.Communication/TlsClient.cs+4−4
@@ -23,9 +23,6 @@ · 22 unmodified lines
2323 //
2424 //******************************************************************************************************
2525
26−using GSF.Configuration;
27−using GSF.IO;
28−using GSF.Net.Security;
2926 using System;
3027 using System.Collections.Concurrent;
3128 using System.Collections.Generic;
@@ -39,6 +36,9 @@ using System.Security.Authentication; · 7 unmodified lines
3936 using System.Security.Cryptography.X509Certificates;
4037 using System.Text.RegularExpressions;
4138 using System.Threading;
39+using GSF.Configuration;
40+using GSF.IO;
41+using GSF.Net.Security;
4242
4343 namespace GSF.Communication
4444 {
@@ -215,7 +215,7 @@ namespace GSF.Communication · 170 unmodified lines
215215 }
216216 set
217217 {
218− if (value == null || value.Length == 0)
218+ if ((object)value == null || value.Length == 0)
219219 throw new ArgumentNullException("value");
220220
221221 m_payloadMarker = value;
Source/Libraries/GSF.Communication/TlsServer.cs+4−4
@@ -23,9 +23,6 @@ · 22 unmodified lines
2323 //
2424 //******************************************************************************************************
2525
26−using GSF.Configuration;
27−using GSF.IO;
28−using GSF.Net.Security;
2926 using System;
3027 using System.Collections.Concurrent;
3128 using System.Collections.Generic;
@@ -39,6 +36,9 @@ using System.Security.Authentication; · 7 unmodified lines
3936 using System.Security.Cryptography.X509Certificates;
4037 using System.Security.Principal;
4138 using System.Threading;
39+using GSF.Configuration;
40+using GSF.IO;
41+using GSF.Net.Security;
4242
4343 #if MONO
4444 #pragma warning disable 649
@@ -251,7 +251,7 @@ namespace GSF.Communication · 206 unmodified lines
251251 }
252252 set
253253 {
254− if (value == null || value.Length == 0)
254+ if ((object)value == null || value.Length == 0)
255255 throw new ArgumentNullException("value");
256256
257257 m_payloadMarker = value;
Source/Libraries/GSF.Core/Collections/ListCollection.cs+84−55
@@ -22,40 +22,48 @@ · 21 unmodified lines
2222 //******************************************************************************************************
2323
2424 using System;
25−using System.Collections;
2625 using System.Collections.Generic;
2726 using System.Collections.ObjectModel;
2827
2928 namespace GSF.Collections
3029 {
3130 /// <summary>
32− /// An faster and functionally equivalent implementation of <see cref="Collection{T}"/>
31+ /// A faster and functionally equivalent implementation of <see cref="Collection{T}"/>
3332 /// </summary>
3433 /// <typeparam name="T">The type of the element in the collection</typeparam>
3534 /// <remarks>
35+ /// <para>
3636 /// <see cref="Collection{T}"/> is based upon an <see cref="IList{T}"/>. This means any simple call
37− /// to the class is a function call that cannot be inlined. This implementation forces the underlying
37+ /// to the class is a function call that cannot be in-lined. This implementation forces the underlying
3838 /// item to be <see cref="List{T}"/> and shadows many of the methods to call <see cref="List{T}"/>
3939 /// instead of <see cref="IList{T}"/>.
40− ///
40+ /// </para>
41+ /// <para>
4142 /// Since this class references the same underlying <see cref="List{T}"/> object, it can be
4243 /// successfully implemented as a <see cref="ListCollection{T}"/> or casted it its underlying type
4344 /// <see cref="Collection{T}"/>.
44− ///
45+ /// </para>
46+ /// <para>
4547 /// Profiling this class yield a ForEach loop and For loop that executes between
4648 /// 2-4 times faster than <see cref="Collection{T}"/>. This depends on the number of items in the
4749 /// list. The fewer the faster. Other operations such as Add/Insert/Remove are closer to 50% faster.
48− /// Count is now inlined (~20 times faster).
49− ///
50+ /// Count is now in-lined (~20 times faster).
51+ /// </para>
52+ /// <para>
5053 /// This performance is negated if accessing this class via the IList interface. When possible, use
5154 /// only strongly typed names.
55+ /// </para>
5256 /// </remarks>
53− public class ListCollection<T> : Collection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
57+ public class ListCollection<T> : Collection<T>
5458 {
55− /// <summary>
56− /// A strongly typed reference of <see cref="Item"/>
57− /// </summary>
58− private readonly List<T> m_list;
59+ #region [ Members ]
60+
61+ // Fields
62+ private readonly List<T> m_list; // Strongly typed reference to Items collection
63+
64+ #endregion
65+
66+ #region [ Constructors ]
5967
6068 /// <summary>
6169 /// Creates a <see cref="ListCollection{T}"/>
@@ -75,12 +83,15 @@ namespace GSF.Collections · 13 unmodified lines
7583 {
7684 }
7785
86+ #endregion
87+
88+ #region [ Properties ]
7889
7990 /// <summary>
80− /// Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
91+ /// Gets the number of elements contained in the <see cref="ICollection{T}"/>.
8192 /// </summary>
8293 /// <returns>
83− /// The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
94+ /// The number of elements contained in the <see cref="ICollection{T}"/>.
8495 /// </returns>
8596 public new int Count
8697 {
@@ -97,10 +108,8 @@ namespace GSF.Collections · 10 unmodified lines
97108 /// The element at the specified index.
98109 /// </returns>
99110 /// <param name="index">The zero-based index of the element to get or set.</param>
100− /// <exception cref="T:System.ArgumentOutOfRangeException">
101− /// <paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>. </exception>
102− /// <exception cref="T:System.NotSupportedException">
103− /// The property is set and the <see cref="T:System.Collections.Generic.IList`1"/> is read-only. </exception>
111+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="IList{T}"/>.</exception>
112+ /// <exception cref="NotSupportedException">The property is set and the <see cref="IList{T}"/> is read-only.</exception>
104113 public new T this[int index]
105114 {
106115 get
@@ -111,16 +120,16 @@ namespace GSF.Collections · 4 unmodified lines
111120 {
112121 if (index < 0 || index >= m_list.Count)
113122 ThrowOutOfRangeException();
123+
114124 SetItem(index, value);
115125 }
116126 }
117127
118128 /// <summary>
119− /// Gets a <see cref="T:System.Collections.Generic.IList`1"/> wrapper around the <see cref="T:System.Collections.ObjectModel.Collection`1"/>.
129+ /// Gets a <see cref="IList{T}"/> wrapper around the <see cref="Collection{T}"/>.
120130 /// </summary>
121− ///
122131 /// <returns>
123− /// A <see cref="T:System.Collections.Generic.IList`1"/> wrapper around the <see cref="T:System.Collections.ObjectModel.Collection`1"/>.
132+ /// A <see cref="IList{T}"/> wrapper around the <see cref="Collection{T}"/>.
124133 /// </returns>
125134 protected new List<T> Items
126135 {
@@ -130,28 +139,31 @@ namespace GSF.Collections · 3 unmodified lines
130139 }
131140 }
132141
142+ #endregion
143+
144+ #region [ Methods ]
133145
134146 /// <summary>
135− /// Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"/>.
147+ /// Adds an item to the <see cref="ICollection{T}"/>.
136148 /// </summary>
137− /// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
138− /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
149+ /// <param name="item">The object to add to the <see cref="ICollection{T}"/>.</param>
150+ /// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception>
139151 public new void Add(T item)
140152 {
141153 InsertItem(m_list.Count, item);
142154 }
143155
144156 /// <summary>
145− /// Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
157+ /// Removes all items from the <see cref="ICollection{T}"/>.
146158 /// </summary>
147− /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. </exception>
159+ /// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only. </exception>
148160 public new void Clear()
149161 {
150162 ClearItems();
151163 }
152164
153165 /// <summary>
154− /// Removes all elements from the <see cref="T:System.Collections.ObjectModel.Collection`1"/>.
166+ /// Removes all elements from the <see cref="Collection{T}"/>.
155167 /// </summary>
156168 protected override void ClearItems()
157169 {
@@ -159,33 +171,37 @@ namespace GSF.Collections · 1 unmodified line
159171 }
160172
161173 /// <summary>
162− /// Determines whether the <see cref="T:System.Collections.Generic.ICollection`1"/> contains a specific value.
174+ /// Determines whether the <see cref="ICollection{T}"/> contains a specific value.
163175 /// </summary>
164176 /// <returns>
165− /// true if <paramref name="item"/> is found in the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false.
177+ /// true if <paramref name="item"/> is found in the <see cref="ICollection{T}"/>; otherwise, false.
166178 /// </returns>
167− /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
179+ /// <param name="item">The object to locate in the <see cref="ICollection{T}"/>.</param>
168180 public new bool Contains(T item)
169181 {
170182 return m_list.Contains(item);
171183 }
172184
173185 /// <summary>
174− /// Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
186+ /// Copies the elements of the <see cref="ICollection{T}"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index.
175187 /// </summary>
176− /// <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>.
177− /// The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="index">The zero-based index in
178− /// <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than 0.</exception><exception cref="T:System.ArgumentException">The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="index"/> to the end of the destination <paramref name="array"/>.</exception>
188+ /// <param name="array">
189+ /// The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection{T}"/>.
190+ /// The <see cref="Array"/> must have zero-based indexing.</param><param name="index">The zero-based index in <paramref name="array"/> at which copying begins.
191+ /// </param>
192+ /// <exception cref="ArgumentNullException"><paramref name="array"/> is null.</exception>
193+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is less than 0.</exception>
194+ /// <exception cref="ArgumentException">The number of elements in the source <see cref="ICollection{T}"/> is greater than the available space from <paramref name="index"/> to the end of the destination <paramref name="array"/>.</exception>
179195 public new void CopyTo(T[] array, int index)
180196 {
181197 m_list.CopyTo(array, index);
182198 }
183199
184200 /// <summary>
185− /// Returns an enumerator that iterates through the <see cref="T:System.Collections.ObjectModel.Collection`1"/>.
201+ /// Returns an enumerator that iterates through the <see cref="Collection{T}"/>.
186202 /// </summary>
187203 /// <returns>
188− /// An <see cref="T:System.Collections.Generic.IEnumerator`1"/> for the <see cref="T:System.Collections.ObjectModel.Collection`1"/>.
204+ /// An <see cref="IEnumerator{T}"/> for the <see cref="Collection{T}"/>.
189205 /// </returns>
190206 public new List<T>.Enumerator GetEnumerator()
191207 {
@@ -193,70 +209,81 @@ namespace GSF.Collections · 1 unmodified line
193209 }
194210
195211 /// <summary>
196− /// Determines the index of a specific item in the <see cref="T:System.Collections.Generic.IList`1"/>.
212+ /// Determines the index of a specific item in the <see cref="IList{T}"/>.
197213 /// </summary>
198214 /// <returns>
199215 /// The index of <paramref name="item"/> if found in the list; otherwise, -1.
200216 /// </returns>
201− /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.IList`1"/>.</param>
217+ /// <param name="item">The object to locate in the <see cref="IList{T}"/>.</param>
202218 public new int IndexOf(T item)
203219 {
204220 return m_list.IndexOf(item);
205221 }
206222
207223 /// <summary>
208− /// Inserts an item to the <see cref="T:System.Collections.Generic.IList`1"/> at the specified index.
224+ /// Inserts an item to the <see cref="IList{T}"/> at the specified index.
209225 /// </summary>
210− /// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param><param name="item">The object to insert into the <see cref="T:System.Collections.Generic.IList`1"/>.</param><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>.</exception><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.IList`1"/> is read-only.</exception>
226+ /// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
227+ /// <param name="item">The object to insert into the <see cref="IList{T}"/>.</param>
228+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="IList{T}"/>.</exception>
229+ /// <exception cref="NotSupportedException">The <see cref="IList{T}"/> is read-only.</exception>
211230 public new void Insert(int index, T item)
212231 {
213232 if (index < 0 || index > m_list.Count)
214233 ThrowOutOfRangeException();
234+
215235 InsertItem(index, item);
216236 }
217237
218238 /// <summary>
219− /// Inserts an element into the <see cref="T:System.Collections.ObjectModel.Collection`1"/> at the specified index.
239+ /// Inserts an element into the <see cref="Collection{T}"/> at the specified index.
220240 /// </summary>
221− /// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param><param name="item">The object to insert. The value can be null for reference types.</param><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count"/>.</exception>
241+ /// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
242+ /// <param name="item">The object to insert. The value can be null for reference types.</param>
243+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is greater than <see cref="Collection{T}.Count"/>.</exception>
222244 protected override void InsertItem(int index, T item)
223245 {
224246 m_list.Insert(index, item);
225247 }
226248
227249 /// <summary>
228− /// Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
250+ /// Removes the first occurrence of a specific object from the <see cref="ICollection{T}"/>.
229251 /// </summary>
230252 /// <returns>
231− /// true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>.
253+ /// true if <paramref name="item"/> was successfully removed from the <see cref="ICollection{T}"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="ICollection{T}"/>.
232254 /// </returns>
233− /// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
255+ /// <param name="item">The object to remove from the <see cref="ICollection{T}"/>.</param>
256+ /// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception>
234257 public new bool Remove(T item)
235258 {
236259 int index = m_list.IndexOf(item);
260+
237261 if (index < 0)
238− {
239262 return false;
240− }
263+
241264 RemoveItem(index);
265+
242266 return true;
243267 }
244268
245269 /// <summary>
246− /// Removes the element at the specified index of the <see cref="T:System.Collections.ObjectModel.Collection`1"/>.
270+ /// Removes the element at the specified index of the <see cref="Collection{T}"/>.
247271 /// </summary>
248− /// <param name="index">The zero-based index of the element to remove.</param><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is equal to or greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count"/>.</exception>
272+ /// <param name="index">The zero-based index of the element to remove.</param>
273+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is equal to or greater than <see cref="Collection{T}.Count"/>.</exception>
249274 public new void RemoveAt(int index)
250275 {
251276 if (index < 0 || index >= m_list.Count)
252277 ThrowOutOfRangeException();
278+
253279 RemoveItem(index);
254280 }
255281
256282 /// <summary>
257− /// Removes the element at the specified index of the <see cref="T:System.Collections.ObjectModel.Collection`1"/>.
283+ /// Removes the element at the specified index of the <see cref="Collection{T}"/>.
258284 /// </summary>
259− /// <param name="index">The zero-based index of the element to remove.</param><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is equal to or greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count"/>.</exception>
285+ /// <param name="index">The zero-based index of the element to remove.</param>
286+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is equal to or greater than <see cref="Collection{T}.Count"/>.</exception>
260287 protected override void RemoveItem(int index)
261288 {
262289 m_list.RemoveAt(index);
@@ -265,18 +292,20 @@ namespace GSF.Collections · 2 unmodified lines
265292 /// <summary>
266293 /// Replaces the element at the specified index.
267294 /// </summary>
268− /// <param name="index">The zero-based index of the element to replace.</param><param name="item">The new value for the element at the specified index. The value can be null for reference types.</param><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count"/>.</exception>
295+ /// <param name="index">The zero-based index of the element to replace.</param>
296+ /// <param name="item">The new value for the element at the specified index. The value can be null for reference types.</param>
297+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.-or-<paramref name="index"/> is greater than <see cref="Collection{T}.Count"/>.</exception>
269298 protected override void SetItem(int index, T item)
270299 {
271300 m_list[index] = item;
272301 }
273302
274−
275− void ThrowOutOfRangeException()
303+ private static void ThrowOutOfRangeException()
276304 {
305+ // ReSharper disable once NotResolvedInText
277306 throw new ArgumentOutOfRangeException("index");
278307 }
279308
309+ #endregion
280310 }
281−
282311 }
Source/Libraries/GSF.Core/Configuration/ConnectionStringParser.cs+3−3
@@ -62,7 +62,7 @@ namespace GSF.Configuration · 61 unmodified lines
6262 /// The name of the property as it appears in the connection string.
6363 /// </summary>
6464 public string[] Names;
65−
65+
6666 /// <summary>
6767 /// The default value of the property if its value
6868 /// is not explicitly specified in the connection string.
@@ -275,7 +275,7 @@ namespace GSF.Configuration · 206 unmodified lines
275275 Dictionary<string, string> settings;
276276
277277 // Null objects don't have properties
278− if (settingsObject == null)
278+ if ((object)settingsObject == null)
279279 return string.Empty;
280280
281281 // Get the set of properties which are part of the connection string
@@ -307,7 +307,7 @@ namespace GSF.Configuration · 25 unmodified lines
307307 string value;
308308
309309 // Null objects don't have properties
310− if (settingsObject == null)
310+ if ((object)settingsObject == null)
311311 throw new ArgumentNullException("settingsObject", "Unable to parse connection string because settings object is invalid.");
312312
313313 // Get the set of properties which are part of the connection string
Source/Libraries/GSF.Core/EndianOrder.cs+14−10
@@ -71,6 +71,7 @@ · 70 unmodified lines
7171 //#define ForceBigEndianTesting
7272
7373 using System;
74+using System.ComponentModel;
7475 using System.Diagnostics.CodeAnalysis;
7576
7677 namespace GSF
@@ -388,7 +389,7 @@ namespace GSF · 311 unmodified lines
388389 [SuppressMessage("Microsoft.Performance", "CA1822")]
389390 public bool ToBoolean(byte[] value, int startIndex)
390391 {
391− if (value == null)
392+ if ((object)value == null)
392393 throw new ArgumentNullException("value");
393394
394395 return value[startIndex] != 0;
@@ -431,7 +432,7 @@ namespace GSF · 36 unmodified lines
431432 /// <exception cref="ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
432433 public short ToInt16(byte[] value, int startIndex)
433434 {
434− if (value == null)
435+ if ((object)value == null)
435436 throw new ArgumentNullException("value");
436437
437438 if (m_targetIsLittleEndian)
@@ -467,7 +468,7 @@ namespace GSF · 29 unmodified lines
467468 /// <exception cref="ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
468469 public unsafe int ToInt32(byte[] value, int startIndex)
469470 {
470− if (value == null)
471+ if ((object)value == null)
471472 throw new ArgumentNullException("value");
472473
473474 if (startIndex < 0)
@@ -504,7 +505,7 @@ namespace GSF · 30 unmodified lines
504505 /// <exception cref="ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
505506 public unsafe long ToInt64(byte[] value, int startIndex)
506507 {
507− if (value == null)
508+ if ((object)value == null)
508509 throw new ArgumentNullException("value");
509510
510511 if (startIndex < 0)
@@ -618,6 +619,7 @@ namespace GSF · 107 unmodified lines
618619 /// <exception cref="ArgumentNullException">value is null.</exception>
619620 /// <exception cref="ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
620621 [Obsolete("This method may be removed from future builds", false)]
622+ [EditorBrowsable(EditorBrowsableState.Never)]
621623 public Guid ToGuid(byte[] value, int startIndex)
622624 {
623625 if (TargetEndianness == Endianness.BigEndian)
@@ -849,12 +851,13 @@ namespace GSF · 225 unmodified lines
849851 /// <param name="value">The number to convert.</param>
850852 /// <returns>An array of bytes with length 16.</returns>
851853 [Obsolete("This method may be removed from future builds", false)]
854+ [EditorBrowsable(EditorBrowsableState.Never)]
852855 public byte[] GetBytes(Guid value)
853856 {
854857 if (TargetEndianness == Endianness.BigEndian)
855858 return GuidExtensions.__ToBigEndianOrderBytes(value);
856− else
857− return GuidExtensions.__ToLittleEndianOrderBytes(value);
859+
860+ return GuidExtensions.__ToLittleEndianOrderBytes(value);
858861 }
859862
860863 /// <summary>
@@ -910,7 +913,7 @@ namespace GSF · 49 unmodified lines
910913 /// <returns>Length of bytes copied into array based on size of <paramref name="value"/>.</returns>
911914 public int CopyBytes(bool value, byte[] destinationArray, int destinationIndex)
912915 {
913− if (destinationArray == null)
916+ if ((object)destinationArray == null)
914917 throw new ArgumentNullException("destinationArray");
915918
916919 if (value)
@@ -954,7 +957,7 @@ namespace GSF · 37 unmodified lines
954957 /// <returns>Length of bytes copied into array based on size of <paramref name="value"/>.</returns>
955958 public int CopyBytes(short value, byte[] destinationArray, int destinationIndex)
956959 {
957− if (destinationArray == null)
960+ if ((object)destinationArray == null)
958961 throw new ArgumentNullException("destinationArray");
959962
960963 if (m_targetIsLittleEndian)
@@ -993,7 +996,7 @@ namespace GSF · 32 unmodified lines
993996 /// <returns>Length of bytes copied into array based on size of <paramref name="value"/>.</returns>
994997 public unsafe int CopyBytes(int value, byte[] destinationArray, int destinationIndex)
995998 {
996− if (destinationArray == null)
999+ if ((object)destinationArray == null)
9971000 throw new ArgumentNullException("destinationArray");
9981001
9991002 if (destinationIndex < 0)
@@ -1036,7 +1039,7 @@ namespace GSF · 36 unmodified lines
10361039 /// <returns>Length of bytes copied into array based on size of <paramref name="value"/>.</returns>
10371040 public unsafe int CopyBytes(long value, byte[] destinationArray, int destinationIndex)
10381041 {
1039− if (destinationArray == null)
1042+ if ((object)destinationArray == null)
10401043 throw new ArgumentNullException("destinationArray");
10411044
10421045 if (destinationIndex < 0)
@@ -1147,6 +1150,7 @@ namespace GSF · 104 unmodified lines
11471150 /// <param name="destinationIndex">The byte offset into <paramref name="destinationArray"/>.</param>
11481151 /// <returns>Length of bytes copied into array based on size of <paramref name="value"/>.</returns>
11491152 [Obsolete("This method may be removed from future builds", false)]
1153+ [EditorBrowsable(EditorBrowsableState.Never)]
11501154 public int CopyBytes(Guid value, byte[] destinationArray, int destinationIndex)
11511155 {
11521156 if (TargetEndianness == Endianness.BigEndian)
Source/Libraries/GSF.Core/GuidExtensions.cs+52−58
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 //******************************************************************************************************
2323
2424 using System;
25+using System.ComponentModel;
2526
2627 namespace GSF
2728 {
@@ -30,44 +31,46 @@ namespace GSF · 2 unmodified lines
3031 /// </summary>
3132 public unsafe static class GuidExtensions
3233 {
33−
3434 /// <summary>
3535 /// Encodes a <see cref="Guid"/> following RFC 4122.
3636 /// </summary>
37− /// <param name="guid">the <see cref="Guid"/> to serialize</param>
38− /// <param name="buffer">where to store the <see cref="guid"/></param>
39− /// <param name="startingIndex">the starting index in <see cref="buffer"/></param>
37+ /// <param name="guid">The <see cref="Guid"/> to serialize.</param>
38+ /// <param name="buffer">Destination buffer to hold serialized <paramref name="guid"/>.</param>
39+ /// <param name="startingIndex">Starting index in <paramref name="buffer"/>.</param>
4040 public static int ToRfcBytes(this Guid guid, byte[] buffer, int startingIndex)
4141 {
42− //Since Microsoft is not very clear how Guid.ToByteArray() performs on big endian processors
43− //we are assuming that the internal structure of a Guid will always be the same. Reviewing mono source code
44− //the internal stucture is also the same.
45−
42+ // Since Microsoft is not very clear how Guid.ToByteArray() performs on big endian processors
43+ // we are assuming that the internal structure of a Guid will always be the same. Reviewing
44+ // mono source code the internal structure is also the same.
4645 buffer.ValidateParameters(startingIndex, 16);
4746
4847 byte* src = (byte*)&guid;
48+
4949 fixed (byte* dst = &buffer[startingIndex])
5050 {
5151 if (BitConverter.IsLittleEndian)
5252 {
53− //Guid._a (int)
53+ // Guid._a (int)
5454 dst[0] = src[3];
5555 dst[1] = src[2];
5656 dst[2] = src[1];
5757 dst[3] = src[0];
58− //Guid._b (short)
58+
59+ // Guid._b (short)
5960 dst[4] = src[5];
6061 dst[5] = src[4];
61− //Guid._c (short)
62+
63+ // Guid._c (short)
6264 dst[6] = src[7];
6365 dst[7] = src[6];
64− //Guid._d - Guid._k (8 bytes)
65− //Since already encoded as big endian, just copy the data.
66+
67+ // Guid._d - Guid._k (8 bytes)
68+ // Since already encoded as big endian, just copy the data
6669 *(long*)(dst + 8) = *(long*)(src + 8);
6770 }
6871 else
6972 {
70− //all fields are encoded big-endian. Just copy.
73+ // All fields are encoded big-endian, just copy
7174 *(long*)(dst + 0) = *(long*)(src + 0);
7275 *(long*)(dst + 8) = *(long*)(src + 8);
7376 }
@@ -78,8 +81,8 @@ namespace GSF · 4 unmodified lines
7881 /// <summary>
7982 /// Encodes a <see cref="Guid"/> following RFC 4122.
8083 /// </summary>
81− /// <param name="guid">the <see cref="Guid"/> to serialize</param>
82− /// <returns>A <see cref="byte"/>[] that represents a big endian encoded Guid.</returns>
84+ /// <param name="guid"><see cref="Guid"/> to serialize.</param>
85+ /// <returns>A <see cref="byte"/> array that represents a big-endian encoded <see cref="Guid"/>.</returns>
8386 public static byte[] ToRfcBytes(this Guid guid)
8487 {
8588 byte[] rv = new byte[16];
@@ -90,8 +93,8 @@ namespace GSF · 4 unmodified lines
9093 /// <summary>
9194 /// Decodes a <see cref="Guid"/> following RFC 4122
9295 /// </summary>
93− /// <param name="buffer">where to read the <see cref="Guid"/>.</param>
94− /// <returns></returns>
96+ /// <param name="buffer">Buffer containing a serialized big-endian encoded <see cref="Guid"/>.</param>
97+ /// <returns><see cref="Guid"/> deserialized from <paramref name="buffer"/>.</returns>
9598 public static Guid ToRfcGuid(this byte[] buffer)
9699 {
97100 return buffer.ToRfcGuid(0);
@@ -100,40 +103,44 @@ namespace GSF · 2 unmodified lines
100103 /// <summary>
101104 /// Decodes a <see cref="Guid"/> following RFC 4122
102105 /// </summary>
103− /// <param name="buffer">where to read the <see cref="Guid"/>.</param>
104− /// <param name="startingIndex">the starting index in <see cref="buffer"/>.</param>
105− /// <returns></returns>
106+ /// <param name="buffer">Buffer containing a serialized big-endian encoded <see cref="Guid"/>.</param>
107+ /// <param name="startingIndex">Starting index in <paramref name="buffer"/>.</param>
108+ /// <returns><see cref="Guid"/> deserialized from <paramref name="buffer"/>.</returns>
106109 public static Guid ToRfcGuid(this byte[] buffer, int startingIndex)
107110 {
108111 buffer.ValidateParameters(startingIndex, 16);
109112
110− //Since Microsoft is not very clear how Guid.ToByteArray() performs on big endian processors
111− //we are assuming that the internal structure of a Guid will always be the same. Reviewing mono source code
112− //the internal stucture is also the same.
113+ // Since Microsoft is not very clear how Guid.ToByteArray() performs on big endian processors
114+ // we are assuming that the internal structure of a Guid will always be the same. Reviewing
115+ // mono source code the internal structure is also the same.
113116 Guid rv;
114117 byte* dst = (byte*)&rv;
118+
115119 fixed (byte* src = &buffer[startingIndex])
116120 {
117121 if (BitConverter.IsLittleEndian)
118122 {
119− //Guid._a (int)
123+ // Guid._a (int)
120124 dst[0] = src[3];
121125 dst[1] = src[2];
122126 dst[2] = src[1];
123127 dst[3] = src[0];
124− //Guid._b (short)
128+
129+ // Guid._b (short)
125130 dst[4] = src[5];
126131 dst[5] = src[4];
127− //Guid._c (short)
132+
133+ // Guid._c (short)
128134 dst[6] = src[7];
129135 dst[7] = src[6];
130− //Guid._d - Guid._k (8 bytes)
131− //Since already encoded as big endian, just copy the data.
136+
137+ // Guid._d - Guid._k (8 bytes)
138+ // Since already encoded as big endian, just copy the data
132139 *(long*)(dst + 8) = *(long*)(src + 8);
133140 }
134141 else
135142 {
136− //all fields are encoded big-endian. Just copy.
143+ // All fields are encoded big-endian, just copy
137144 *(long*)(dst + 0) = *(long*)(src + 0);
138145 *(long*)(dst + 8) = *(long*)(src + 8);
139146 }
@@ -143,7 +150,7 @@ namespace GSF · 3 unmodified lines
143150 }
144151
145152 //---------------------------------------------------------------------------------------------------------
146− // Obsolete methods to support backwards compatibility with a bug that existed in EndianOrder's Guid methods
153+ // Obsolete methods for compatibility with incorrectly implemented old code in EndianOrder's Guid methods
147154 //---------------------------------------------------------------------------------------------------------
148155
149156 /// <summary>
@@ -152,6 +159,7 @@ namespace GSF · 2 unmodified lines
152159 /// <param name="guid">the <see cref="Guid"/> to serialize</param>
153160 /// <returns>A <see cref="byte"/>[] that represents a big endian encoded Guid.</returns>
154161 [Obsolete("This method is for backwards compatibility only. Use ToRfcBytes from now on.", false)]
162+ [EditorBrowsable(EditorBrowsableState.Never)]
155163 public static byte[] __ToBigEndianOrderBytes(Guid guid)
156164 {
157165 byte[] rv = new byte[16];
@@ -163,15 +171,12 @@ namespace GSF · 5 unmodified lines
163171 /// Mimicks the encoding that was present in BigEndianOrder.
164172 /// </summary>
165173 /// <param name="guid">the <see cref="Guid"/> to serialize</param>
166− /// <param name="buffer">where to store the <see cref="guid"/></param>
167− /// <param name="startingIndex">the starting index in <see cref="buffer"/></param>
174+ /// <param name="buffer">where to store the <paramref name="guid"/></param>
175+ /// <param name="startingIndex">the starting index in <paramref name="buffer"/></param>
168176 [Obsolete("This method is for backwards compatibility only. Use ToRfcBytes from now on.", false)]
177+ [EditorBrowsable(EditorBrowsableState.Never)]
169178 public static int __ToBigEndianOrderBytes(Guid guid, byte[] buffer, int startingIndex)
170179 {
171− //Since Microsoft is not very clear how Guid.ToByteArray() performs on big endian processors
172− //we are assuming that the internal structure of a Guid will always be the same. Reviewing mono source code
173− //the internal stucture is also the same.
174−
175180 buffer.ValidateParameters(startingIndex, 16);
176181
177182 byte* src = (byte*)&guid;
@@ -198,8 +203,6 @@ namespace GSF · 20 unmodified lines
198203 }
199204 else
200205 {
201− //ToDo: Test this on a big endian architecture.
202−
203206 //Guid._a (int) //swap endian
204207 dst[15] = src[3];
205208 dst[14] = src[2];
@@ -231,6 +234,7 @@ namespace GSF · 25 unmodified lines
231234 /// <param name="buffer">where to read the <see cref="Guid"/>.</param>
232235 /// <returns></returns>
233236 [Obsolete("This method is for backwards compatibility only. Use ToRfcGuid from now on.", false)]
237+ [EditorBrowsable(EditorBrowsableState.Never)]
234238 public static Guid __ToBigEndianOrderGuid(byte[] buffer)
235239 {
236240 return __ToBigEndianOrderGuid(buffer, 0);
@@ -240,15 +244,14 @@ namespace GSF · 3 unmodified lines
240244 /// Mimicks the encoding that was present in BigEndianOrder.
241245 /// </summary>
242246 /// <param name="buffer">where to read the <see cref="Guid"/>.</param>
243− /// <param name="startingIndex">the starting index in <see cref="buffer"/>.</param>
247+ /// <param name="startingIndex">the starting index in <paramref name="buffer"/></param>
244248 /// <returns></returns>
245249 [Obsolete("This method is for backwards compatibility only. Use ToRfcGuid from now on.", false)]
250+ [EditorBrowsable(EditorBrowsableState.Never)]
246251 public static Guid __ToBigEndianOrderGuid(byte[] buffer, int startingIndex)
247252 {
248253 buffer.ValidateParameters(startingIndex, 16);
249254
250− //BigEndianOrder was a reverse of byte ordering that microsoft used.
251−
252255 Guid rv;
253256 byte* dst = (byte*)&rv;
254257 fixed (byte* src = &buffer[startingIndex])
@@ -301,14 +304,13 @@ namespace GSF · 46 unmodified lines
301304 }
302305 }
303306
304−
305−
306307 /// <summary>
307308 /// Mimicks the encoding that was present in BigEndianOrder.
308309 /// </summary>
309310 /// <param name="guid">the <see cref="Guid"/> to serialize</param>
310311 /// <returns>A <see cref="byte"/>[] that represents a big endian encoded Guid.</returns>
311312 [Obsolete("This method is for backwards compatibility only. Use ToRfcBytes from now on.", false)]
313+ [EditorBrowsable(EditorBrowsableState.Never)]
312314 public static byte[] __ToLittleEndianOrderBytes(Guid guid)
313315 {
314316 byte[] rv = new byte[16];
@@ -320,14 +322,12 @@ namespace GSF · 5 unmodified lines
320322 /// Mimicks the encoding that was present in BigEndianOrder.
321323 /// </summary>
322324 /// <param name="guid">the <see cref="Guid"/> to serialize</param>
323− /// <param name="buffer">where to store the <see cref="guid"/></param>
324− /// <param name="startingIndex">the starting index in <see cref="buffer"/></param>
325+ /// <param name="buffer">where to store the <paramref name="guid"/></param>
326+ /// <param name="startingIndex">the starting index in <paramref name="buffer"/></param>
325327 [Obsolete("This method is for backwards compatibility only. Use ToRfcBytes from now on.", false)]
328+ [EditorBrowsable(EditorBrowsableState.Never)]
326329 public static int __ToLittleEndianOrderBytes(Guid guid, byte[] buffer, int startingIndex)
327330 {
328− //This encoding is the same as the default microsoft encoding.
329− //Which is each internal word of the guid is stored little endian.
330−
331331 buffer.ValidateParameters(startingIndex, 16);
332332
333333 byte* src = (byte*)&guid;
@@ -341,8 +341,6 @@ namespace GSF · 7 unmodified lines
341341 }
342342 else
343343 {
344− //ToDo: Test this on a big endian architecture.
345−
346344 //Guid._a (int) //swap endian
347345 dst[0] = src[3];
348346 dst[1] = src[2];
@@ -367,6 +365,7 @@ namespace GSF · 18 unmodified lines
367365 /// <param name="buffer">where to read the <see cref="Guid"/>.</param>
368366 /// <returns></returns>
369367 [Obsolete("This method is for backwards compatibility only. Use ToRfcGuid from now on.", false)]
368+ [EditorBrowsable(EditorBrowsableState.Never)]
370369 public static Guid __ToLittleEndianOrderGuid(byte[] buffer)
371370 {
372371 return __ToLittleEndianOrderGuid(buffer, 0);
@@ -376,16 +375,14 @@ namespace GSF · 3 unmodified lines
376375 /// Mimicks the encoding that was present in BigEndianOrder.
377376 /// </summary>
378377 /// <param name="buffer">where to read the <see cref="Guid"/>.</param>
379− /// <param name="startingIndex">the starting index in <see cref="buffer"/>.</param>
378+ /// <param name="startingIndex">the starting index in <paramref name="buffer"/></param>
380379 /// <returns></returns>
381380 [Obsolete("This method is for backwards compatibility only. Use ToRfcGuid from now on.", false)]
381+ [EditorBrowsable(EditorBrowsableState.Never)]
382382 public static Guid __ToLittleEndianOrderGuid(byte[] buffer, int startingIndex)
383383 {
384384 buffer.ValidateParameters(startingIndex, 16);
385385
386− //Since Microsoft is not very clear how Guid.ToByteArray() performs on big endian processors
387− //we are assuming that the internal structure of a Guid will always be the same. Reviewing mono source code
388− //the internal stucture is also the same.
389386 Guid rv;
390387 byte* dst = (byte*)&rv;
391388 fixed (byte* src = &buffer[startingIndex])
@@ -398,8 +395,6 @@ namespace GSF · 6 unmodified lines
398395 }
399396 else
400397 {
401− //ToDo: Test this on a big endian architecture.
402−
403398 //Guid._a (int) //swap endian
404399 dst[0] = src[3];
405400 dst[1] = src[2];
@@ -418,6 +413,5 @@ namespace GSF · 12 unmodified lines
418413 return rv;
419414 }
420415 }
421−
422416 }
423417 }
Source/Libraries/GSF.Core/IO/Compression/PatternCompressor.cs+4−4
@@ -172,7 +172,7 @@ namespace GSF.IO.Compression · 171 unmodified lines
172172 int compressedSize = 0;
173173 byte* iter, end;
174174
175− if (value == null)
175+ if ((object)value == null)
176176 throw new ArgumentNullException("value cannot be null", "value");
177177
178178 bufferLength = value.BinaryLength.AlignDoubleWord();
@@ -235,7 +235,7 @@ namespace GSF.IO.Compression · 56 unmodified lines
235235 int compressedSize = 0;
236236 byte* start, iter, end;
237237
238− if (buffer == null)
238+ if ((object)buffer == null)
239239 throw new ArgumentNullException("buffer", "Cannot write data to null buffer");
240240
241241 if (length % SizeOf32Bits != 0)
@@ -727,7 +727,7 @@ namespace GSF.IO.Compression · 485 unmodified lines
727727 finally
728728 {
729729 // Return buffer to queue so it can be reused
730− if (buffer != null)
730+ if ((object)buffer != null)
731731 BufferPool.ReturnBuffer(buffer);
732732 }
733733
@@ -917,7 +917,7 @@ namespace GSF.IO.Compression · 183 unmodified lines
917917 // finally
918918 // {
919919 // // Return buffer to queue so it can be reused
920− // if (buffer != null)
920+ // if ((object)buffer != null)
921921 // BufferPool.ReturnBuffer(buffer);
922922 // }
923923
Source/Libraries/GSF.Core/IO/Compression/PatternDecompressor.cs+2−2
@@ -210,7 +210,7 @@ namespace GSF.IO.Compression · 209 unmodified lines
210210 const int SizeOf32Bits = sizeof(uint);
211211 byte* start, iter, end;
212212
213− if (buffer == null)
213+ if ((object)buffer == null)
214214 throw new ArgumentNullException("buffer", "Cannot write data to null buffer");
215215
216216 if (length % SizeOf32Bits != 0)
@@ -663,7 +663,7 @@ namespace GSF.IO.Compression · 446 unmodified lines
663663 finally
664664 {
665665 // Return buffer to queue so it can be reused
666− if (buffer != null)
666+ if ((object)buffer != null)
667667 BufferPool.ReturnBuffer(buffer);
668668 }
669669
Source/Libraries/GSF.Core/IO/StreamExtensions.cs+1−1
@@ -63,7 +63,7 @@ namespace GSF.IO · 62 unmodified lines
6363 }
6464 finally
6565 {
66− if (buffer != null)
66+ if ((object)buffer != null)
6767 BufferPool.ReturnBuffer(buffer);
6868 }
6969 }
Source/Libraries/GSF.Core/Identity/UserAccountControl.cs+1−1
@@ -207,7 +207,7 @@ namespace GSF.Identity · 206 unmodified lines
207207 {
208208 object value = key.GetValue(UacRegistryValue);
209209
210− if (value != null)
210+ if ((object)value != null)
211211 return value.Equals(1);
212212 }
213213
Source/Libraries/GSF.Core/Parsing/BinaryImageParserBase.cs+5−1
@@ -334,7 +334,7 @@ namespace GSF.Parsing · 333 unmodified lines
334334 }
335335 finally
336336 {
337− if (buffer != null)
337+ if ((object)buffer != null)
338338 BufferPool.ReturnBuffer(buffer);
339339 }
340340 }
@@ -507,10 +507,14 @@ namespace GSF.Parsing · 166 unmodified lines
507507 OnParsingException(ex);
508508 }
509509 else
510+ {
510511 throw;
512+ }
511513 }
512514 else
515+ {
513516 throw;
517+ }
514518 }
515519
516520 // Returned value represents total bytes of data in the buffer image that were
Source/Libraries/GSF.Core/Parsing/CommonHeaderBase.cs+1−1
@@ -40,7 +40,7 @@ namespace GSF.Parsing · 39 unmodified lines
4040 /// {
4141 /// if (length > 3)
4242 /// {
43− /// TypeID = EndianOrder.LittleEndian.ToInt32(binaryImage, startIndex);
43+ /// TypeID = LittleEndian.ToInt32(binaryImage, startIndex);
4444 /// State = state;
4545 /// }
4646 /// else
Source/Libraries/GSF.Core/Parsing/IBinaryImageParser.cs+10−3
@@ -35,7 +35,7 @@ namespace GSF.Parsing · 34 unmodified lines
3535 public interface IBinaryImageParser : IProvideStatus
3636 {
3737 /// <summary>
38− /// Occurs when data image fails deserialized due to an exception.
38+ /// Occurs when data image fails deserialization due to an exception.
3939 /// </summary>
4040 /// <remarks>
4141 /// <see cref="EventArgs{T}.Argument"/> is the remaining portion of the binary image that failed to parse.
@@ -63,12 +63,19 @@ namespace GSF.Parsing · 21 unmodified lines
6363 /// <summary>
6464 /// Gets or sets a boolean value that indicates whether the data parser is currently enabled.
6565 /// </summary>
66− bool Enabled { get; set; }
66+ bool Enabled
67+ {
68+ get;
69+ set;
70+ }
6771
6872 /// <summary>
6973 /// Gets the total number of buffer images processed so far.
7074 /// </summary>
71− long TotalProcessedBuffers { get; }
75+ long TotalProcessedBuffers
76+ {
77+ get;
78+ }
7279
7380 /// <summary>
7481 /// Writes a sequence of bytes onto the <see cref="IBinaryImageParser"/> stream for parsing.
Source/Libraries/GSF.Core/Parsing/ISupportBinaryImage.cs+2−2
@@ -123,7 +123,7 @@ namespace GSF.Parsing · 122 unmodified lines
123123 }
124124 finally
125125 {
126− if (buffer != null)
126+ if ((object)buffer != null)
127127 BufferPool.ReturnBuffer(buffer);
128128 }
129129 }
@@ -153,7 +153,7 @@ namespace GSF.Parsing · 23 unmodified lines
153153 }
154154 finally
155155 {
156− if (buffer != null)
156+ if ((object)buffer != null)
157157 BufferPool.ReturnBuffer(buffer);
158158 }
159159 }
Source/Libraries/GSF.Core/Parsing/ISupportSourceIdentifiableFrameImage.cs+3−2
@@ -26,11 +26,12 @@ · 25 unmodified lines
2626 namespace GSF.Parsing
2727 {
2828 /// <summary>
29− /// Specifies that this <see cref="System.Type"/> can produce or consume a frame of data represented as a source identifiable binary image.
29+ /// Specifies that this <see cref="System.Type"/> can produce or consume a frame of data represented as a binary image
30+ /// that can be identified by its data source.
3031 /// </summary>
3132 /// <remarks>
3233 /// Related types of protocol data that occur as frames in a stream can implement this interface for automated parsing
33− /// via the <see cref="MultiSourceFrameImageParserBase{TSourceIdentifier,TTypeIdentifier,TOutputType}"/> class.
34+ /// via the <see cref="MultiSourceFrameImageParserBase{TSourceIdentifier, TTypeIdentifier, TOutputType}"/> class.
3435 /// </remarks>
3536 /// <typeparam name="TSourceIdentifier">Type of identifier for the data source.</typeparam>
3637 /// <typeparam name="TTypeIdentifier">Type of the frame identifier.</typeparam>
Source/Libraries/GSF.Core/Parsing/MultiSourceFrameImageParserBase.cs+18−25
@@ -37,7 +37,6 @@ using System; · 36 unmodified lines
3737 using System.Collections.Concurrent;
3838 using System.Collections.Generic;
3939 using System.ComponentModel;
40−using System.Threading;
4140 using GSF.Collections;
4241
4342 namespace GSF.Parsing
@@ -54,7 +53,7 @@ namespace GSF.Parsing · 10 unmodified lines
5453 /// This class is more specific than the <see cref="BinaryImageParserBase"/> in that it can automate the parsing of a
5554 /// particular protocol that is formatted as a series of frames that have a common method of identification.
5655 /// Automation of type creation occurs by loading implementations of common types that implement the
57− /// <see cref="ISupportSourceIdentifiableFrameImage{TSourceIdentifier,TTypeIdentifier}"/> interface. The common method of
56+ /// <see cref="ISupportSourceIdentifiableFrameImage{TSourceIdentifier, TTypeIdentifier}"/> interface. The common method of
5857 /// identification is handled by creating a class derived from the <see cref="ICommonHeader{TTypeIdentifier}"/> which primarily
5958 /// includes a TypeID property, but also should include any state information needed to parse a particular frame if necessary.
6059 /// Derived classes override the <see cref="FrameImageParserBase{TTypeIdentifier, TOutputType}.ParseCommonHeader"/>
@@ -334,8 +333,10 @@ namespace GSF.Parsing · 273 unmodified lines
334333 // Copy buffer data for processing (destination buffer pre-allocated from buffer pool)
335334 Buffer.BlockCopy(buffer, offset, identifiableBuffer.Buffer, 0, count);
336335
337− // Add buffer to the queue for parsing
338− m_bufferQueue.Enqueue(new SourceIdentifiableBuffer[] { identifiableBuffer });
336+ // Add buffer to the queue for parsing. Note that buffer is queued for parsing instead
337+ // of handling parse on this thread - this has become necessary to reduce UDP data loss
338+ // that can happen in-process when system has UDP buffers building up for processing.
339+ m_bufferQueue.Enqueue(new[] { identifiableBuffer });
339340 }
340341 }
341342 catch
@@ -398,7 +399,7 @@ namespace GSF.Parsing · 56 unmodified lines
398399 throw new NotImplementedException("This method should not be called directly, call the Parse(TSourceIdentifier,byte[],int,int) method to queue data for parsing instead.");
399400 }
400401
401− // This method is used by the internal <see cref="ProcessQueue{T}"/> to process all queued data buffers.
402+ // This method is used to process all queued data buffers.
402403 private void ParseQueuedBuffers(IList<SourceIdentifiableBuffer> buffers)
403404 {
404405 if (Enabled)
@@ -427,6 +428,16 @@ namespace GSF.Parsing · 22 unmodified lines
427428 }
428429 finally
429430 {
431+ // Dispose of source buffers - this returns buffers to pool
432+ if ((object)buffers != null)
433+ {
434+ foreach (SourceIdentifiableBuffer buffer in buffers)
435+ {
436+ if ((object)buffer != null)
437+ buffer.Dispose();
438+ }
439+ }
440+
430441 // If user has attached to SourceDataParsed event, expose list of parsed data per source
431442 if ((object)SourceDataParsed != null)
432443 {
@@ -435,28 +446,10 @@ namespace GSF.Parsing · 2 unmodified lines
435446 OnSourceDataParsed(parsedData.Key, parsedData.Value);
436447 }
437448
438− // Clear parsed data dictionary for next pass
449+ // Clear parsed data dictionary for next pass - note that this does not contend with
450+ // OnDataParsed override since the event called synchronously via base.Write above.
439451 m_parsedSourceData.Clear();
440452 }
441−
442− }
443− }
444−
445− // Dispose of source buffers - no rush
446− ThreadPool.QueueUserWorkItem(DisposeSourceBuffers, buffers);
447− }
448−
449− // Handle disposing of source buffers (this will return items to the reusable object pool)
450− private void DisposeSourceBuffers(object state)
451− {
452− SourceIdentifiableBuffer[] buffers = state as SourceIdentifiableBuffer[];
453−
454− if ((object)buffers != null)
455− {
456− foreach (SourceIdentifiableBuffer buffer in buffers)
457− {
458− if ((object)buffer != null)
459− buffer.Dispose();
460453 }
461454 }
462455 }
Source/Libraries/GSF.Core/Threading/ThreadContainerBase.cs+2−0
@@ -32,6 +32,8 @@ using System; · 31 unmodified lines
3232 using System.Runtime.CompilerServices;
3333 using System.Threading;
3434
35+#pragma warning disable 420
36+
3537 namespace GSF.Threading
3638 {
3739 internal abstract class ThreadContainerBase
Source/Libraries/GSF.Historian/DataServices/MetadataService.cs+3−3
@@ -188,7 +188,7 @@ namespace GSF.Historian.DataServices · 187 unmodified lines
188188 while (true)
189189 {
190190 buffer = Archive.ReadMetaData(++id);
191− if (buffer == null)
191+ if ((object)buffer == null)
192192 // No more records.
193193 break;
194194 else
@@ -227,7 +227,7 @@ namespace GSF.Historian.DataServices · 32 unmodified lines
227227 foreach (string singleID in idList.Split(',', ';'))
228228 {
229229 buffer = Archive.ReadMetaData(id = int.Parse(singleID));
230− if (buffer == null)
230+ if ((object)buffer == null)
231231 // ID is invalid.
232232 continue;
233233 else
@@ -265,7 +265,7 @@ namespace GSF.Historian.DataServices · 31 unmodified lines
265265 for (int id = int.Parse(fromID); id <= int.Parse(toID); id++)
266266 {
267267 buffer = Archive.ReadMetaData(id);
268− if (buffer == null)
268+ if ((object)buffer == null)
269269 // ID is invalid.
270270 continue;
271271 else
Source/Libraries/GSF.Historian/DataServices/TimeSeriesDataService.cs+2−2
@@ -242,7 +242,7 @@ namespace GSF.Historian.DataServices · 241 unmodified lines
242242 foreach (string singleID in idList.Split(',', ';'))
243243 {
244244 buffer = Archive.ReadStateData(id = int.Parse(singleID));
245− if (buffer == null)
245+ if ((object)buffer == null)
246246 {
247247 // ID is invalid.
248248 continue;
@@ -286,7 +286,7 @@ namespace GSF.Historian.DataServices · 37 unmodified lines
286286 for (int id = int.Parse(fromID); id <= int.Parse(toID); id++)
287287 {
288288 buffer = Archive.ReadStateData(id);
289− if (buffer == null)
289+ if ((object)buffer == null)
290290 {
291291 // ID is invalid.
292292 continue;
Source/Libraries/GSF.Historian/Files/ArchiveDataBlockPointer.cs+4−4
@@ -211,8 +211,8 @@ namespace GSF.Historian.Files · 210 unmodified lines
211211 if (length >= FixedLength)
212212 {
213213 // Binary image has sufficient data.
214− HistorianID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex);
215− StartTime = new TimeTag(EndianOrder.LittleEndian.ToDouble(buffer, startIndex + 4));
214+ HistorianID = LittleEndian.ToInt32(buffer, startIndex);
215+ StartTime = new TimeTag(LittleEndian.ToDouble(buffer, startIndex + 4));
216216
217217 return FixedLength;
218218 }
@@ -238,8 +238,8 @@ namespace GSF.Historian.Files · 19 unmodified lines
238238
239239 buffer.ValidateParameters(startIndex, length);
240240
241− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex, 4);
242− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_startTime.Value), 0, buffer, startIndex + 4, 8);
241+ Buffer.BlockCopy(LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex, 4);
242+ Buffer.BlockCopy(LittleEndian.GetBytes(m_startTime.Value), 0, buffer, startIndex + 4, 8);
243243
244244 return length;
245245 }
Source/Libraries/GSF.Historian/Files/ArchiveDataPoint.cs+6−6
@@ -306,9 +306,9 @@ namespace GSF.Historian.Files · 305 unmodified lines
306306 if (length >= FixedLength)
307307 {
308308 // Binary image has sufficient data.
309− Flags = EndianOrder.LittleEndian.ToInt16(buffer, startIndex + 4);
310− Value = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 6);
311− Time = new TimeTag(EndianOrder.LittleEndian.ToInt32(buffer, startIndex) + // Seconds
309+ Flags = LittleEndian.ToInt16(buffer, startIndex + 4);
310+ Value = LittleEndian.ToSingle(buffer, startIndex + 6);
311+ Time = new TimeTag(LittleEndian.ToInt32(buffer, startIndex) + // Seconds
312312 ((double)(m_flags.GetMaskedValue(MillisecondMask) >> 5) / 1000)); // Milliseconds
313313
314314 return FixedLength;
@@ -337,9 +337,9 @@ namespace GSF.Historian.Files · 22 unmodified lines
337337
338338 buffer.ValidateParameters(startIndex, length);
339339
340− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes((int)m_time.Value), 0, buffer, startIndex, 4);
341− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes((short)m_flags), 0, buffer, startIndex + 4, 2);
342− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_value), 0, buffer, startIndex + 6, 4);
340+ Buffer.BlockCopy(LittleEndian.GetBytes((int)m_time.Value), 0, buffer, startIndex, 4);
341+ Buffer.BlockCopy(LittleEndian.GetBytes((short)m_flags), 0, buffer, startIndex + 4, 2);
342+ Buffer.BlockCopy(LittleEndian.GetBytes(m_value), 0, buffer, startIndex + 6, 4);
343343
344344 return length;
345345 }
Source/Libraries/GSF.Historian/Files/ArchiveFileAllocationTable.cs+18−18
@@ -133,8 +133,8 @@ namespace GSF.Historian.Files · 132 unmodified lines
133133 {
134134 buffer.ValidateParameters(startIndex, length);
135135
136− double startTime = EndianOrder.LittleEndian.ToDouble(buffer, startIndex);
137− double stopTime = EndianOrder.LittleEndian.ToDouble(buffer, startIndex + 8);
136+ double startTime = LittleEndian.ToDouble(buffer, startIndex);
137+ double stopTime = LittleEndian.ToDouble(buffer, startIndex + 8);
138138
139139 // Validate file time tags
140140 if (startTime < TimeTag.MinValue.Value || startTime > TimeTag.MaxValue.Value)
@@ -145,10 +145,10 @@ namespace GSF.Historian.Files · 4 unmodified lines
145145
146146 m_parent.FileStartTime = new TimeTag(startTime);
147147 m_parent.FileEndTime = new TimeTag(stopTime);
148− m_parent.DataPointsReceived = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 16);
149− m_parent.DataPointsArchived = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 20);
150− m_parent.DataBlockSize = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 24);
151− m_parent.DataBlockCount = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 28);
148+ m_parent.DataPointsReceived = LittleEndian.ToInt32(buffer, startIndex + 16);
149+ m_parent.DataPointsArchived = LittleEndian.ToInt32(buffer, startIndex + 20);
150+ m_parent.DataBlockSize = LittleEndian.ToInt32(buffer, startIndex + 24);
151+ m_parent.DataBlockCount = LittleEndian.ToInt32(buffer, startIndex + 28);
152152
153153 return FixedLength;
154154 }
@@ -170,12 +170,12 @@ namespace GSF.Historian.Files · 15 unmodified lines
170170
171171 buffer.ValidateParameters(startIndex, length);
172172
173− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_parent.m_fileStartTime.Value), 0, buffer, startIndex, 8);
174− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_parent.m_fileEndTime.Value), 0, buffer, startIndex + 8, 8);
175− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_parent.m_dataPointsReceived), 0, buffer, startIndex + 16, 4);
176− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_parent.m_dataPointsArchived), 0, buffer, startIndex + 20, 4);
177− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_parent.m_dataBlockSize), 0, buffer, startIndex + 24, 4);
178− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_parent.m_dataBlockCount), 0, buffer, startIndex + 28, 4);
173+ Buffer.BlockCopy(LittleEndian.GetBytes(m_parent.m_fileStartTime.Value), 0, buffer, startIndex, 8);
174+ Buffer.BlockCopy(LittleEndian.GetBytes(m_parent.m_fileEndTime.Value), 0, buffer, startIndex + 8, 8);
175+ Buffer.BlockCopy(LittleEndian.GetBytes(m_parent.m_dataPointsReceived), 0, buffer, startIndex + 16, 4);
176+ Buffer.BlockCopy(LittleEndian.GetBytes(m_parent.m_dataPointsArchived), 0, buffer, startIndex + 20, 4);
177+ Buffer.BlockCopy(LittleEndian.GetBytes(m_parent.m_dataBlockSize), 0, buffer, startIndex + 24, 4);
178+ Buffer.BlockCopy(LittleEndian.GetBytes(m_parent.m_dataBlockCount), 0, buffer, startIndex + 28, 4);
179179
180180 return length;
181181 }
@@ -489,7 +489,7 @@ namespace GSF.Historian.Files · 307 unmodified lines
489489 {
490490 ArchiveDataBlock unusedDataBlock = FindDataBlock(-1);
491491
492− if (unusedDataBlock != null)
492+ if ((object)unusedDataBlock != null)
493493 return m_dataBlockCount - unusedDataBlock.Index;
494494
495495 return 0;
@@ -772,18 +772,18 @@ namespace GSF.Historian.Files · 276 unmodified lines
772772 // Negative data block index is specified indicating a search must be performed for a data block.
773773 dataBlock = FindLastDataBlock(historianID);
774774
775− if (dataBlock != null && dataBlock.SlotsAvailable == 0)
775+ if ((object)dataBlock != null && dataBlock.SlotsAvailable == 0)
776776 {
777777 // Previously used data block is full.
778778 dataBlock = null;
779779 }
780780
781− if (dataBlock == null)
781+ if ((object)dataBlock == null)
782782 {
783783 // Look for the first unallocated data block.
784784 dataBlock = FindDataBlock(-1);
785785
786− if (dataBlock == null)
786+ if ((object)dataBlock == null)
787787 {
788788 // Extend the file for historic writes only.
789789 if (m_parent.FileType == ArchiveFileType.Historic)
@@ -801,7 +801,7 @@ namespace GSF.Historian.Files · 11 unmodified lines
801801 }
802802
803803 // Get the pointer to the data block so that its information can be updated if necessary.
804− if (dataBlock == null)
804+ if ((object)dataBlock == null)
805805 {
806806 dataBlockPointer = null;
807807 }
@@ -814,7 +814,7 @@ namespace GSF.Historian.Files · 6 unmodified lines
814814 }
815815 }
816816
817− if (dataBlockPointer != null && !dataBlockPointer.IsAllocated)
817+ if ((object)dataBlockPointer != null && !dataBlockPointer.IsAllocated)
818818 {
819819 // Mark the data block as allocated.
820820 dataBlockPointer.HistorianID = historianID;
Source/Libraries/GSF.Historian/Files/IntercomRecord.cs+10−10
@@ -238,14 +238,14 @@ namespace GSF.Historian.Files · 237 unmodified lines
238238 if (length >= FixedLength)
239239 {
240240 // Binary image has sufficient data.
241− DataBlocksUsed = EndianOrder.LittleEndian.ToInt32(buffer, startIndex);
242− RolloverInProgress = EndianOrder.LittleEndian.ToBoolean(buffer, startIndex + 4);
243− LatestDataTime = new TimeTag(EndianOrder.LittleEndian.ToDouble(buffer, startIndex + 8));
244− LatestDataID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 16);
241+ DataBlocksUsed = LittleEndian.ToInt32(buffer, startIndex);
242+ RolloverInProgress = LittleEndian.ToBoolean(buffer, startIndex + 4);
243+ LatestDataTime = new TimeTag(LittleEndian.ToDouble(buffer, startIndex + 8));
244+ LatestDataID = LittleEndian.ToInt32(buffer, startIndex + 16);
245245
246246 for (int i = 0; i < m_sourceLatestDataTime.Count; i++)
247247 {
248− m_sourceLatestDataTime[i] = new TimeTag(EndianOrder.LittleEndian.ToDouble(buffer, startIndex + 20 + (i * 8)));
248+ m_sourceLatestDataTime[i] = new TimeTag(LittleEndian.ToDouble(buffer, startIndex + 20 + (i * 8)));
249249 }
250250
251251 return FixedLength;
@@ -276,14 +276,14 @@ namespace GSF.Historian.Files · 24 unmodified lines
276276
277277 lock (this)
278278 {
279− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_dataBlocksUsed), 0, buffer, startIndex, 4);
280− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(Convert.ToInt32(m_rolloverInProgress)), 0, buffer, startIndex + 4, 4);
281− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_latestDataTime.Value), 0, buffer, startIndex + 8, 8);
282− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_latestDataID), 0, buffer, startIndex + 16, 4);
279+ Buffer.BlockCopy(LittleEndian.GetBytes(m_dataBlocksUsed), 0, buffer, startIndex, 4);
280+ Buffer.BlockCopy(LittleEndian.GetBytes(Convert.ToInt32(m_rolloverInProgress)), 0, buffer, startIndex + 4, 4);
281+ Buffer.BlockCopy(LittleEndian.GetBytes(m_latestDataTime.Value), 0, buffer, startIndex + 8, 8);
282+ Buffer.BlockCopy(LittleEndian.GetBytes(m_latestDataID), 0, buffer, startIndex + 16, 4);
283283
284284 for (int i = 0; i < m_sourceLatestDataTime.Count; i++)
285285 {
286− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_sourceLatestDataTime[i].Value), 0, buffer, startIndex + 20 + (i * 8), 8);
286+ Buffer.BlockCopy(LittleEndian.GetBytes(m_sourceLatestDataTime[i].Value), 0, buffer, startIndex + 20 + (i * 8), 8);
287287 }
288288 }
289289
Source/Libraries/GSF.Historian/Files/MetadataRecord.cs+36−36
@@ -191,7 +191,7 @@ namespace GSF.Historian.Files · 190 unmodified lines
191191 }
192192 set
193193 {
194− if (value == null)
194+ if ((object)value == null)
195195 throw new ArgumentNullException("value");
196196
197197 m_remarks = value.TruncateRight(512);
@@ -213,7 +213,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
213213 }
214214 set
215215 {
216− if (value == null)
216+ if ((object)value == null)
217217 throw new ArgumentNullException("value");
218218
219219 m_hardwareInfo = value.TruncateRight(512);
@@ -236,7 +236,7 @@ namespace GSF.Historian.Files · 16 unmodified lines
236236 }
237237 set
238238 {
239− if (value == null)
239+ if ((object)value == null)
240240 throw new ArgumentNullException("value");
241241
242242 m_emailAddresses = value.TruncateRight(512);
@@ -258,7 +258,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
258258 }
259259 set
260260 {
261− if (value == null)
261+ if ((object)value == null)
262262 throw new ArgumentNullException("value");
263263
264264 m_description = value.TruncateRight(80);
@@ -280,7 +280,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
280280 }
281281 set
282282 {
283− if (value == null)
283+ if ((object)value == null)
284284 throw new ArgumentNullException("value");
285285
286286 m_currentData = value.TruncateRight(80);
@@ -302,7 +302,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
302302 }
303303 set
304304 {
305− if (value == null)
305+ if ((object)value == null)
306306 throw new ArgumentNullException("value");
307307
308308 m_name = value.TruncateRight(40);
@@ -324,7 +324,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
324324 }
325325 set
326326 {
327− if (value == null)
327+ if ((object)value == null)
328328 throw new ArgumentNullException("value");
329329
330330 m_synonym1 = value.TruncateRight(40);
@@ -346,7 +346,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
346346 }
347347 set
348348 {
349− if (value == null)
349+ if ((object)value == null)
350350 throw new ArgumentNullException("value");
351351
352352 m_synonym2 = value.TruncateRight(40);
@@ -368,7 +368,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
368368 }
369369 set
370370 {
371− if (value == null)
371+ if ((object)value == null)
372372 throw new ArgumentNullException("value");
373373
374374 m_synonym3 = value.TruncateRight(40);
@@ -391,7 +391,7 @@ namespace GSF.Historian.Files · 16 unmodified lines
391391 }
392392 set
393393 {
394− if (value == null)
394+ if ((object)value == null)
395395 throw new ArgumentNullException("value");
396396
397397 m_pagerNumbers = value.TruncateRight(40);
@@ -414,7 +414,7 @@ namespace GSF.Historian.Files · 16 unmodified lines
414414 }
415415 set
416416 {
417− if (value == null)
417+ if ((object)value == null)
418418 throw new ArgumentNullException("value");
419419
420420 m_phoneNumbers = value.TruncateRight(40);
@@ -436,7 +436,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
436436 }
437437 set
438438 {
439− if (value == null)
439+ if ((object)value == null)
440440 throw new ArgumentNullException("value");
441441
442442 m_plantCode = value.TruncateRight(24);
@@ -458,7 +458,7 @@ namespace GSF.Historian.Files · 15 unmodified lines
458458 }
459459 set
460460 {
461− if (value == null)
461+ if ((object)value == null)
462462 throw new ArgumentNullException("value");
463463
464464 m_system = value.TruncateRight(24);
@@ -529,7 +529,7 @@ namespace GSF.Historian.Files · 64 unmodified lines
529529 }
530530 set
531531 {
532− if (value == null)
532+ if ((object)value == null)
533533 throw new ArgumentNullException("value");
534534
535535 m_securityFlags = value;
@@ -548,7 +548,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
548548 }
549549 set
550550 {
551− if (value == null)
551+ if ((object)value == null)
552552 throw new ArgumentNullException("value");
553553
554554 m_generalFlags = value;
@@ -567,7 +567,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
567567 }
568568 set
569569 {
570− if (value == null)
570+ if ((object)value == null)
571571 throw new ArgumentNullException("value");
572572
573573 m_alarmFlags = value;
@@ -647,7 +647,7 @@ namespace GSF.Historian.Files · 73 unmodified lines
647647 }
648648 set
649649 {
650− if (value == null)
650+ if ((object)value == null)
651651 throw new ArgumentNullException("value");
652652
653653 m_analogFields = value;
@@ -666,7 +666,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
666666 }
667667 set
668668 {
669− if (value == null)
669+ if ((object)value == null)
670670 throw new ArgumentNullException("value");
671671
672672 m_digitalFields = value;
@@ -685,7 +685,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
685685 }
686686 set
687687 {
688− if (value == null)
688+ if ((object)value == null)
689689 throw new ArgumentNullException("value");
690690
691691 m_composedFields = value;
@@ -704,7 +704,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
704704 }
705705 set
706706 {
707− if (value == null)
707+ if ((object)value == null)
708708 throw new ArgumentNullException("value");
709709
710710 m_constantFields = value;
@@ -774,14 +774,14 @@ namespace GSF.Historian.Files · 63 unmodified lines
774774 PlantCode = Encoding.ASCII.GetString(buffer, startIndex + 1936, 24).Trim();
775775 SystemName = Encoding.ASCII.GetString(buffer, startIndex + 1960, 24).Trim();
776776 EmailTime = Encoding.ASCII.GetString(buffer, startIndex + 1984, 40).Trim();
777− ScanRate = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 2104);
778− UnitNumber = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2108);
779− SecurityFlags.Value = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2112);
780− GeneralFlags.Value = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2116);
781− AlarmFlags.Value = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2120);
782− CompressionMinTime = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2124);
783− CompressionMaxTime = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2128);
784− SourceID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2132);
777+ ScanRate = LittleEndian.ToSingle(buffer, startIndex + 2104);
778+ UnitNumber = LittleEndian.ToInt32(buffer, startIndex + 2108);
779+ SecurityFlags.Value = LittleEndian.ToInt32(buffer, startIndex + 2112);
780+ GeneralFlags.Value = LittleEndian.ToInt32(buffer, startIndex + 2116);
781+ AlarmFlags.Value = LittleEndian.ToInt32(buffer, startIndex + 2120);
782+ CompressionMinTime = LittleEndian.ToInt32(buffer, startIndex + 2124);
783+ CompressionMaxTime = LittleEndian.ToInt32(buffer, startIndex + 2128);
784+ SourceID = LittleEndian.ToInt32(buffer, startIndex + 2132);
785785 switch (GeneralFlags.DataType)
786786 {
787787 case DataType.Analog:
@@ -839,14 +839,14 @@ namespace GSF.Historian.Files · 51 unmodified lines
839839 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_plantCode.PadRight(24)), 0, buffer, startIndex + 1936, 24);
840840 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_system.PadRight(24)), 0, buffer, startIndex + 1960, 24);
841841 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_emailTime.PadRight(40)), 0, buffer, startIndex + 1984, 40);
842− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_scanRate), 0, buffer, startIndex + 2104, 4);
843− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_unitNumber), 0, buffer, startIndex + 2108, 4);
844− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_securityFlags.Value), 0, buffer, startIndex + 2112, 4);
845− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_generalFlags.Value), 0, buffer, startIndex + 2116, 4);
846− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_alarmFlags.Value), 0, buffer, startIndex + 2120, 4);
847− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_compressionMinTime), 0, buffer, startIndex + 2124, 4);
848− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_compressionMaxTime), 0, buffer, startIndex + 2128, 4);
849− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_sourceID), 0, buffer, startIndex + 2132, 4);
842+ Buffer.BlockCopy(LittleEndian.GetBytes(m_scanRate), 0, buffer, startIndex + 2104, 4);
843+ Buffer.BlockCopy(LittleEndian.GetBytes(m_unitNumber), 0, buffer, startIndex + 2108, 4);
844+ Buffer.BlockCopy(LittleEndian.GetBytes(m_securityFlags.Value), 0, buffer, startIndex + 2112, 4);
845+ Buffer.BlockCopy(LittleEndian.GetBytes(m_generalFlags.Value), 0, buffer, startIndex + 2116, 4);
846+ Buffer.BlockCopy(LittleEndian.GetBytes(m_alarmFlags.Value), 0, buffer, startIndex + 2120, 4);
847+ Buffer.BlockCopy(LittleEndian.GetBytes(m_compressionMinTime), 0, buffer, startIndex + 2124, 4);
848+ Buffer.BlockCopy(LittleEndian.GetBytes(m_compressionMaxTime), 0, buffer, startIndex + 2128, 4);
849+ Buffer.BlockCopy(LittleEndian.GetBytes(m_sourceID), 0, buffer, startIndex + 2132, 4);
850850 switch (m_generalFlags.DataType)
851851 {
852852 case DataType.Analog:
Source/Libraries/GSF.Historian/Files/MetadataRecordAnalogFields.cs+21−21
@@ -116,7 +116,7 @@ namespace GSF.Historian.Files · 115 unmodified lines
116116 }
117117 set
118118 {
119− if (value == null)
119+ if ((object)value == null)
120120 throw new ArgumentNullException("value");
121121
122122 m_engineeringUnits = value.TruncateRight(24);
@@ -301,16 +301,16 @@ namespace GSF.Historian.Files · 178 unmodified lines
301301 {
302302 // Binary image has sufficient data.
303303 EngineeringUnits = Encoding.ASCII.GetString(buffer, startIndex, 24).Trim();
304− HighAlarm = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 24);
305− LowAlarm = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 28);
306− HighRange = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 32);
307− LowRange = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 36);
308− HighWarning = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 40);
309− LowWarning = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 44);
310− ExceptionLimit = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 48);
311− CompressionLimit = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 52);
312− AlarmDelay = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 56);
313− DisplayDigits = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 60);
304+ HighAlarm = LittleEndian.ToSingle(buffer, startIndex + 24);
305+ LowAlarm = LittleEndian.ToSingle(buffer, startIndex + 28);
306+ HighRange = LittleEndian.ToSingle(buffer, startIndex + 32);
307+ LowRange = LittleEndian.ToSingle(buffer, startIndex + 36);
308+ HighWarning = LittleEndian.ToSingle(buffer, startIndex + 40);
309+ LowWarning = LittleEndian.ToSingle(buffer, startIndex + 44);
310+ ExceptionLimit = LittleEndian.ToSingle(buffer, startIndex + 48);
311+ CompressionLimit = LittleEndian.ToSingle(buffer, startIndex + 52);
312+ AlarmDelay = LittleEndian.ToSingle(buffer, startIndex + 56);
313+ DisplayDigits = LittleEndian.ToInt32(buffer, startIndex + 60);
314314
315315 return FixedLength;
316316 }
@@ -339,16 +339,16 @@ namespace GSF.Historian.Files · 22 unmodified lines
339339 buffer.ValidateParameters(startIndex, length);
340340
341341 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_engineeringUnits.PadRight(24)), 0, buffer, startIndex, 24);
342− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highAlarm), 0, buffer, startIndex + 24, 4);
343− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowAlarm), 0, buffer, startIndex + 28, 4);
344− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highRange), 0, buffer, startIndex + 32, 4);
345− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowRange), 0, buffer, startIndex + 36, 4);
346− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highWarning), 0, buffer, startIndex + 40, 4);
347− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowWarning), 0, buffer, startIndex + 44, 4);
348− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_exceptionLimit), 0, buffer, startIndex + 48, 4);
349− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_compressionLimit), 0, buffer, startIndex + 52, 4);
350− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_alarmDelay), 0, buffer, startIndex + 56, 4);
351− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_displayDigits), 0, buffer, startIndex + 60, 4);
342+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highAlarm), 0, buffer, startIndex + 24, 4);
343+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowAlarm), 0, buffer, startIndex + 28, 4);
344+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highRange), 0, buffer, startIndex + 32, 4);
345+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowRange), 0, buffer, startIndex + 36, 4);
346+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highWarning), 0, buffer, startIndex + 40, 4);
347+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowWarning), 0, buffer, startIndex + 44, 4);
348+ Buffer.BlockCopy(LittleEndian.GetBytes(m_exceptionLimit), 0, buffer, startIndex + 48, 4);
349+ Buffer.BlockCopy(LittleEndian.GetBytes(m_compressionLimit), 0, buffer, startIndex + 52, 4);
350+ Buffer.BlockCopy(LittleEndian.GetBytes(m_alarmDelay), 0, buffer, startIndex + 56, 4);
351+ Buffer.BlockCopy(LittleEndian.GetBytes(m_displayDigits), 0, buffer, startIndex + 60, 4);
352352
353353 return length;
354354 }
Source/Libraries/GSF.Historian/Files/MetadataRecordComposedFields.cs+20−20
@@ -234,7 +234,7 @@ namespace GSF.Historian.Files · 233 unmodified lines
234234 }
235235 set
236236 {
237− if (value == null)
237+ if ((object)value == null)
238238 throw new ArgumentNullException("value");
239239
240240 m_engineeringUnits = value.TruncateRight(24);
@@ -253,7 +253,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
253253 }
254254 set
255255 {
256− if (value == null)
256+ if ((object)value == null)
257257 throw new ArgumentNullException("value");
258258
259259 m_equation = value.TruncateRight(256);
@@ -302,20 +302,20 @@ namespace GSF.Historian.Files · 42 unmodified lines
302302 if (length >= FixedLength)
303303 {
304304 // Binary image has sufficient data.
305− HighAlarm = EndianOrder.LittleEndian.ToSingle(buffer, startIndex);
306− LowAlarm = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 4);
307− HighRange = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 8);
308− LowRange = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 12);
309− LowWarning = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 16);
310− HighWarning = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 20);
311− DisplayDigits = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 24);
305+ HighAlarm = LittleEndian.ToSingle(buffer, startIndex);
306+ LowAlarm = LittleEndian.ToSingle(buffer, startIndex + 4);
307+ HighRange = LittleEndian.ToSingle(buffer, startIndex + 8);
308+ LowRange = LittleEndian.ToSingle(buffer, startIndex + 12);
309+ LowWarning = LittleEndian.ToSingle(buffer, startIndex + 16);
310+ HighWarning = LittleEndian.ToSingle(buffer, startIndex + 20);
311+ DisplayDigits = LittleEndian.ToInt32(buffer, startIndex + 24);
312312 for (int i = 0; i < m_inputPointers.Count; i++)
313313 {
314− m_inputPointers[i] = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 28 + (i * 4));
314+ m_inputPointers[i] = LittleEndian.ToInt32(buffer, startIndex + 28 + (i * 4));
315315 }
316316 EngineeringUnits = Encoding.ASCII.GetString(buffer, startIndex + 76, 24).Trim();
317317 Equation = Encoding.ASCII.GetString(buffer, startIndex + 100, 256).Trim();
318− CompressionLimit = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 356);
318+ CompressionLimit = LittleEndian.ToSingle(buffer, startIndex + 356);
319319
320320 return FixedLength;
321321 }
@@ -343,20 +343,20 @@ namespace GSF.Historian.Files · 21 unmodified lines
343343
344344 buffer.ValidateParameters(startIndex, length);
345345
346− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highAlarm), 0, buffer, startIndex, 4);
347− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowAlarm), 0, buffer, startIndex + 4, 4);
348− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highRange), 0, buffer, startIndex + 8, 4);
349− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowRange), 0, buffer, startIndex + 12, 4);
350− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowWarning), 0, buffer, startIndex + 16, 4);
351− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highWarning), 0, buffer, startIndex + 20, 4);
352− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_displayDigits), 0, buffer, startIndex + 24, 4);
346+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highAlarm), 0, buffer, startIndex, 4);
347+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowAlarm), 0, buffer, startIndex + 4, 4);
348+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highRange), 0, buffer, startIndex + 8, 4);
349+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowRange), 0, buffer, startIndex + 12, 4);
350+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowWarning), 0, buffer, startIndex + 16, 4);
351+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highWarning), 0, buffer, startIndex + 20, 4);
352+ Buffer.BlockCopy(LittleEndian.GetBytes(m_displayDigits), 0, buffer, startIndex + 24, 4);
353353 for (int i = 0; i < m_inputPointers.Count; i++)
354354 {
355− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_inputPointers[i]), 0, buffer, startIndex + 28 + (i * 4), 4);
355+ Buffer.BlockCopy(LittleEndian.GetBytes(m_inputPointers[i]), 0, buffer, startIndex + 28 + (i * 4), 4);
356356 }
357357 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_engineeringUnits.PadRight(24)), 0, buffer, startIndex + 76, 24);
358358 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_equation.PadRight(256)), 0, buffer, startIndex + 100, 256);
359− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_compressionLimit), 0, buffer, startIndex + 356, 4);
359+ Buffer.BlockCopy(LittleEndian.GetBytes(m_compressionLimit), 0, buffer, startIndex + 356, 4);
360360
361361 return length;
362362 }
Source/Libraries/GSF.Historian/Files/MetadataRecordConstantFields.cs+4−4
@@ -136,8 +136,8 @@ namespace GSF.Historian.Files · 135 unmodified lines
136136 if (length >= FixedLength)
137137 {
138138 // Binary image has sufficient data.
139− Value = EndianOrder.LittleEndian.ToSingle(buffer, startIndex);
140− DisplayDigits = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 4);
139+ Value = LittleEndian.ToSingle(buffer, startIndex);
140+ DisplayDigits = LittleEndian.ToInt32(buffer, startIndex + 4);
141141
142142 return FixedLength;
143143 }
@@ -165,8 +165,8 @@ namespace GSF.Historian.Files · 21 unmodified lines
165165
166166 buffer.ValidateParameters(startIndex, length);
167167
168− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_value), 0, buffer, startIndex, 4);
169− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_displayDigits), 0, buffer, startIndex + 4, 4);
168+ Buffer.BlockCopy(LittleEndian.GetBytes(m_value), 0, buffer, startIndex, 4);
169+ Buffer.BlockCopy(LittleEndian.GetBytes(m_displayDigits), 0, buffer, startIndex + 4, 4);
170170
171171 return length;
172172 }
Source/Libraries/GSF.Historian/Files/MetadataRecordDigitalFields.cs+4−4
@@ -188,8 +188,8 @@ namespace GSF.Historian.Files · 187 unmodified lines
188188 // Binary image has sufficient data.
189189 SetDescription = Encoding.ASCII.GetString(buffer, startIndex, 24).Trim();
190190 ClearDescription = Encoding.ASCII.GetString(buffer, startIndex + 24, 24).Trim();
191− AlarmState = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 48);
192− AlarmDelay = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 52);
191+ AlarmState = LittleEndian.ToInt32(buffer, startIndex + 48);
192+ AlarmDelay = LittleEndian.ToSingle(buffer, startIndex + 52);
193193
194194 return FixedLength;
195195 }
@@ -219,8 +219,8 @@ namespace GSF.Historian.Files · 23 unmodified lines
219219
220220 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_setDescription.PadRight(24)), 0, buffer, startIndex, 24);
221221 Buffer.BlockCopy(Encoding.ASCII.GetBytes(m_clearDescription.PadRight(24)), 0, buffer, startIndex + 24, 24);
222− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_alarmState), 0, buffer, startIndex + 48, 4);
223− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_alarmDelay), 0, buffer, startIndex + 52, 4);
222+ Buffer.BlockCopy(LittleEndian.GetBytes(m_alarmState), 0, buffer, startIndex + 48, 4);
223+ Buffer.BlockCopy(LittleEndian.GetBytes(m_alarmDelay), 0, buffer, startIndex + 52, 4);
224224
225225 return length;
226226 }
Source/Libraries/GSF.Historian/Files/MetadataRecordSummary.cs+18−18
@@ -282,15 +282,15 @@ namespace GSF.Historian.Files · 281 unmodified lines
282282 if (length >= FixedLength)
283283 {
284284 // Binary image has sufficient data.
285− HistorianID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 0);
286− ExceptionLimit = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 4);
287− Enabled = Convert.ToBoolean(EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 8));
288− HighWarning = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 12);
289− LowWarning = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 16);
290− HighAlarm = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 20);
291− LowAlarm = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 24);
292− HighRange = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 28);
293− LowRange = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 32);
285+ HistorianID = LittleEndian.ToInt32(buffer, startIndex + 0);
286+ ExceptionLimit = LittleEndian.ToSingle(buffer, startIndex + 4);
287+ Enabled = Convert.ToBoolean(LittleEndian.ToInt32(buffer, startIndex + 8));
288+ HighWarning = LittleEndian.ToSingle(buffer, startIndex + 12);
289+ LowWarning = LittleEndian.ToSingle(buffer, startIndex + 16);
290+ HighAlarm = LittleEndian.ToSingle(buffer, startIndex + 20);
291+ LowAlarm = LittleEndian.ToSingle(buffer, startIndex + 24);
292+ HighRange = LittleEndian.ToSingle(buffer, startIndex + 28);
293+ LowRange = LittleEndian.ToSingle(buffer, startIndex + 32);
294294
295295 return FixedLength;
296296 }
@@ -318,15 +318,15 @@ namespace GSF.Historian.Files · 21 unmodified lines
318318
319319 buffer.ValidateParameters(startIndex, length);
320320
321− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex, 4);
322− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_exceptionLimit), 0, buffer, startIndex + 4, 4);
323− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(Convert.ToInt32(m_enabled)), 0, buffer, startIndex + 8, 4);
324− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highWarning), 0, buffer, startIndex + 12, 4);
325− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowWarning), 0, buffer, startIndex + 16, 4);
326− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highAlarm), 0, buffer, startIndex + 20, 4);
327− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowAlarm), 0, buffer, startIndex + 24, 4);
328− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_highRange), 0, buffer, startIndex + 28, 4);
329− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_lowRange), 0, buffer, startIndex + 32, 4);
321+ Buffer.BlockCopy(LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex, 4);
322+ Buffer.BlockCopy(LittleEndian.GetBytes(m_exceptionLimit), 0, buffer, startIndex + 4, 4);
323+ Buffer.BlockCopy(LittleEndian.GetBytes(Convert.ToInt32(m_enabled)), 0, buffer, startIndex + 8, 4);
324+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highWarning), 0, buffer, startIndex + 12, 4);
325+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowWarning), 0, buffer, startIndex + 16, 4);
326+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highAlarm), 0, buffer, startIndex + 20, 4);
327+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowAlarm), 0, buffer, startIndex + 24, 4);
328+ Buffer.BlockCopy(LittleEndian.GetBytes(m_highRange), 0, buffer, startIndex + 28, 4);
329+ Buffer.BlockCopy(LittleEndian.GetBytes(m_lowRange), 0, buffer, startIndex + 32, 4);
330330
331331 return length;
332332 }
Source/Libraries/GSF.Historian/Files/StateRecord.cs+7−7
@@ -128,7 +128,7 @@ namespace GSF.Historian.Files · 127 unmodified lines
128128 }
129129 set
130130 {
131− if (value == null)
131+ if ((object)value == null)
132132 throw new ArgumentNullException("value");
133133
134134 m_archivedData = value;
@@ -147,7 +147,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
147147 }
148148 set
149149 {
150− if (value == null)
150+ if ((object)value == null)
151151 throw new ArgumentNullException("value");
152152
153153 m_previousData = value;
@@ -166,7 +166,7 @@ namespace GSF.Historian.Files · 12 unmodified lines
166166 }
167167 set
168168 {
169− if (value == null)
169+ if ((object)value == null)
170170 throw new ArgumentNullException("value");
171171
172172 m_currentData = value;
@@ -295,10 +295,10 @@ namespace GSF.Historian.Files · 122 unmodified lines
295295 m_archivedData.ParseBinaryImage(buffer, startIndex, length);
296296 m_previousData.ParseBinaryImage(buffer, startIndex + 16, length - 16);
297297 m_currentData.ParseBinaryImage(buffer, startIndex + 32, length - 32);
298− ActiveDataBlockIndex = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 48) - 1;
299− ActiveDataBlockSlot = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 52);
300− Slope1 = EndianOrder.LittleEndian.ToDouble(buffer, startIndex + 56);
301− Slope2 = EndianOrder.LittleEndian.ToDouble(buffer, startIndex + 64);
298+ ActiveDataBlockIndex = LittleEndian.ToInt32(buffer, startIndex + 48) - 1;
299+ ActiveDataBlockSlot = LittleEndian.ToInt32(buffer, startIndex + 52);
300+ Slope1 = LittleEndian.ToDouble(buffer, startIndex + 56);
301+ Slope2 = LittleEndian.ToDouble(buffer, startIndex + 64);
302302
303303 return FixedLength;
304304 }
Source/Libraries/GSF.Historian/Files/StateRecordDataPoint.cs+3−3
@@ -200,9 +200,9 @@ namespace GSF.Historian.Files · 199 unmodified lines
200200 if (length >= FixedLength)
201201 {
202202 // Binary image has sufficient data.
203− Time = new TimeTag(EndianOrder.LittleEndian.ToDouble(buffer, startIndex));
204− Flags = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 8);
205− Value = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 12);
203+ Time = new TimeTag(LittleEndian.ToDouble(buffer, startIndex));
204+ Flags = LittleEndian.ToInt32(buffer, startIndex + 8);
205+ Value = LittleEndian.ToSingle(buffer, startIndex + 12);
206206
207207 return FixedLength;
208208 }
Source/Libraries/GSF.Historian/Files/StateRecordSummary.cs+3−3
@@ -126,7 +126,7 @@ namespace GSF.Historian.Files · 125 unmodified lines
126126 }
127127 private set
128128 {
129− if (value == null)
129+ if ((object)value == null)
130130 throw new ArgumentNullException("value");
131131
132132 m_currentData = value;
@@ -160,7 +160,7 @@ namespace GSF.Historian.Files · 27 unmodified lines
160160 if (length >= FixedLength)
161161 {
162162 // Binary image has sufficient data.
163− HistorianID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex);
163+ HistorianID = LittleEndian.ToInt32(buffer, startIndex);
164164 CurrentData = new StateRecordDataPoint(HistorianID, buffer, startIndex + 4, length - 4);
165165
166166 return FixedLength;
@@ -189,7 +189,7 @@ namespace GSF.Historian.Files · 22 unmodified lines
189189
190190 buffer.ValidateParameters(startIndex, length);
191191
192− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex, 4);
192+ Buffer.BlockCopy(LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex, 4);
193193 m_currentData.GenerateBinaryImage(buffer, startIndex + 4);
194194
195195 return length;
Source/Libraries/GSF.Historian/Packets/PacketCommonHeader.cs+1−1
@@ -49,7 +49,7 @@ namespace GSF.Historian.Packets · 48 unmodified lines
4949 public PacketCommonHeader(byte[] buffer, int startIndex, int length)
5050 {
5151 if (length > 1)
52− TypeID = EndianOrder.LittleEndian.ToInt16(buffer, startIndex);
52+ TypeID = LittleEndian.ToInt16(buffer, startIndex);
5353 else
5454 throw new InvalidOperationException("Not enough length available to parse common header");
5555 }
Source/Libraries/GSF.Historian/Packets/PacketType1.cs+10−10
@@ -234,15 +234,15 @@ namespace GSF.Historian.Packets · 233 unmodified lines
234234 if (length >= FixedLength)
235235 {
236236 // Binary image has sufficient data.
237− short packetID = EndianOrder.LittleEndian.ToInt16(buffer, startIndex);
237+ short packetID = LittleEndian.ToInt16(buffer, startIndex);
238238 if (packetID != TypeID)
239239 throw new ArgumentException(string.Format("Unexpected packet id '{0}' (expected '{1}')", packetID, TypeID));
240240
241241 // We have a binary image with the correct packet id.
242− HistorianID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2);
243− Time = new TimeTag(EndianOrder.LittleEndian.ToDouble(buffer, startIndex + 6));
244− Quality = (Quality)(EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 14));
245− Value = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 18);
242+ HistorianID = LittleEndian.ToInt32(buffer, startIndex + 2);
243+ Time = new TimeTag(LittleEndian.ToDouble(buffer, startIndex + 6));
244+ Quality = (Quality)(LittleEndian.ToInt32(buffer, startIndex + 14));
245+ Value = LittleEndian.ToSingle(buffer, startIndex + 18);
246246
247247 // We'll send an "ACK" to the sender if this is the last packet in the transmission.
248248 if (length == FixedLength)
@@ -274,11 +274,11 @@ namespace GSF.Historian.Packets · 25 unmodified lines
274274
275275 buffer.ValidateParameters(startIndex, length);
276276
277− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
278− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex + 2, 4);
279− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_time.Value), 0, buffer, startIndex + 6, 8);
280− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes((int)m_quality), 0, buffer, startIndex + 14, 4);
281− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_value), 0, buffer, startIndex + 18, 4);
277+ Buffer.BlockCopy(LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
278+ Buffer.BlockCopy(LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex + 2, 4);
279+ Buffer.BlockCopy(LittleEndian.GetBytes(m_time.Value), 0, buffer, startIndex + 6, 8);
280+ Buffer.BlockCopy(LittleEndian.GetBytes((int)m_quality), 0, buffer, startIndex + 14, 4);
281+ Buffer.BlockCopy(LittleEndian.GetBytes(m_value), 0, buffer, startIndex + 18, 4);
282282
283283 return length;
284284 }
Source/Libraries/GSF.Historian/Packets/PacketType101.cs+4−4
@@ -166,12 +166,12 @@ namespace GSF.Historian.Packets · 165 unmodified lines
166166 if (length >= 6)
167167 {
168168 // Binary image has sufficient data.
169− short packetID = EndianOrder.LittleEndian.ToInt16(buffer, startIndex);
169+ short packetID = LittleEndian.ToInt16(buffer, startIndex);
170170 if (packetID != TypeID)
171171 throw new ArgumentException(string.Format("Unexpected packet id '{0}' (expected '{1}')", packetID, TypeID));
172172
173173 // Ensure that the binary image is complete
174− int dataCount = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2);
174+ int dataCount = LittleEndian.ToInt32(buffer, startIndex + 2);
175175 if (length < 6 + dataCount * PacketType101DataPoint.FixedLength)
176176 return 0;
177177
@@ -210,8 +210,8 @@ namespace GSF.Historian.Packets · 32 unmodified lines
210210
211211 buffer.ValidateParameters(startIndex, length);
212212
213− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
214− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_data.Count), 0, buffer, startIndex + 2, 4);
213+ Buffer.BlockCopy(LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
214+ Buffer.BlockCopy(LittleEndian.GetBytes(m_data.Count), 0, buffer, startIndex + 2, 4);
215215 for (int i = 0; i < m_data.Count; i++)
216216 {
217217 m_data[i].GenerateBinaryImage(buffer, startIndex + 6 + (i * PacketType101DataPoint.FixedLength));
Source/Libraries/GSF.Historian/Packets/PacketType101DataPoint.cs+8−8
@@ -135,10 +135,10 @@ namespace GSF.Historian.Packets · 134 unmodified lines
135135 if (length >= FixedLength)
136136 {
137137 // Binary image has sufficient data.
138− HistorianID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex);
139− Flags = EndianOrder.LittleEndian.ToInt16(buffer, startIndex + 8);
140− Value = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 10);
141− Time = new TimeTag(EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 4) + // Seconds
138+ HistorianID = LittleEndian.ToInt32(buffer, startIndex);
139+ Flags = LittleEndian.ToInt16(buffer, startIndex + 8);
140+ Value = LittleEndian.ToSingle(buffer, startIndex + 10);
141+ Time = new TimeTag(LittleEndian.ToInt32(buffer, startIndex + 4) + // Seconds
142142 ((double)(Flags.GetMaskedValue(MillisecondMask) >> 5) / 1000)); // Milliseconds
143143
144144 return FixedLength;
@@ -167,10 +167,10 @@ namespace GSF.Historian.Packets · 22 unmodified lines
167167
168168 buffer.ValidateParameters(startIndex, length);
169169
170− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(HistorianID), 0, buffer, startIndex, 4);
171− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes((int)Time.Value), 0, buffer, startIndex + 4, 4);
172− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes((short)Flags), 0, buffer, startIndex + 8, 2);
173− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(Value), 0, buffer, startIndex + 10, 4);
170+ Buffer.BlockCopy(LittleEndian.GetBytes(HistorianID), 0, buffer, startIndex, 4);
171+ Buffer.BlockCopy(LittleEndian.GetBytes((int)Time.Value), 0, buffer, startIndex + 4, 4);
172+ Buffer.BlockCopy(LittleEndian.GetBytes((short)Flags), 0, buffer, startIndex + 8, 2);
173+ Buffer.BlockCopy(LittleEndian.GetBytes(Value), 0, buffer, startIndex + 10, 4);
174174
175175 return length;
176176 }
Source/Libraries/GSF.Historian/Packets/PacketType2.cs+18−18
@@ -339,22 +339,22 @@ namespace GSF.Historian.Packets · 338 unmodified lines
339339 if (length >= FixedLength)
340340 {
341341 // Binary image has sufficient data.
342− short packetID = EndianOrder.LittleEndian.ToInt16(buffer, startIndex);
342+ short packetID = LittleEndian.ToInt16(buffer, startIndex);
343343 if (packetID != TypeID)
344344 throw new ArgumentException(string.Format("Unexpected packet id '{0}' (expected '{1}')", packetID, TypeID));
345345
346346 // We have a binary image with the correct packet id.
347− HistorianID = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2);
348− Year = EndianOrder.LittleEndian.ToInt16(buffer, startIndex + 6);
347+ HistorianID = LittleEndian.ToInt32(buffer, startIndex + 2);
348+ Year = LittleEndian.ToInt16(buffer, startIndex + 6);
349349 Month = Convert.ToInt16(buffer[startIndex + 8]);
350350 Day = Convert.ToInt16(buffer[startIndex + 9]);
351351 Hour = Convert.ToInt16(buffer[startIndex + 10]);
352352 Minute = Convert.ToInt16(buffer[startIndex + 11]);
353353 Second = Convert.ToInt16(buffer[startIndex + 12]);
354354 Quality = (Quality)(buffer[startIndex + 13]);
355− Millisecond = EndianOrder.LittleEndian.ToInt16(buffer, startIndex + 14);
356− GmtOffset = EndianOrder.LittleEndian.ToInt16(buffer, startIndex + 16);
357− Value = EndianOrder.LittleEndian.ToSingle(buffer, startIndex + 18);
355+ Millisecond = LittleEndian.ToInt16(buffer, startIndex + 14);
356+ GmtOffset = LittleEndian.ToInt16(buffer, startIndex + 16);
357+ Value = LittleEndian.ToSingle(buffer, startIndex + 18);
358358
359359 // We'll send an "ACK" to the sender if this is the last packet in the transmission.
360360 if (length == FixedLength)
@@ -386,18 +386,18 @@ namespace GSF.Historian.Packets · 25 unmodified lines
386386
387387 buffer.ValidateParameters(startIndex, length);
388388
389− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
390− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex + 2, 4);
391− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_year), 0, buffer, startIndex + 6, 2);
392− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_month), 0, buffer, startIndex + 8, 1);
393− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_day), 0, buffer, startIndex + 9, 1);
394− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_hour), 0, buffer, startIndex + 10, 1);
395− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_minute), 0, buffer, startIndex + 11, 1);
396− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_second), 0, buffer, startIndex + 12, 1);
397− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes((int)m_quality), 0, buffer, startIndex + 13, 1);
398− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_millisecond), 0, buffer, startIndex + 14, 2);
399− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_gmtOffset), 0, buffer, startIndex + 16, 2);
400− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_value), 0, buffer, startIndex + 18, 4);
389+ Buffer.BlockCopy(LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
390+ Buffer.BlockCopy(LittleEndian.GetBytes(m_historianID), 0, buffer, startIndex + 2, 4);
391+ Buffer.BlockCopy(LittleEndian.GetBytes(m_year), 0, buffer, startIndex + 6, 2);
392+ Buffer.BlockCopy(LittleEndian.GetBytes(m_month), 0, buffer, startIndex + 8, 1);
393+ Buffer.BlockCopy(LittleEndian.GetBytes(m_day), 0, buffer, startIndex + 9, 1);
394+ Buffer.BlockCopy(LittleEndian.GetBytes(m_hour), 0, buffer, startIndex + 10, 1);
395+ Buffer.BlockCopy(LittleEndian.GetBytes(m_minute), 0, buffer, startIndex + 11, 1);
396+ Buffer.BlockCopy(LittleEndian.GetBytes(m_second), 0, buffer, startIndex + 12, 1);
397+ Buffer.BlockCopy(LittleEndian.GetBytes((int)m_quality), 0, buffer, startIndex + 13, 1);
398+ Buffer.BlockCopy(LittleEndian.GetBytes(m_millisecond), 0, buffer, startIndex + 14, 2);
399+ Buffer.BlockCopy(LittleEndian.GetBytes(m_gmtOffset), 0, buffer, startIndex + 16, 2);
400+ Buffer.BlockCopy(LittleEndian.GetBytes(m_value), 0, buffer, startIndex + 18, 4);
401401
402402 return length;
403403 }
Source/Libraries/GSF.Historian/Packets/PacketType5.cs+2−2
@@ -113,7 +113,7 @@ namespace GSF.Historian.Packets · 112 unmodified lines
113113 if (length >= FixedLength)
114114 {
115115 // Binary image has sufficient data.
116− short packetID = EndianOrder.LittleEndian.ToInt16(buffer, startIndex);
116+ short packetID = LittleEndian.ToInt16(buffer, startIndex);
117117 if (packetID != TypeID)
118118 throw new ArgumentException(string.Format("Unexpected packet id '{0}' (expected '{1}')", packetID, TypeID));
119119
@@ -143,7 +143,7 @@ namespace GSF.Historian.Packets · 23 unmodified lines
143143
144144 buffer.ValidateParameters(startIndex, length);
145145
146− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
146+ Buffer.BlockCopy(LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
147147
148148 return length;
149149 }
Source/Libraries/GSF.Historian/Packets/QueryPacketBase.cs+6−6
@@ -114,12 +114,12 @@ namespace GSF.Historian.Packets · 113 unmodified lines
114114 if (length >= 6)
115115 {
116116 // Binary image has sufficient data.
117− short packetID = EndianOrder.LittleEndian.ToInt16(buffer, startIndex);
117+ short packetID = LittleEndian.ToInt16(buffer, startIndex);
118118 if (packetID != TypeID)
119119 throw new ArgumentException(string.Format("Unexpected packet id '{0}' (expected '{1}')", packetID, TypeID));
120120
121121 // Ensure that the binary image is complete
122− int requestIDCount = EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2);
122+ int requestIDCount = LittleEndian.ToInt32(buffer, startIndex + 2);
123123 if (length < 6 + requestIDCount * 4)
124124 return 0;
125125
@@ -127,7 +127,7 @@ namespace GSF.Historian.Packets · 1 unmodified line
127127 m_requestIDs.Clear();
128128 for (int i = 0; i < requestIDCount; i++)
129129 {
130− m_requestIDs.Add(EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 6 + (i * 4)));
130+ m_requestIDs.Add(LittleEndian.ToInt32(buffer, startIndex + 6 + (i * 4)));
131131 }
132132
133133 return BinaryLength;
@@ -156,11 +156,11 @@ namespace GSF.Historian.Packets · 22 unmodified lines
156156
157157 buffer.ValidateParameters(startIndex, length);
158158
159− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
160− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_requestIDs.Count), 0, buffer, startIndex + 2, 4);
159+ Buffer.BlockCopy(LittleEndian.GetBytes(TypeID), 0, buffer, startIndex, 2);
160+ Buffer.BlockCopy(LittleEndian.GetBytes(m_requestIDs.Count), 0, buffer, startIndex + 2, 4);
161161 for (int i = 0; i < m_requestIDs.Count; i++)
162162 {
163− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(m_requestIDs[i]), 0, buffer, startIndex + 6 + (i * 4), 4);
163+ Buffer.BlockCopy(LittleEndian.GetBytes(m_requestIDs[i]), 0, buffer, startIndex + 6 + (i * 4), 4);
164164 }
165165
166166 return length;
Source/Libraries/GSF.Media/RiffChunk.cs+3−3
@@ -225,7 +225,7 @@ namespace GSF.Media · 224 unmodified lines
225225 buffer.ValidateParameters(startIndex, FixedLength);
226226
227227 Buffer.BlockCopy(Encoding.ASCII.GetBytes(TypeID), 0, buffer, 0, 4);
228− Buffer.BlockCopy(EndianOrder.LittleEndian.GetBytes(ChunkSize), 0, buffer, 4, 4);
228+ Buffer.BlockCopy(LittleEndian.GetBytes(ChunkSize), 0, buffer, 4, 4);
229229
230230 return FixedLength;
231231 }
@@ -274,13 +274,13 @@ namespace GSF.Media · 42 unmodified lines
274274 throw new InvalidOperationException("RIFF chunk too small, media file corrupted");
275275
276276 riffChunk.TypeID = Encoding.ASCII.GetString(buffer, 0, 4);
277− riffChunk.ChunkSize = EndianOrder.LittleEndian.ToInt32(buffer, 4);
277+ riffChunk.ChunkSize = LittleEndian.ToInt32(buffer, 4);
278278
279279 return riffChunk;
280280 }
281281 finally
282282 {
283− if (buffer != null)
283+ if ((object)buffer != null)
284284 BufferPool.ReturnBuffer(buffer);
285285 }
286286 }
Source/Libraries/GSF.Media/RiffHeaderChunk.cs+1−1
@@ -140,7 +140,7 @@ namespace GSF.Media · 139 unmodified lines
140140 }
141141 finally
142142 {
143− if (buffer != null)
143+ if ((object)buffer != null)
144144 BufferPool.ReturnBuffer(buffer);
145145 }
146146 }
Source/Libraries/GSF.Media/WaveDataChunk.cs+1−1
@@ -141,7 +141,7 @@ namespace GSF.Media · 140 unmodified lines
141141 }
142142 finally
143143 {
144− if (buffer != null)
144+ if ((object)buffer != null)
145145 BufferPool.ReturnBuffer(buffer);
146146 }
147147 }
Source/Libraries/GSF.Media/WaveFormatChunk.cs+15−15
@@ -147,7 +147,7 @@ namespace GSF.Media · 146 unmodified lines
147147 }
148148 finally
149149 {
150− if (buffer != null)
150+ if ((object)buffer != null)
151151 BufferPool.ReturnBuffer(buffer);
152152 }
153153 }
@@ -382,19 +382,19 @@ namespace GSF.Media · 228 unmodified lines
382382 if (length < ChunkSize)
383383 throw new InvalidOperationException("WAVE format section too small, wave file corrupted");
384384
385− m_audioFormat = EndianOrder.LittleEndian.ToUInt16(buffer, 0);
386− m_channels = EndianOrder.LittleEndian.ToInt16(buffer, 2);
387− m_sampleRate = EndianOrder.LittleEndian.ToInt32(buffer, 4);
388− m_byteRate = EndianOrder.LittleEndian.ToInt32(buffer, 8);
389− m_blockAlignment = EndianOrder.LittleEndian.ToInt16(buffer, 12);
390− m_bitsPerSample = EndianOrder.LittleEndian.ToInt16(buffer, 14);
385+ m_audioFormat = LittleEndian.ToUInt16(buffer, 0);
386+ m_channels = LittleEndian.ToInt16(buffer, 2);
387+ m_sampleRate = LittleEndian.ToInt32(buffer, 4);
388+ m_byteRate = LittleEndian.ToInt32(buffer, 8);
389+ m_blockAlignment = LittleEndian.ToInt16(buffer, 12);
390+ m_bitsPerSample = LittleEndian.ToInt16(buffer, 14);
391391
392392 if (m_bitsPerSample % 8 != 0)
393393 throw new InvalidDataException("Invalid bit rate encountered - wave file bit rates must be a multiple of 8");
394394
395395 if (length > 16)
396396 {
397− m_extraParametersSize = EndianOrder.LittleEndian.ToInt16(buffer, 16);
397+ m_extraParametersSize = LittleEndian.ToInt16(buffer, 16);
398398 return 18;
399399 }
400400
@@ -419,17 +419,17 @@ namespace GSF.Media · 18 unmodified lines
419419 buffer.ValidateParameters(startIndex, length);
420420
421421 startIndex += base.GenerateBinaryImage(buffer, startIndex);
422− EndianOrder.LittleEndian.CopyBytes(m_audioFormat, buffer, startIndex);
423− EndianOrder.LittleEndian.CopyBytes(m_channels, buffer, startIndex + 2);
424− EndianOrder.LittleEndian.CopyBytes(m_sampleRate, buffer, startIndex + 4);
425− EndianOrder.LittleEndian.CopyBytes(m_byteRate, buffer, startIndex + 8);
426− EndianOrder.LittleEndian.CopyBytes(m_blockAlignment, buffer, startIndex + 12);
427− EndianOrder.LittleEndian.CopyBytes(m_bitsPerSample, buffer, startIndex + 14);
422+ LittleEndian.CopyBytes(m_audioFormat, buffer, startIndex);
423+ LittleEndian.CopyBytes(m_channels, buffer, startIndex + 2);
424+ LittleEndian.CopyBytes(m_sampleRate, buffer, startIndex + 4);
425+ LittleEndian.CopyBytes(m_byteRate, buffer, startIndex + 8);
426+ LittleEndian.CopyBytes(m_blockAlignment, buffer, startIndex + 12);
427+ LittleEndian.CopyBytes(m_bitsPerSample, buffer, startIndex + 14);
428428 startIndex += 16;
429429
430430 if (m_extraParametersSize > 0)
431431 {
432− EndianOrder.LittleEndian.CopyBytes(m_extraParametersSize, buffer, startIndex);
432+ LittleEndian.CopyBytes(m_extraParametersSize, buffer, startIndex);
433433 startIndex += 2;
434434
435435 if (m_extraParametersSize > 0 && (object)m_extraParameters != null)
Source/Libraries/GSF.Media/WaveFormatExtensible.cs+6−6
@@ -317,9 +317,9 @@ namespace GSF.Media · 316 unmodified lines
317317 {
318318 buffer.ValidateParameters(startIndex, length);
319319
320− m_sampleValue = EndianOrder.LittleEndian.ToUInt16(buffer, startIndex);
321− m_channelMask = (Speakers)EndianOrder.LittleEndian.ToInt32(buffer, startIndex + 2);
322− m_subFormat = EndianOrder.LittleEndian.ToGuid(buffer, startIndex + 6);
320+ m_sampleValue = LittleEndian.ToUInt16(buffer, startIndex);
321+ m_channelMask = (Speakers)LittleEndian.ToInt32(buffer, startIndex + 2);
322+ m_subFormat = new Guid(buffer.BlockCopy(startIndex + 6, 8));
323323
324324 return BinaryLength;
325325 }
@@ -339,9 +339,9 @@ namespace GSF.Media · 13 unmodified lines
339339 {
340340 buffer.ValidateParameters(startIndex, FixedLength);
341341
342− EndianOrder.LittleEndian.CopyBytes(m_sampleValue, buffer, 0);
343− EndianOrder.LittleEndian.CopyBytes((int)m_channelMask, buffer, 2);
344− EndianOrder.LittleEndian.CopyBytes(m_subFormat, buffer, 6);
342+ LittleEndian.CopyBytes(m_sampleValue, buffer, 0);
343+ LittleEndian.CopyBytes((int)m_channelMask, buffer, 2);
344+ m_subFormat.ToByteArray().CopyTo(buffer, 6);
345345
346346 return FixedLength;
347347 }
Source/Libraries/GSF.PQDIF/Physical/ScalarElement.cs+26−26
@@ -145,7 +145,7 @@ namespace GSF.PQDIF.Physical · 144 unmodified lines
145145 /// <returns>The value as a 16-bit unsigned integer.</returns>
146146 public ushort GetUInt2()
147147 {
148− return EndianOrder.LittleEndian.ToUInt16(m_value, 0);
148+ return LittleEndian.ToUInt16(m_value, 0);
149149 }
150150
151151 /// <summary>
@@ -154,7 +154,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
154154 /// <param name="value">The new value as a 16-bit unsigned integer.</param>
155155 public void SetUInt2(ushort value)
156156 {
157− EndianOrder.LittleEndian.CopyBytes(value, m_value, 0);
157+ LittleEndian.CopyBytes(value, m_value, 0);
158158 }
159159
160160 /// <summary>
@@ -163,7 +163,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
163163 /// <returns>The value as a 16-bit signed integer.</returns>
164164 public short GetInt2()
165165 {
166− return EndianOrder.LittleEndian.ToInt16(m_value, 0);
166+ return LittleEndian.ToInt16(m_value, 0);
167167 }
168168
169169 /// <summary>
@@ -172,7 +172,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
172172 /// <param name="value">The new value as a 16-bit signed integer.</param>
173173 public void SetInt2(short value)
174174 {
175− EndianOrder.LittleEndian.CopyBytes(value, m_value, 0);
175+ LittleEndian.CopyBytes(value, m_value, 0);
176176 }
177177
178178 /// <summary>
@@ -181,7 +181,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
181181 /// <returns>The value as a 32-bit unsigned integer.</returns>
182182 public uint GetUInt4()
183183 {
184− return EndianOrder.LittleEndian.ToUInt32(m_value, 0);
184+ return LittleEndian.ToUInt32(m_value, 0);
185185 }
186186
187187 /// <summary>
@@ -190,7 +190,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
190190 /// <param name="value">The new value as a 32-bit unsigned integer.</param>
191191 public void SetUInt4(uint value)
192192 {
193− EndianOrder.LittleEndian.CopyBytes(value, m_value, 0);
193+ LittleEndian.CopyBytes(value, m_value, 0);
194194 }
195195
196196 /// <summary>
@@ -199,7 +199,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
199199 /// <returns>The value as a 32-bit signed integer.</returns>
200200 public int GetInt4()
201201 {
202− return EndianOrder.LittleEndian.ToInt32(m_value, 0);
202+ return LittleEndian.ToInt32(m_value, 0);
203203 }
204204
205205 /// <summary>
@@ -208,7 +208,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
208208 /// <param name="value">The new value as a 32-bit signed integer.</param>
209209 public void SetInt4(int value)
210210 {
211− EndianOrder.LittleEndian.CopyBytes(value, m_value, 0);
211+ LittleEndian.CopyBytes(value, m_value, 0);
212212 }
213213
214214 /// <summary>
@@ -217,7 +217,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
217217 /// <returns>The value as a 4-byte boolean.</returns>
218218 public bool GetBool4()
219219 {
220− return EndianOrder.LittleEndian.ToInt32(m_value, 0) != 0;
220+ return LittleEndian.ToInt32(m_value, 0) != 0;
221221 }
222222
223223 /// <summary>
@@ -226,7 +226,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
226226 /// <param name="value">The new value as a 4-byte boolean.</param>
227227 public void SetBool4(bool value)
228228 {
229− EndianOrder.LittleEndian.CopyBytes(value ? 1 : 0, m_value, 0);
229+ LittleEndian.CopyBytes(value ? 1 : 0, m_value, 0);
230230 }
231231
232232 /// <summary>
@@ -235,7 +235,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
235235 /// <returns>The value as a 32-bit floating point number.</returns>
236236 public float GetReal4()
237237 {
238− return EndianOrder.LittleEndian.ToSingle(m_value, 0);
238+ return LittleEndian.ToSingle(m_value, 0);
239239 }
240240
241241 /// <summary>
@@ -244,7 +244,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
244244 /// <param name="value">The new value as a 32-bit floating point number.</param>
245245 public void SetReal4(float value)
246246 {
247− EndianOrder.LittleEndian.CopyBytes(value, m_value, 0);
247+ LittleEndian.CopyBytes(value, m_value, 0);
248248 }
249249
250250 /// <summary>
@@ -253,7 +253,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
253253 /// <returns>The value as a 64-bit floating point number.</returns>
254254 public double GetReal8()
255255 {
256− return EndianOrder.LittleEndian.ToDouble(m_value, 0);
256+ return LittleEndian.ToDouble(m_value, 0);
257257 }
258258
259259 /// <summary>
@@ -262,7 +262,7 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
262262 /// <param name="value">The new value as a 64-bit floating point number.</param>
263263 public void SetReal8(double value)
264264 {
265− EndianOrder.LittleEndian.CopyBytes(value, m_value, 0);
265+ LittleEndian.CopyBytes(value, m_value, 0);
266266 }
267267
268268 /// <summary>
@@ -271,8 +271,8 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
271271 /// <returns>The value as an 8-byte complex number.</returns>
272272 public ComplexNumber GetComplex8()
273273 {
274− double real = EndianOrder.LittleEndian.ToSingle(m_value, 0);
275− double imaginary = EndianOrder.LittleEndian.ToSingle(m_value, 4);
274+ double real = LittleEndian.ToSingle(m_value, 0);
275+ double imaginary = LittleEndian.ToSingle(m_value, 4);
276276 return new ComplexNumber(real, imaginary);
277277 }
278278
@@ -282,8 +282,8 @@ namespace GSF.PQDIF.Physical · 3 unmodified lines
282282 /// <param name="value">The new value as an 8-byte complex number.</param>
283283 public void SetComplex8(ComplexNumber value)
284284 {
285− EndianOrder.LittleEndian.CopyBytes((float)value.Real, m_value, 0);
286− EndianOrder.LittleEndian.CopyBytes((float)value.Imaginary, m_value, 4);
285+ LittleEndian.CopyBytes((float)value.Real, m_value, 0);
286+ LittleEndian.CopyBytes((float)value.Imaginary, m_value, 4);
287287 }
288288
289289 /// <summary>
@@ -292,8 +292,8 @@ namespace GSF.PQDIF.Physical · 2 unmodified lines
292292 /// <returns>The value as a 16-byte complex number.</returns>
293293 public ComplexNumber GetComplex16()
294294 {
295− double real = EndianOrder.LittleEndian.ToDouble(m_value, 0);
296− double imaginary = EndianOrder.LittleEndian.ToDouble(m_value, 8);
295+ double real = LittleEndian.ToDouble(m_value, 0);
296+ double imaginary = LittleEndian.ToDouble(m_value, 8);
297297 return new ComplexNumber(real, imaginary);
298298 }
299299
@@ -303,8 +303,8 @@ namespace GSF.PQDIF.Physical · 3 unmodified lines
303303 /// <param name="value">The new value as a 16-byte complex number.</param>
304304 public void SetComplex16(ComplexNumber value)
305305 {
306− EndianOrder.LittleEndian.CopyBytes(value.Real, m_value, 0);
307− EndianOrder.LittleEndian.CopyBytes(value.Imaginary, m_value, 0);
306+ LittleEndian.CopyBytes(value.Real, m_value, 0);
307+ LittleEndian.CopyBytes(value.Imaginary, m_value, 0);
308308 }
309309
310310 /// <summary>
@@ -332,8 +332,8 @@ namespace GSF.PQDIF.Physical · 21 unmodified lines
332332 public DateTime GetTimestamp()
333333 {
334334 DateTime epoch = new DateTime(1900, 1, 1);
335− uint days = EndianOrder.LittleEndian.ToUInt32(m_value, 0);
336− double seconds = EndianOrder.LittleEndian.ToDouble(m_value, 4);
335+ uint days = LittleEndian.ToUInt32(m_value, 0);
336+ double seconds = LittleEndian.ToDouble(m_value, 4);
337337
338338 return DateTime.SpecifyKind(epoch.AddDays(days).AddSeconds(seconds), DateTimeKind.Utc);
339339 }
@@ -349,8 +349,8 @@ namespace GSF.PQDIF.Physical · 9 unmodified lines
349349 TimeSpan daySpan = TimeSpan.FromDays(Math.Floor(sinceEpoch.TotalDays));
350350 TimeSpan secondSpan = sinceEpoch - daySpan;
351351
352− EndianOrder.LittleEndian.CopyBytes((uint)daySpan.TotalDays, m_value, 0);
353− EndianOrder.LittleEndian.CopyBytes(secondSpan.TotalSeconds, m_value, 0);
352+ LittleEndian.CopyBytes((uint)daySpan.TotalDays, m_value, 0);
353+ LittleEndian.CopyBytes(secondSpan.TotalSeconds, m_value, 0);
354354 }
355355
356356 /// <summary>
Source/Libraries/GSF.PQDIF/Physical/VectorElement.cs+14−14
@@ -211,7 +211,7 @@ namespace GSF.PQDIF.Physical · 210 unmodified lines
211211 throw new InvalidOperationException("Unable to retrieve values from uninitialized vector; set the size and physical type of the vector first");
212212
213213 int byteIndex = index * 2;
214− return EndianOrder.LittleEndian.ToInt16(m_values, byteIndex);
214+ return LittleEndian.ToInt16(m_values, byteIndex);
215215 }
216216
217217 /// <summary>
@@ -225,7 +225,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
225225 throw new InvalidOperationException("Unable to insert values into uninitialized vector; set the size and physical type of the vector first");
226226
227227 int byteIndex = index * 2;
228− EndianOrder.LittleEndian.CopyBytes(value, m_values, byteIndex);
228+ LittleEndian.CopyBytes(value, m_values, byteIndex);
229229 }
230230
231231 /// <summary>
@@ -239,7 +239,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
239239 throw new InvalidOperationException("Unable to retrieve values from uninitialized vector; set the size and physical type of the vector first");
240240
241241 int byteIndex = index * 4;
242− return EndianOrder.LittleEndian.ToInt32(m_values, byteIndex);
242+ return LittleEndian.ToInt32(m_values, byteIndex);
243243 }
244244
245245 /// <summary>
@@ -253,7 +253,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
253253 throw new InvalidOperationException("Unable to insert values into uninitialized vector; set the size and physical type of the vector first");
254254
255255 int byteIndex = index * 4;
256− EndianOrder.LittleEndian.CopyBytes(value, m_values, byteIndex);
256+ LittleEndian.CopyBytes(value, m_values, byteIndex);
257257 }
258258
259259 /// <summary>
@@ -267,7 +267,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
267267 throw new InvalidOperationException("Unable to retrieve values from uninitialized vector; set the size and physical type of the vector first");
268268
269269 int byteIndex = index * 4;
270− return EndianOrder.LittleEndian.ToUInt32(m_values, byteIndex);
270+ return LittleEndian.ToUInt32(m_values, byteIndex);
271271 }
272272
273273 /// <summary>
@@ -281,7 +281,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
281281 throw new InvalidOperationException("Unable to insert values into uninitialized vector; set the size and physical type of the vector first");
282282
283283 int byteIndex = index * 4;
284− EndianOrder.LittleEndian.CopyBytes(value, m_values, byteIndex);
284+ LittleEndian.CopyBytes(value, m_values, byteIndex);
285285 }
286286
287287 /// <summary>
@@ -295,7 +295,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
295295 throw new InvalidOperationException("Unable to retrieve values from uninitialized vector; set the size and physical type of the vector first");
296296
297297 int byteIndex = index * 4;
298− return EndianOrder.LittleEndian.ToSingle(m_values, byteIndex);
298+ return LittleEndian.ToSingle(m_values, byteIndex);
299299 }
300300
301301 /// <summary>
@@ -309,7 +309,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
309309 throw new InvalidOperationException("Unable to insert values into uninitialized vector; set the size and physical type of the vector first");
310310
311311 int byteIndex = index * 4;
312− EndianOrder.LittleEndian.CopyBytes(value, m_values, byteIndex);
312+ LittleEndian.CopyBytes(value, m_values, byteIndex);
313313 }
314314
315315 /// <summary>
@@ -323,7 +323,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
323323 throw new InvalidOperationException("Unable to retrieve values from uninitialized vector; set the size and physical type of the vector first");
324324
325325 int byteIndex = index * 8;
326− return EndianOrder.LittleEndian.ToDouble(m_values, byteIndex);
326+ return LittleEndian.ToDouble(m_values, byteIndex);
327327 }
328328
329329 /// <summary>
@@ -337,7 +337,7 @@ namespace GSF.PQDIF.Physical · 7 unmodified lines
337337 throw new InvalidOperationException("Unable to insert values into uninitialized vector; set the size and physical type of the vector first");
338338
339339 int byteIndex = index * 8;
340− EndianOrder.LittleEndian.CopyBytes(value, m_values, byteIndex);
340+ LittleEndian.CopyBytes(value, m_values, byteIndex);
341341 }
342342
343343 /// <summary>
@@ -353,8 +353,8 @@ namespace GSF.PQDIF.Physical · 9 unmodified lines
353353 int byteIndex = index * 12;
354354
355355 DateTime epoch = new DateTime(1900, 1, 1);
356− uint days = EndianOrder.LittleEndian.ToUInt32(m_values, byteIndex);
357− double seconds = EndianOrder.LittleEndian.ToDouble(m_values, byteIndex + 4);
356+ uint days = LittleEndian.ToUInt32(m_values, byteIndex);
357+ double seconds = LittleEndian.ToDouble(m_values, byteIndex + 4);
358358
359359 return DateTime.SpecifyKind(epoch.AddDays(days).AddSeconds(seconds), DateTimeKind.Utc);
360360 }
@@ -376,8 +376,8 @@ namespace GSF.PQDIF.Physical · 15 unmodified lines
376376 TimeSpan daySpan = TimeSpan.FromDays(Math.Floor(sinceEpoch.TotalDays));
377377 TimeSpan secondSpan = sinceEpoch - daySpan;
378378
379− EndianOrder.LittleEndian.CopyBytes((uint)daySpan.TotalDays, m_values, byteIndex);
380− EndianOrder.LittleEndian.CopyBytes(secondSpan.TotalSeconds, m_values, byteIndex + 4);
379+ LittleEndian.CopyBytes((uint)daySpan.TotalDays, m_values, byteIndex);
380+ LittleEndian.CopyBytes(secondSpan.TotalSeconds, m_values, byteIndex + 4);
381381 }
382382
383383 /// <summary>
Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/CommonFrameHeader.cs+17−17
@@ -122,8 +122,8 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 121 unmodified lines
122122 m_fileType = (FileType)buffer[startIndex + 2];
123123 m_fileVersion = (FileVersion)buffer[startIndex + 3];
124124 m_sourceID = Encoding.ASCII.GetString(buffer, startIndex + 4, 4);
125− headerLength = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 8);
126− secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 12);
125+ headerLength = BigEndian.ToUInt32(buffer, startIndex + 8);
126+ secondOfCentury = BigEndian.ToUInt32(buffer, startIndex + 12);
127127
128128 switch (m_fileType)
129129 {
@@ -138,12 +138,12 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 8 unmodified lines
138138 break;
139139 }
140140
141− m_startSample = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 16);
142− m_sampleInterval = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 20);
143− m_sampleRate = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 22);
144− m_rowLength = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 24);
145− m_totalRows = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 28);
146− secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 32);
141+ m_startSample = BigEndian.ToUInt32(buffer, startIndex + 16);
142+ m_sampleInterval = BigEndian.ToUInt16(buffer, startIndex + 20);
143+ m_sampleRate = BigEndian.ToUInt16(buffer, startIndex + 22);
144+ m_rowLength = BigEndian.ToUInt32(buffer, startIndex + 24);
145+ m_totalRows = BigEndian.ToUInt32(buffer, startIndex + 28);
146+ secondOfCentury = BigEndian.ToUInt32(buffer, startIndex + 32);
147147
148148 switch (m_fileType)
149149 {
@@ -158,12 +158,12 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 8 unmodified lines
158158 break;
159159 }
160160
161− m_triggerSample = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 36);
162− m_preTriggerRows = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 40);
163− m_triggerPMU = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 44);
164− m_triggerType = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 46);
161+ m_triggerSample = BigEndian.ToUInt32(buffer, startIndex + 36);
162+ m_preTriggerRows = BigEndian.ToUInt32(buffer, startIndex + 40);
163+ m_triggerPMU = BigEndian.ToUInt16(buffer, startIndex + 44);
164+ m_triggerType = BigEndian.ToUInt16(buffer, startIndex + 46);
165165 m_userInformation = Encoding.ASCII.GetString(buffer, startIndex + 48, 80).Trim();
166− m_pmuCount = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 128);
166+ m_pmuCount = BigEndian.ToUInt32(buffer, startIndex + 128);
167167 FrameLength = unchecked((ushort)headerLength);
168168 }
169169 }
@@ -173,7 +173,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 3 unmodified lines
173173 CommonFrameHeader configFrameHeader;
174174
175175 m_packetNumber = (byte)BPAPDCstream.FrameType.DataFrame;
176− m_rowFlags = EndianOrder.BigEndian.ToUInt32(buffer, startIndex);
176+ m_rowFlags = BigEndian.ToUInt32(buffer, startIndex);
177177
178178 if (configFrame != null)
179179 {
@@ -217,13 +217,13 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 37 unmodified lines
217217 if (parseWordCountFromByte)
218218 m_wordCount = buffer[startIndex + 3];
219219 else
220− m_wordCount = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 2);
220+ m_wordCount = BigEndian.ToUInt16(buffer, startIndex + 2);
221221
222222 // If this is a data frame get a rough timestamp down to the second (full parse will get accurate timestamp), this way
223223 // data frames that don't get fully parsed because configuration hasn't been received will still show a timestamp
224224 if (m_packetNumber > 0 && length > 8)
225225 {
226− secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 4);
226+ secondOfCentury = BigEndian.ToUInt32(buffer, startIndex + 4);
227227
228228 // Until configuration is available, we make a guess at time tag type - this will just be
229229 // used for display purposes until a configuration frame arrives. If second of century
@@ -713,7 +713,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 483 unmodified lines
713713
714714 buffer[0] = PhasorProtocols.Common.SyncByte;
715715 buffer[1] = m_packetNumber;
716− EndianOrder.BigEndian.CopyBytes(m_wordCount, buffer, 2);
716+ BigEndian.CopyBytes(m_wordCount, buffer, 2);
717717
718718 return buffer;
719719 }
Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/ConfigurationCell.cs+4−4
@@ -489,8 +489,8 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 488 unmodified lines
489489 int index = 0;
490490
491491 IDLabelImage.CopyImage(buffer, ref index, IDLabelLength); // PMUID
492− EndianOrder.BigEndian.CopyBytes(Reserved, buffer, index); // Reserved
493− EndianOrder.BigEndian.CopyBytes(Offset, buffer, index + 2); // Offset
492+ BigEndian.CopyBytes(Reserved, buffer, index); // Reserved
493+ BigEndian.CopyBytes(Offset, buffer, index + 2); // Offset
494494
495495 return buffer;
496496 }
@@ -562,8 +562,8 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 65 unmodified lines
562562 protected override int ParseBodyImage(byte[] buffer, int startIndex, int length)
563563 {
564564 IDLabel = Encoding.ASCII.GetString(buffer, startIndex, 4);
565− Reserved = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 4);
566− Offset = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 6);
565+ Reserved = BigEndian.ToUInt16(buffer, startIndex + 4);
566+ Offset = BigEndian.ToUInt16(buffer, startIndex + 6);
567567
568568 return FixedBodyLength;
569569 }
Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/ConfigurationFrame.cs+10−10
@@ -392,10 +392,10 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 391 unmodified lines
392392 CommonHeader.BinaryImage.CopyImage(buffer, ref index, CommonFrameHeader.FixedLength);
393393 buffer[4] = (byte)StreamType;
394394 buffer[5] = (byte)RevisionNumber;
395− EndianOrder.BigEndian.CopyBytes(FrameRate, buffer, 6);
396− EndianOrder.BigEndian.CopyBytes(RowLength(true), buffer, 8); // <-- Important: This step calculates all PMU row offsets!
397− EndianOrder.BigEndian.CopyBytes(PacketsPerSample, buffer, 12);
398− EndianOrder.BigEndian.CopyBytes((ushort)Cells.Count, buffer, 14);
395+ BigEndian.CopyBytes(FrameRate, buffer, 6);
396+ BigEndian.CopyBytes(RowLength(true), buffer, 8); // <-- Important: This step calculates all PMU row offsets!
397+ BigEndian.CopyBytes(PacketsPerSample, buffer, 12);
398+ BigEndian.CopyBytes((ushort)Cells.Count, buffer, 14);
399399
400400 return buffer;
401401 }
@@ -456,10 +456,10 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 54 unmodified lines
456456 // Only need to parse what wan't already parsed in common frame header
457457 m_streamType = (StreamType)buffer[startIndex];
458458 m_revisionNumber = (RevisionNumber)buffer[startIndex + 1];
459− FrameRate = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 2);
460− m_rowLength = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 4);
461− m_packetsPerSample = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 8);
462− State.CellCount = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 10);
459+ FrameRate = BigEndian.ToUInt16(buffer, startIndex + 2);
460+ m_rowLength = BigEndian.ToUInt32(buffer, startIndex + 4);
461+ m_packetsPerSample = BigEndian.ToUInt16(buffer, startIndex + 8);
462+ State.CellCount = BigEndian.ToUInt16(buffer, startIndex + 10);
463463
464464 // The data that's in the data stream will take precedence over what's in the
465465 // in the configuration file. The configuration file may define more PMU's than
@@ -724,7 +724,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 258 unmodified lines
724724 protected override void AppendChecksum(byte[] buffer, int startIndex)
725725 {
726726 // Oddly enough, check sum for frames in BPA PDC stream is little-endian
727− EndianOrder.LittleEndian.CopyBytes(CalculateChecksum(buffer, 0, startIndex), buffer, startIndex);
727+ LittleEndian.CopyBytes(CalculateChecksum(buffer, 0, startIndex), buffer, startIndex);
728728 }
729729
730730 /// <summary>
@@ -746,7 +746,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 15 unmodified lines
746746 else
747747 {
748748 int sumLength = BinaryLength - 2;
749− return EndianOrder.LittleEndian.ToUInt16(buffer, startIndex + sumLength) == CalculateChecksum(buffer, startIndex, sumLength);
749+ return LittleEndian.ToUInt16(buffer, startIndex + sumLength) == CalculateChecksum(buffer, startIndex, sumLength);
750750 }
751751 }
752752
Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/DataCell.cs+3−3
@@ -521,7 +521,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 520 unmodified lines
521521 buffer[3] = (byte)PhasorValues.Count;
522522 }
523523
524− EndianOrder.BigEndian.CopyBytes(m_sampleNumber, buffer, 4);
524+ BigEndian.CopyBytes(m_sampleNumber, buffer, 4);
525525
526526 return buffer;
527527 }
@@ -586,7 +586,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 58 unmodified lines
586586 // Read data buffer if using phasor data file format
587587 if (UsePhasorDataFileFormat && frameState.RemainingPdcBlockPmus == 0)
588588 {
589− m_dataBuffer = EndianOrder.BigEndian.ToUInt32(buffer, index);
589+ m_dataBuffer = BigEndian.ToUInt32(buffer, index);
590590 index += 4;
591591 }
592592
@@ -659,7 +659,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 66 unmodified lines
659659 else
660660 {
661661 // Parse PMU's sample number
662− m_sampleNumber = EndianOrder.BigEndian.ToUInt16(buffer, index);
662+ m_sampleNumber = BigEndian.ToUInt16(buffer, index);
663663 index += 2;
664664 }
665665 }
Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/DataFrame.cs+10−10
@@ -287,12 +287,12 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 286 unmodified lines
287287 CommonHeader.BinaryImage.CopyImage(buffer, ref index, CommonFrameHeader.FixedLength);
288288
289289 if (ConfigurationFrame.RevisionNumber == RevisionNumber.Revision0)
290− EndianOrder.BigEndian.CopyBytes((uint)Math.Truncate(NtpTimeTag.Value), buffer, 4);
290+ BigEndian.CopyBytes((uint)Math.Truncate(NtpTimeTag.Value), buffer, 4);
291291 else
292− EndianOrder.BigEndian.CopyBytes((uint)Math.Truncate(TimeTag.Value), buffer, 4);
292+ BigEndian.CopyBytes((uint)Math.Truncate(TimeTag.Value), buffer, 4);
293293
294− EndianOrder.BigEndian.CopyBytes(m_sampleNumber, buffer, 8);
295− EndianOrder.BigEndian.CopyBytes((ushort)Cells.Count, buffer, 10);
294+ BigEndian.CopyBytes(m_sampleNumber, buffer, 8);
295+ BigEndian.CopyBytes((ushort)Cells.Count, buffer, 10);
296296
297297 index += 8;
298298
@@ -312,7 +312,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 13 unmodified lines
312312 index += 2;
313313
314314 // Add offset to data frame header
315− EndianOrder.BigEndian.CopyBytes(offset, buffer, index);
315+ BigEndian.CopyBytes(offset, buffer, index);
316316 index += 2;
317317
318318 offset += (ushort)dataCell.BinaryLength;
@@ -406,8 +406,8 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 87 unmodified lines
406406 int index = startIndex + CommonFrameHeader.FixedLength;
407407
408408 // Parse frame timestamp
409− uint secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, index);
410− m_sampleNumber = EndianOrder.BigEndian.ToUInt16(buffer, index + 4);
409+ uint secondOfCentury = BigEndian.ToUInt32(buffer, index);
410+ m_sampleNumber = BigEndian.ToUInt16(buffer, index + 4);
411411 index += 6;
412412
413413 if (configurationFrame.RevisionNumber == RevisionNumber.Revision0)
@@ -417,7 +417,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 3 unmodified lines
417417
418418 // Because in cases where PDCxchng is being used the data cell count will be smaller than the
419419 // configuration cell count - we save this count to calculate the offsets later
420− state.CellCount = EndianOrder.BigEndian.ToUInt16(buffer, index);
420+ state.CellCount = BigEndian.ToUInt16(buffer, index);
421421 index += 2;
422422
423423 if (state.CellCount > configurationFrame.Cells.Count)
@@ -463,7 +463,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 39 unmodified lines
463463 protected override void AppendChecksum(byte[] buffer, int startIndex)
464464 {
465465 // Oddly enough, check sum for frames in BPA PDC stream is little-endian
466− EndianOrder.LittleEndian.CopyBytes(CalculateChecksum(buffer, 0, startIndex), buffer, startIndex);
466+ LittleEndian.CopyBytes(CalculateChecksum(buffer, 0, startIndex), buffer, startIndex);
467467 }
468468
469469 /// <summary>
@@ -482,7 +482,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 12 unmodified lines
482482 return true;
483483
484484 int sumLength = BinaryLength - 2;
485− return EndianOrder.LittleEndian.ToUInt16(buffer, startIndex + sumLength) == CalculateChecksum(buffer, startIndex, sumLength);
485+ return LittleEndian.ToUInt16(buffer, startIndex + sumLength) == CalculateChecksum(buffer, startIndex, sumLength);
486486 }
487487
488488 /// <summary>
Source/Libraries/GSF.PhasorProtocols/BpaPdcStream/FrequencyValue.cs+2−2
@@ -136,7 +136,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 135 unmodified lines
136136 {
137137 byte[] buffer = new byte[2];
138138
139− EndianOrder.BigEndian.CopyBytes((short)UnscaledFrequency, buffer, 0);
139+ BigEndian.CopyBytes((short)UnscaledFrequency, buffer, 0);
140140
141141 return buffer;
142142 }
@@ -161,7 +161,7 @@ namespace GSF.PhasorProtocols.BPAPDCstream · 18 unmodified lines
161161 // PMUs in PDC block do not include Df/Dt
162162 if (Definition.Parent.IsPdcBlockSection)
163163 {
164− UnscaledFrequency = EndianOrder.BigEndian.ToInt16(buffer, startIndex);
164+ UnscaledFrequency = BigEndian.ToInt16(buffer, startIndex);
165165 return 2;
166166 }
167167
Source/Libraries/GSF.PhasorProtocols/ConfigurationCellBase.cs+1−1
@@ -184,7 +184,7 @@ namespace GSF.PhasorProtocols · 183 unmodified lines
184184 }
185185 set
186186 {
187− if (value == null)
187+ if ((object)value == null)
188188 value = "";
189189
190190 value = value.GetValidLabel();
Source/Libraries/GSF.PhasorProtocols/FrameParserBase.cs+8−5
@@ -165,11 +165,14 @@ namespace GSF.PhasorProtocols · 164 unmodified lines
165165 /// Gets the number of redundant frames in each packet.
166166 /// </summary>
167167 /// <remarks>
168− /// <para>This value is used when calculating statistics. It is assumed that for each
168+ /// <para>
169+ /// This value is used when calculating statistics. It is assumed that for each
169170 /// frame that is received, that frame will be included in the next <c>n</c>
170− /// packets, where <c>n</c> is the number of redundant frames per packet.</para>
171− ///
172− /// <para>This base class returns 0, as most protocols do not support redundant frames.</para>
171+ /// packets, where <c>n</c> is the number of redundant frames per packet.
172+ /// </para>
173+ /// <para>
174+ /// This base class returns 0, as most protocols do not support redundant frames.
175+ /// </para>
173176 /// </remarks>
174177 public virtual int RedundantFramesPerPacket
175178 {
@@ -183,7 +186,7 @@ namespace GSF.PhasorProtocols · 7 unmodified lines
183186 /// Gets or sets current <see cref="IConfigurationFrame"/> used for parsing <see cref="IDataFrame"/>'s encountered in the data stream from a device.
184187 /// </summary>
185188 /// <remarks>
186− /// If a <see cref="IConfigurationFrame"/> has been parsed, this will return a reference to the parsed frame. Consumer can manually assign a
189+ /// If a <see cref="IConfigurationFrame"/> has been parsed, this will return a reference to the parsed frame. Consumer can manually assign a
187190 /// <see cref="IConfigurationFrame"/> to start parsing data if one has not been encountered in the stream.
188191 /// </remarks>
189192 public abstract IConfigurationFrame ConfigurationFrame
Source/Libraries/GSF.PhasorProtocols/IFrameParser.cs+1−1
@@ -33,7 +33,7 @@ namespace GSF.PhasorProtocols · 32 unmodified lines
3333 #region [ Enumerations ]
3434
3535 /// <summary>
36− /// Source channel, i.e., data or command.
36+ /// Source channel, e.g., data or command.
3737 /// </summary>
3838 [Serializable]
3939 public enum SourceChannel
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/AnalogDefinition.cs+2−2
@@ -108,7 +108,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 107 unmodified lines
108108 buffer[0] = (byte)this.AnalogType;
109109
110110 // Store scaling in last three bytes
111− EndianOrder.BigEndian.CopyBytes(scalingFactor, buffer, 1);
111+ BigEndian.CopyBytes(scalingFactor, buffer, 1);
112112
113113 return buffer;
114114 }
@@ -129,7 +129,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 14 unmodified lines
129129 this.AnalogType = (AnalogType)buffer[startIndex];
130130
131131 // Last three bytes represent scaling factor
132− ScalingValue = EndianOrder.BigEndian.ToUInt24(buffer, startIndex + 1);
132+ ScalingValue = BigEndian.ToUInt24(buffer, startIndex + 1);
133133
134134 return ConversionFactorLength;
135135 }
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/CommandFrame.cs+1−1
@@ -80,7 +80,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 79 unmodified lines
8080 // Validate check-sum
8181 int sumLength = m_frameHeader.FrameLength - 2;
8282
83− if (EndianOrder.BigEndian.ToUInt16(buffer, startIndex + sumLength) != CalculateChecksum(buffer, startIndex, sumLength))
83+ if (BigEndian.ToUInt16(buffer, startIndex + sumLength) != CalculateChecksum(buffer, startIndex, sumLength))
8484 throw new InvalidOperationException("Invalid binary image detected - check sum of " + this.GetType().Name + " did not match");
8585
8686 m_frameHeader.State = new CommandFrameParsingState(m_frameHeader.FrameLength, m_frameHeader.DataLength, true, true);
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/Common.cs+5−5
@@ -598,7 +598,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 597 unmodified lines
598598 if (tagLength < 2)
599599 throw new InvalidOperationException(string.Format("Unexpected length for \"{0}\" tag: {1}", tag, tagLength));
600600
601− ushort result = EndianOrder.BigEndian.ToUInt16(buffer, index);
601+ ushort result = BigEndian.ToUInt16(buffer, index);
602602 index += tagLength;
603603
604604 return result;
@@ -621,7 +621,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 16 unmodified lines
621621 if (tagLength < 3)
622622 throw new InvalidOperationException(string.Format("Unexpected length for \"{0}\" tag: {1}", tag, tagLength));
623623
624− UInt24 result = EndianOrder.BigEndian.ToUInt24(buffer, index);
624+ UInt24 result = BigEndian.ToUInt24(buffer, index);
625625 index += tagLength;
626626
627627 return result;
@@ -644,7 +644,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 16 unmodified lines
644644 if (tagLength < 4)
645645 throw new InvalidOperationException(string.Format("Unexpected length for \"{0}\" tag: {1}", tag, tagLength));
646646
647− uint result = EndianOrder.BigEndian.ToUInt32(buffer, index);
647+ uint result = BigEndian.ToUInt32(buffer, index);
648648 index += tagLength;
649649
650650 return result;
@@ -667,7 +667,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 16 unmodified lines
667667 if (tagLength < 8)
668668 throw new InvalidOperationException(string.Format("Unexpected length for \"{0}\" tag: {1}", tag, tagLength));
669669
670− ulong result = EndianOrder.BigEndian.ToUInt64(buffer, index);
670+ ulong result = BigEndian.ToUInt64(buffer, index);
671671 index += tagLength;
672672
673673 return result;
@@ -730,7 +730,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 56 unmodified lines
730730
731731 buffer[index++] = (byte)tag;
732732 length.EncodeTagLength(buffer, ref index);
733− index += EndianOrder.BigEndian.CopyBytes(value, buffer, index);
733+ index += BigEndian.CopyBytes(value, buffer, index);
734734 }
735735
736736 /// <summary>
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/CommonFrameHeader.cs+23−23
@@ -179,11 +179,11 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 178 unmodified lines
179179 m_frameType = (FrameType)(buffer[startIndex + 1] & ~VersionNumberMask);
180180 m_version = (byte)(buffer[startIndex + 1] & VersionNumberMask);
181181
182− m_frameLength = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 2);
183− m_idCode = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 4);
182+ m_frameLength = BigEndian.ToUInt16(buffer, startIndex + 2);
183+ m_idCode = BigEndian.ToUInt16(buffer, startIndex + 4);
184184
185− uint secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 6);
186− uint fractionOfSecond = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 10);
185+ uint secondOfCentury = BigEndian.ToUInt32(buffer, startIndex + 6);
186+ uint fractionOfSecond = BigEndian.ToUInt32(buffer, startIndex + 10);
187187 long ticksBeyondSecond;
188188
189189 // Without timebase, the best timestamp you can get is down to the whole second
@@ -230,7 +230,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 40 unmodified lines
230230 index += 3;
231231
232232 // Get SPDU length
233− m_spduLength = EndianOrder.BigEndian.ToUInt32(buffer, index);
233+ m_spduLength = BigEndian.ToUInt32(buffer, index);
234234 index += 4;
235235
236236 // Add SPDU length to total frame length (updated as of 10/3/2012 to accommodate extra 6 bytes)
@@ -241,7 +241,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 4 unmodified lines
241241 if (length > m_spduLength + 13)
242242 {
243243 // Get SPDU packet number
244− m_packetNumber = EndianOrder.BigEndian.ToUInt32(buffer, index);
244+ m_packetNumber = BigEndian.ToUInt32(buffer, index);
245245
246246 // Get security algorithm type
247247 m_securityAlgorithm = (SecurityAlgorithm)buffer[index + 12];
@@ -250,7 +250,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 2 unmodified lines
250250 m_signatureAlgorithm = (SignatureAlgorithm)buffer[index + 13];
251251
252252 // Get current key ID
253− m_keyID = EndianOrder.BigEndian.ToUInt32(buffer, index + 14);
253+ m_keyID = BigEndian.ToUInt32(buffer, index + 14);
254254
255255 // Add signature calculation result length to total frame length
256256 switch (m_signatureAlgorithm)
@@ -327,7 +327,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 70 unmodified lines
327327
328328 // Get payload length
329329 index += 18;
330− m_dataLength = (ushort)EndianOrder.BigEndian.ToUInt32(buffer, index);
330+ m_dataLength = (ushort)BigEndian.ToUInt32(buffer, index);
331331 index += 4;
332332
333333 // Confirm payload type tag is sampled values
@@ -340,11 +340,11 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 6 unmodified lines
340340 m_simulatedData = buffer[index++] != 0;
341341
342342 // Get application ID
343− m_applicationID = EndianOrder.BigEndian.ToUInt16(buffer, index);
343+ m_applicationID = BigEndian.ToUInt16(buffer, index);
344344 index += 2;
345345
346346 // Get ASDU payload size
347− m_payloadSize = EndianOrder.BigEndian.ToUInt16(buffer, index);
347+ m_payloadSize = BigEndian.ToUInt16(buffer, index);
348348 index += 2;
349349
350350 // Validate sampled value PDU tag exists and skip past it
@@ -974,20 +974,20 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 623 unmodified lines
974974 index = 6;
975975
976976 // Encode SPDU length
977− index += EndianOrder.BigEndian.CopyBytes(m_spduLength, buffer, index);
977+ index += BigEndian.CopyBytes(m_spduLength, buffer, index);
978978
979979 // Encode SPDU packet number
980− index += EndianOrder.BigEndian.CopyBytes(m_packetNumber, buffer, index);
980+ index += BigEndian.CopyBytes(m_packetNumber, buffer, index);
981981
982982 // Encode SPDU version number (hard coded to version 1)
983− index += EndianOrder.BigEndian.CopyBytes((ushort)1, buffer, index);
983+ index += BigEndian.CopyBytes((ushort)1, buffer, index);
984984
985985 // Encode time of current key
986986 UnixTimeTag time = new UnixTimeTag(DateTime.UtcNow.Ticks);
987− index += EndianOrder.BigEndian.CopyBytes((uint)time.Value, buffer, index);
987+ index += BigEndian.CopyBytes((uint)time.Value, buffer, index);
988988
989989 // Encode time to next key (again, TBD once security is actually defined)
990− index += EndianOrder.BigEndian.CopyBytes((ushort)100, buffer, index);
990+ index += BigEndian.CopyBytes((ushort)100, buffer, index);
991991
992992 // Encode security algorithm type
993993 buffer[index++] = (byte)m_securityAlgorithm;
@@ -996,10 +996,10 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 2 unmodified lines
996996 buffer[index++] = (byte)m_signatureAlgorithm;
997997
998998 // Encode current key ID
999− index += EndianOrder.BigEndian.CopyBytes(m_keyID, buffer, index);
999+ index += BigEndian.CopyBytes(m_keyID, buffer, index);
10001000
10011001 // Encode payload length
1002− index += EndianOrder.BigEndian.CopyBytes((uint)m_dataLength, buffer, index);
1002+ index += BigEndian.CopyBytes((uint)m_dataLength, buffer, index);
10031003
10041004 // Encode payload tag for sampled values
10051005 buffer[index++] = 0x82;
@@ -1008,10 +1008,10 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 2 unmodified lines
10081008 buffer[index++] = (byte)(m_simulatedData ? 0x01 : 0x00);
10091009
10101010 // Encode the application ID
1011− index += EndianOrder.BigEndian.CopyBytes(m_applicationID, buffer, index);
1011+ index += BigEndian.CopyBytes(m_applicationID, buffer, index);
10121012
10131013 // Encode ASDU payload size
1014− index += EndianOrder.BigEndian.CopyBytes(pduLen, buffer, index);
1014+ index += BigEndian.CopyBytes(pduLen, buffer, index);
10151015
10161016 // Encode SV PDU tag
10171017 m_payloadSize.EncodeTagLength(SampledValueTag.SvPdu, buffer, ref index);
@@ -1029,10 +1029,10 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 11 unmodified lines
10291029
10301030 buffer[0] = PhasorProtocols.Common.SyncByte;
10311031 buffer[1] = (byte)((byte)TypeID | Version);
1032− EndianOrder.BigEndian.CopyBytes(FrameLength, buffer, 2);
1033− EndianOrder.BigEndian.CopyBytes(IDCode, buffer, 4);
1034− EndianOrder.BigEndian.CopyBytes(SecondOfCentury, buffer, 6);
1035− EndianOrder.BigEndian.CopyBytes(FractionOfSecond | (int)m_timeQualityFlags, buffer, 10);
1032+ BigEndian.CopyBytes(FrameLength, buffer, 2);
1033+ BigEndian.CopyBytes(IDCode, buffer, 4);
1034+ BigEndian.CopyBytes(SecondOfCentury, buffer, 6);
1035+ BigEndian.CopyBytes(FractionOfSecond | (int)m_timeQualityFlags, buffer, 10);
10361036 }
10371037
10381038 return buffer;
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/ConfigurationCell.cs+12−12
@@ -240,11 +240,11 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 239 unmodified lines
240240 int index = 0;
241241
242242 base.HeaderImage.CopyImage(buffer, ref index, base.HeaderLength);
243− EndianOrder.BigEndian.CopyBytes(IDCode, buffer, index);
244− EndianOrder.BigEndian.CopyBytes((ushort)m_formatFlags, buffer, index + 2);
245− EndianOrder.BigEndian.CopyBytes((ushort)PhasorDefinitions.Count, buffer, index + 4);
246− EndianOrder.BigEndian.CopyBytes((ushort)AnalogDefinitions.Count, buffer, index + 6);
247− EndianOrder.BigEndian.CopyBytes((ushort)DigitalDefinitions.Count, buffer, index + 8);
243+ BigEndian.CopyBytes(IDCode, buffer, index);
244+ BigEndian.CopyBytes((ushort)m_formatFlags, buffer, index + 2);
245+ BigEndian.CopyBytes((ushort)PhasorDefinitions.Count, buffer, index + 4);
246+ BigEndian.CopyBytes((ushort)AnalogDefinitions.Count, buffer, index + 6);
247+ BigEndian.CopyBytes((ushort)DigitalDefinitions.Count, buffer, index + 8);
248248
249249 return buffer;
250250 }
@@ -304,7 +304,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 53 unmodified lines
304304
305305 // Include configuration count (new for version 7.0)
306306 if (Parent.DraftRevision > DraftRevision.Draft6)
307− EndianOrder.BigEndian.CopyBytes(RevisionCount, buffer, index);
307+ BigEndian.CopyBytes(RevisionCount, buffer, index);
308308
309309 return buffer;
310310 }
@@ -344,13 +344,13 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 33 unmodified lines
344344 // Parse out station name
345345 index += base.ParseHeaderImage(buffer, startIndex, length);
346346
347− IDCode = EndianOrder.BigEndian.ToUInt16(buffer, index);
348− m_formatFlags = (FormatFlags)EndianOrder.BigEndian.ToUInt16(buffer, index + 2);
347+ IDCode = BigEndian.ToUInt16(buffer, index);
348+ m_formatFlags = (FormatFlags)BigEndian.ToUInt16(buffer, index + 2);
349349
350350 // Parse out total phasors, analogs and digitals defined for this device
351− state.PhasorCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 4);
352− state.AnalogCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 6);
353− state.DigitalCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 8);
351+ state.PhasorCount = BigEndian.ToUInt16(buffer, index + 4);
352+ state.AnalogCount = BigEndian.ToUInt16(buffer, index + 6);
353+ state.DigitalCount = BigEndian.ToUInt16(buffer, index + 8);
354354 index += 10;
355355
356356 return (index - startIndex);
@@ -401,7 +401,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 44 unmodified lines
401401 // Parse out configuration count (new for version 7.0)
402402 if (Parent.DraftRevision > DraftRevision.Draft6)
403403 {
404− RevisionCount = EndianOrder.BigEndian.ToUInt16(buffer, index);
404+ RevisionCount = BigEndian.ToUInt16(buffer, index);
405405 index += 2;
406406 }
407407
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/ConfigurationFrame.cs+6−6
@@ -280,8 +280,8 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 279 unmodified lines
280280 int index = 0;
281281
282282 CommonHeader.BinaryImage.CopyImage(buffer, ref index, CommonFrameHeader.FixedLength);
283− EndianOrder.BigEndian.CopyBytes(m_timebase, buffer, index);
284− EndianOrder.BigEndian.CopyBytes((ushort)Cells.Count, buffer, index + 4);
283+ BigEndian.CopyBytes(m_timebase, buffer, index);
284+ BigEndian.CopyBytes((ushort)Cells.Count, buffer, index + 4);
285285
286286 return buffer;
287287 }
@@ -307,7 +307,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 19 unmodified lines
307307 {
308308 byte[] buffer = new byte[2];
309309
310− EndianOrder.BigEndian.CopyBytes(FrameRate, buffer, 0);
310+ BigEndian.CopyBytes(FrameRate, buffer, 0);
311311
312312 return buffer;
313313 }
@@ -357,9 +357,9 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 43 unmodified lines
357357 // Skip past header that was already parsed...
358358 startIndex += CommonFrameHeader.FixedLength;
359359
360− m_timebase = EndianOrder.BigEndian.ToUInt32(buffer, startIndex);
360+ m_timebase = BigEndian.ToUInt32(buffer, startIndex);
361361 CommonHeader.Timebase = m_timebase;
362− State.CellCount = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 4);
362+ State.CellCount = BigEndian.ToUInt16(buffer, startIndex + 4);
363363
364364 return FixedHeaderLength;
365365 }
@@ -373,7 +373,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 7 unmodified lines
373373 /// <returns>The length of the data that was parsed.</returns>
374374 protected override int ParseFooterImage(byte[] buffer, int startIndex, int length)
375375 {
376− FrameRate = EndianOrder.BigEndian.ToUInt16(buffer, startIndex);
376+ FrameRate = BigEndian.ToUInt16(buffer, startIndex);
377377 return 2;
378378 }
379379
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/DataFrame.cs+2−2
@@ -692,8 +692,8 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 691 unmodified lines
692692 if (tagLength < 8)
693693 throw new InvalidOperationException(string.Format("Unexpected length for \"{0}\" tag: {1}", SampledValueTag.RefrTm, tagLength));
694694
695− uint secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, index);
696− UInt24 fractionOfSecond = EndianOrder.BigEndian.ToUInt24(buffer, index + 4);
695+ uint secondOfCentury = BigEndian.ToUInt32(buffer, index);
696+ UInt24 fractionOfSecond = BigEndian.ToUInt24(buffer, index + 4);
697697 index += 7;
698698
699699 // Get whole seconds of timestamp
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/DigitalDefinition.cs+4−4
@@ -240,8 +240,8 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 239 unmodified lines
240240 {
241241 byte[] buffer = new byte[ConversionFactorLength];
242242
243− EndianOrder.BigEndian.CopyBytes(m_normalStatus, buffer, 0);
244− EndianOrder.BigEndian.CopyBytes(m_validInputs, buffer, 2);
243+ BigEndian.CopyBytes(m_normalStatus, buffer, 0);
244+ BigEndian.CopyBytes(m_validInputs, buffer, 2);
245245
246246 return buffer;
247247 }
@@ -402,8 +402,8 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 154 unmodified lines
402402 /// <param name="startIndex">Start index into <paramref name="buffer"/> to begin parsing.</param>
403403 internal int ParseConversionFactor(byte[] buffer, int startIndex)
404404 {
405− m_normalStatus = EndianOrder.BigEndian.ToUInt16(buffer, startIndex);
406− m_validInputs = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 2);
405+ m_normalStatus = BigEndian.ToUInt16(buffer, startIndex);
406+ m_validInputs = BigEndian.ToUInt16(buffer, startIndex + 2);
407407
408408 return ConversionFactorLength;
409409 }
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/FrequencyDefinition.cs+2−2
@@ -104,7 +104,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 103 unmodified lines
104104 {
105105 get
106106 {
107− return EndianOrder.BigEndian.GetBytes((ushort)(Parent.NominalFrequency == LineFrequency.Hz50 ? Bits.Bit00 : Bits.Nil));
107+ return BigEndian.GetBytes((ushort)(Parent.NominalFrequency == LineFrequency.Hz50 ? Bits.Bit00 : Bits.Nil));
108108 }
109109 }
110110
@@ -125,7 +125,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 14 unmodified lines
125125 /// </remarks>
126126 protected override int ParseBodyImage(byte[] buffer, int startIndex, int length)
127127 {
128− Parent.NominalFrequency = ((EndianOrder.BigEndian.ToUInt16(buffer, startIndex) & (ushort)Bits.Bit00) > 0) ? LineFrequency.Hz50 : LineFrequency.Hz60;
128+ Parent.NominalFrequency = ((BigEndian.ToUInt16(buffer, startIndex) & (ushort)Bits.Bit00) > 0) ? LineFrequency.Hz50 : LineFrequency.Hz60;
129129 return 2;
130130 }
131131
Source/Libraries/GSF.PhasorProtocols/Iec61850_90_5/PhasorDefinition.cs+2−2
@@ -107,7 +107,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 106 unmodified lines
107107
108108 buffer[0] = (byte)PhasorType;
109109
110− EndianOrder.BigEndian.CopyBytes(scalingFactor, buffer, 1);
110+ BigEndian.CopyBytes(scalingFactor, buffer, 1);
111111
112112 return buffer;
113113 }
@@ -128,7 +128,7 @@ namespace GSF.PhasorProtocols.IEC61850_90_5 · 14 unmodified lines
128128 PhasorType = (buffer[startIndex] == 0) ? PhasorType.Voltage : PhasorType.Current;
129129
130130 // Last three bytes represent scaling factor
131− ScalingValue = EndianOrder.BigEndian.ToUInt24(buffer, startIndex + 1);
131+ ScalingValue = BigEndian.ToUInt24(buffer, startIndex + 1);
132132
133133 return ConversionFactorLength;
134134 }
Source/Libraries/GSF.PhasorProtocols/Ieee1344/CommandFrame.cs+5−5
@@ -80,7 +80,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 79 unmodified lines
8080 // Validate check-sum
8181 int sumLength = FrameLength - 2;
8282
83− if (EndianOrder.BigEndian.ToUInt16(buffer, startIndex + sumLength) != CalculateChecksum(buffer, startIndex, sumLength))
83+ if (BigEndian.ToUInt16(buffer, startIndex + sumLength) != CalculateChecksum(buffer, startIndex, sumLength))
8484 throw new InvalidOperationException("Invalid binary image detected - check sum of " + this.GetType().Name + " did not match");
8585
8686 ParseBinaryImage(buffer, startIndex, length);
@@ -194,8 +194,8 @@ namespace GSF.PhasorProtocols.IEEE1344 · 107 unmodified lines
194194 {
195195 byte[] buffer = new byte[HeaderLength];
196196
197− EndianOrder.BigEndian.CopyBytes((uint)TimeTag.Value, buffer, 0);
198− EndianOrder.BigEndian.CopyBytes(m_idCode, buffer, 4);
197+ BigEndian.CopyBytes((uint)TimeTag.Value, buffer, 0);
198+ BigEndian.CopyBytes(m_idCode, buffer, 4);
199199
200200 return buffer;
201201 }
@@ -229,8 +229,8 @@ namespace GSF.PhasorProtocols.IEEE1344 · 27 unmodified lines
229229 /// <returns>The length of the data that was parsed.</returns>
230230 protected override int ParseHeaderImage(byte[] buffer, int startIndex, int length)
231231 {
232− Timestamp = (new NtpTimeTag(EndianOrder.BigEndian.ToUInt32(buffer, startIndex), 0)).ToDateTime().Ticks;
233− m_idCode = EndianOrder.BigEndian.ToUInt64(buffer, startIndex + 4);
232+ Timestamp = (new NtpTimeTag(BigEndian.ToUInt32(buffer, startIndex), 0)).ToDateTime().Ticks;
233+ m_idCode = BigEndian.ToUInt64(buffer, startIndex + 4);
234234 return 12;
235235 }
236236
Source/Libraries/GSF.PhasorProtocols/Ieee1344/CommonFrameHeader.cs+6−6
@@ -83,13 +83,13 @@ namespace GSF.PhasorProtocols.IEEE1344 · 82 unmodified lines
8383 /// <param name="startIndex">Start index into buffer where valid data begins.</param>
8484 public CommonFrameHeader(ConfigurationFrame configurationFrame, byte[] buffer, int startIndex)
8585 {
86− uint secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, startIndex);
87− m_sampleCount = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 4);
86+ uint secondOfCentury = BigEndian.ToUInt32(buffer, startIndex);
87+ m_sampleCount = BigEndian.ToUInt16(buffer, startIndex + 4);
8888
8989 // We go ahead and pre-grab cell's status flags so we can determine framelength - we
9090 // leave startindex at 6 so that cell will be able to parse flags as needed - note
9191 // this increases needed common frame header size by 2 (i.e., BinaryLength + 2)
92− m_statusFlags = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + FixedLength);
92+ m_statusFlags = BigEndian.ToUInt16(buffer, startIndex + FixedLength);
9393
9494 // NTP timestamps based on NtpTimeTag class are designed to work for dates between
9595 // 1968-01-20 and 2104-02-26 based on recommended bit interpretation in RFC-2030.
@@ -357,8 +357,8 @@ namespace GSF.PhasorProtocols.IEEE1344 · 261 unmodified lines
357357 // Make sure frame length gets included in status flags for generated binary image
358358 FrameLength = (ushort)FixedLength;
359359
360− EndianOrder.BigEndian.CopyBytes((uint)TimeTag.Value, buffer, 0);
361− EndianOrder.BigEndian.CopyBytes(m_sampleCount, buffer, 4);
360+ BigEndian.CopyBytes((uint)TimeTag.Value, buffer, 0);
361+ BigEndian.CopyBytes(m_sampleCount, buffer, 4);
362362
363363 return buffer;
364364 }
@@ -422,7 +422,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 57 unmodified lines
422422 public static bool ChecksumIsValid(byte[] buffer, int startIndex, int length)
423423 {
424424 int sumLength = length - 2;
425− return EndianOrder.BigEndian.ToUInt16(buffer, startIndex + sumLength) == buffer.CrcCCITTChecksum(startIndex, sumLength);
425+ return BigEndian.ToUInt16(buffer, startIndex + sumLength) == buffer.CrcCCITTChecksum(startIndex, sumLength);
426426 }
427427
428428 #endregion
Source/Libraries/GSF.PhasorProtocols/Ieee1344/ConfigurationCell.cs+8−8
@@ -295,15 +295,15 @@ namespace GSF.PhasorProtocols.IEEE1344 · 294 unmodified lines
295295 byte[] buffer = new byte[HeaderLength];
296296 int index = 0;
297297
298− EndianOrder.BigEndian.CopyBytes(m_statusFlags, buffer, index);
298+ BigEndian.CopyBytes(m_statusFlags, buffer, index);
299299
300300 // Copy in station name
301301 index += 2;
302302 base.HeaderImage.CopyImage(buffer, ref index, base.HeaderLength);
303303
304− EndianOrder.BigEndian.CopyBytes(IDCode, buffer, index);
305− EndianOrder.BigEndian.CopyBytes((ushort)PhasorDefinitions.Count, buffer, index + 8);
306− EndianOrder.BigEndian.CopyBytes((ushort)DigitalDefinitions.Count, buffer, index + 10);
304+ BigEndian.CopyBytes(IDCode, buffer, index);
305+ BigEndian.CopyBytes((ushort)PhasorDefinitions.Count, buffer, index + 8);
306+ BigEndian.CopyBytes((ushort)DigitalDefinitions.Count, buffer, index + 10);
307307
308308 return buffer;
309309 }
@@ -390,17 +390,17 @@ namespace GSF.PhasorProtocols.IEEE1344 · 80 unmodified lines
390390 IConfigurationCellParsingState state = State;
391391 int index = startIndex;
392392
393− m_statusFlags = EndianOrder.BigEndian.ToUInt16(buffer, index);
393+ m_statusFlags = BigEndian.ToUInt16(buffer, index);
394394 index += 2;
395395
396396 // Parse out station name
397397 index += base.ParseHeaderImage(buffer, index, length);
398398
399− IDCode = EndianOrder.BigEndian.ToUInt64(buffer, index);
399+ IDCode = BigEndian.ToUInt64(buffer, index);
400400
401401 // Parse out total phasors and digitals defined for this device
402− state.PhasorCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 8);
403− state.DigitalCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 10);
402+ state.PhasorCount = BigEndian.ToUInt16(buffer, index + 8);
403+ state.DigitalCount = BigEndian.ToUInt16(buffer, index + 10);
404404 index += 12;
405405
406406 return (index - startIndex);
Source/Libraries/GSF.PhasorProtocols/Ieee1344/ConfigurationFrame.cs+2−2
@@ -282,7 +282,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 281 unmodified lines
282282 {
283283 get
284284 {
285− return EndianOrder.BigEndian.GetBytes(Period);
285+ return BigEndian.GetBytes(Period);
286286 }
287287 }
288288
@@ -380,7 +380,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 91 unmodified lines
380380 // with first (and only) configuration cell, since cell was added during ParseBodyImage
381381 // of ChannelFrameBase, performing the following succeeds since parsing the footer
382382 // follows parsing the body :)
383− Period = EndianOrder.BigEndian.ToUInt16(buffer, startIndex);
383+ Period = BigEndian.ToUInt16(buffer, startIndex);
384384 return FixedFooterLength;
385385 }
386386
Source/Libraries/GSF.PhasorProtocols/Ieee1344/DigitalDefinition.cs+2−2
@@ -142,7 +142,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 141 unmodified lines
142142 {
143143 get
144144 {
145− return EndianOrder.BigEndian.GetBytes(m_statusFlags);
145+ return BigEndian.GetBytes(m_statusFlags);
146146 }
147147 }
148148
@@ -181,7 +181,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 32 unmodified lines
181181 /// <param name="startIndex">Start index into <paramref name="buffer"/> to begin parsing.</param>
182182 internal int ParseConversionFactor(byte[] buffer, int startIndex)
183183 {
184− m_statusFlags = EndianOrder.BigEndian.ToUInt16(buffer, startIndex);
184+ m_statusFlags = BigEndian.ToUInt16(buffer, startIndex);
185185 return ConversionFactorLength;
186186 }
187187
Source/Libraries/GSF.PhasorProtocols/Ieee1344/FrequencyDefinition.cs+2−2
@@ -157,7 +157,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 156 unmodified lines
157157 else
158158 m_statusFlags = (ushort)(m_statusFlags & ~(ushort)Bits.Bit00);
159159
160− return EndianOrder.BigEndian.GetBytes(m_statusFlags);
160+ return BigEndian.GetBytes(m_statusFlags);
161161 }
162162 }
163163
@@ -194,7 +194,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 30 unmodified lines
194194 /// </remarks>
195195 protected override int ParseBodyImage(byte[] buffer, int startIndex, int length)
196196 {
197− m_statusFlags = EndianOrder.BigEndian.ToUInt16(buffer, startIndex);
197+ m_statusFlags = BigEndian.ToUInt16(buffer, startIndex);
198198
199199 Parent.NominalFrequency = ((m_statusFlags & (ushort)Bits.Bit00) > 0) ? LineFrequency.Hz50 : LineFrequency.Hz60;
200200
Source/Libraries/GSF.PhasorProtocols/Ieee1344/FrequencyValue.cs+4−4
@@ -151,12 +151,12 @@ namespace GSF.PhasorProtocols.IEEE1344 · 150 unmodified lines
151151
152152 if (definition.FrequencyIsAvailable)
153153 {
154− EndianOrder.BigEndian.CopyBytes((short)UnscaledFrequency, buffer, startIndex);
154+ BigEndian.CopyBytes((short)UnscaledFrequency, buffer, startIndex);
155155 startIndex += 2;
156156 }
157157
158158 if (definition.DfDtIsAvailable)
159− EndianOrder.BigEndian.CopyBytes((short)UnscaledDfDt, buffer, startIndex);
159+ BigEndian.CopyBytes((short)UnscaledDfDt, buffer, startIndex);
160160 }
161161
162162 return buffer;
@@ -188,14 +188,14 @@ namespace GSF.PhasorProtocols.IEEE1344 · 25 unmodified lines
188188 // Note that IEEE 1344 only supports scaled integers (no need to worry about floating points)
189189 if (definition.FrequencyIsAvailable)
190190 {
191− UnscaledFrequency = EndianOrder.BigEndian.ToInt16(buffer, startIndex);
191+ UnscaledFrequency = BigEndian.ToInt16(buffer, startIndex);
192192 startIndex += 2;
193193 parsedLength += 2;
194194 }
195195
196196 if (definition.DfDtIsAvailable)
197197 {
198− UnscaledDfDt = EndianOrder.BigEndian.ToInt16(buffer, startIndex);
198+ UnscaledDfDt = BigEndian.ToInt16(buffer, startIndex);
199199 parsedLength += 2;
200200 }
201201 }
Source/Libraries/GSF.PhasorProtocols/Ieee1344/PhasorDefinition.cs+2−2
@@ -109,7 +109,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 108 unmodified lines
109109
110110 buffer[0] = (byte)(PhasorType == PhasorType.Voltage ? 0 : 1);
111111
112− EndianOrder.BigEndian.CopyBytes(scalingFactor, buffer, 1);
112+ BigEndian.CopyBytes(scalingFactor, buffer, 1);
113113
114114 return buffer;
115115 }
@@ -130,7 +130,7 @@ namespace GSF.PhasorProtocols.IEEE1344 · 14 unmodified lines
130130 PhasorType = (buffer[startIndex] == 0) ? PhasorType.Voltage : PhasorType.Current;
131131
132132 // Last three bytes represent scaling factor
133− ScalingValue = EndianOrder.BigEndian.ToUInt24(buffer, startIndex + 1);
133+ ScalingValue = BigEndian.ToUInt24(buffer, startIndex + 1);
134134
135135 return ConversionFactorLength;
136136 }
Source/Libraries/GSF.PhasorProtocols/IeeeC37_118/ConfigurationCell3.cs+25−25
@@ -123,14 +123,14 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 122 unmodified lines
123123 int index = 0;
124124
125125 base.HeaderImage.CopyImage(buffer, ref index, base.HeaderLength);
126− EndianOrder.BigEndian.CopyBytes(IDCode, buffer, index);
127− EndianOrder.BigEndian.CopyBytes(StationName.Length, buffer, index);
128− EndianOrder.BigEndian.CopyBytes(StationName, buffer, index);
129− EndianOrder.BigEndian.CopyBytes(State.G_PMU_ID, buffer, index);
130− EndianOrder.BigEndian.CopyBytes((ushort)m_formatFlags, buffer, index + 2);
131− EndianOrder.BigEndian.CopyBytes((ushort)PhasorDefinitions.Count, buffer, index + 4);
132− EndianOrder.BigEndian.CopyBytes((ushort)AnalogDefinitions.Count, buffer, index + 6);
133− EndianOrder.BigEndian.CopyBytes((ushort)DigitalDefinitions.Count, buffer, index + 8);
126+ BigEndian.CopyBytes(IDCode, buffer, index);
127+ BigEndian.CopyBytes(StationName.Length, buffer, index);
128+ BigEndian.CopyBytes(StationName, buffer, index);
129+ BigEndian.CopyBytes(State.G_PMU_ID, buffer, index);
130+ BigEndian.CopyBytes((ushort)m_formatFlags, buffer, index + 2);
131+ BigEndian.CopyBytes((ushort)PhasorDefinitions.Count, buffer, index + 4);
132+ BigEndian.CopyBytes((ushort)AnalogDefinitions.Count, buffer, index + 6);
133+ BigEndian.CopyBytes((ushort)DigitalDefinitions.Count, buffer, index + 8);
134134
135135
136136 return buffer;
@@ -191,7 +191,7 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 54 unmodified lines
191191
192192 // Include configuration count (new for version 7.0)
193193 if (Parent.DraftRevision > DraftRevision.Draft6)
194− EndianOrder.BigEndian.CopyBytes(RevisionCount, buffer, index);
194+ BigEndian.CopyBytes(RevisionCount, buffer, index);
195195
196196 return buffer;
197197 }
@@ -218,7 +218,7 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 20 unmodified lines
218218
219219 string getLengthPrependedString(byte[] buffer, int index, out int length)
220220 {
221− length = EndianOrder.BigEndian.ToInt16(buffer, index);
221+ length = BigEndian.ToInt16(buffer, index);
222222 return ByteEncoding.ASCII.GetString(buffer, index + 2, length);
223223 }
224224
@@ -240,13 +240,13 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 15 unmodified lines
240240 int len;
241241 StationName = getLengthPrependedString(buffer, index, out len);
242242 index += len + 2;
243− IDCode = EndianOrder.BigEndian.ToUInt16(buffer, index);
244− State.G_PMU_ID = EndianOrder.BigEndian.ToGuid(buffer, index + 2);
245− m_formatFlags = (FormatFlags)EndianOrder.BigEndian.ToUInt16(buffer, index + 16 + 2); //left as 16+x for clarity while editing, FIXME
243+ IDCode = BigEndian.ToUInt16(buffer, index);
244+ State.G_PMU_ID = BigEndian.ToGuid(buffer, index + 2);
245+ m_formatFlags = (FormatFlags)BigEndian.ToUInt16(buffer, index + 16 + 2); //left as 16+x for clarity while editing, FIXME
246246 // Parse out total phasors, analogs and digitals defined for this device
247− State.PhasorCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 16+4);
248− State.AnalogCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 16+6);
249− State.DigitalCount = EndianOrder.BigEndian.ToUInt16(buffer, index + 16+8);
247+ State.PhasorCount = BigEndian.ToUInt16(buffer, index + 16+4);
248+ State.AnalogCount = BigEndian.ToUInt16(buffer, index + 16+6);
249+ State.DigitalCount = BigEndian.ToUInt16(buffer, index + 16+8);
250250
251251
252252 index += 10+16; //FIXME: merge
@@ -305,21 +305,21 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 52 unmodified lines
305305 index += 4;
306306 }
307307 //PMU_LAT, 4 bytes, IEEE float, -90.0 to +90.0
308− State.DeviceLatitude = EndianOrder.BigEndian.ToSingle(buffer, index);
308+ State.DeviceLatitude = BigEndian.ToSingle(buffer, index);
309309 //PMU_LON, 4 bytes, IEEE float, -179.9... to +180
310− State.DeviceLongitude = EndianOrder.BigEndian.ToSingle(buffer, index + 4);
310+ State.DeviceLongitude = BigEndian.ToSingle(buffer, index + 4);
311311 //PMU_ELEV, 4 bytes, IEEE float, infinity for unknown
312− State.DeviceElevation = EndianOrder.BigEndian.ToSingle(buffer, index + 8);
312+ State.DeviceElevation = BigEndian.ToSingle(buffer, index + 8);
313313 //SVC_CLASS, 1 ASCII char
314− State.ServiceClass = EndianOrder.BigEndian.ToChar(buffer, index + 9);
314+ State.ServiceClass = BigEndian.ToChar(buffer, index + 9);
315315 //WINDOW, 4 bytes, signed int
316− State.MeasurementWindow = EndianOrder.BigEndian.ToInt32(buffer, index + 13);
316+ State.MeasurementWindow = BigEndian.ToInt32(buffer, index + 13);
317317 //GRP_DLY, 4 bytes, signed int
318− State.GroupDelay = EndianOrder.BigEndian.ToInt32(buffer, index + 17);
318+ State.GroupDelay = BigEndian.ToInt32(buffer, index + 17);
319319 //FNOM, 2 bytes, unsigned int, Bit 0 is flag (50/60 hz)
320− State.FNOM = EndianOrder.BigEndian.ToUInt16(buffer, index + 19);
320+ State.FNOM = BigEndian.ToUInt16(buffer, index + 19);
321321 //CFGCNT, 2 bytes
322− State.CFGCNT = EndianOrder.BigEndian.ToUInt16(buffer, index + 21);
322+ State.CFGCNT = BigEndian.ToUInt16(buffer, index + 21);
323323
324324 return startIndex; //FIXME
325325 }
@@ -341,7 +341,7 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 15 unmodified lines
341341 // Parse out configuration count (new for version 7.0)
342342 if (Parent.DraftRevision > DraftRevision.Draft6)
343343 {
344− RevisionCount = EndianOrder.BigEndian.ToUInt16(buffer, index);
344+ RevisionCount = BigEndian.ToUInt16(buffer, index);
345345 index += 2;
346346 }
347347
Source/Libraries/GSF.PhasorProtocols/IeeeC37_118/ConfigurationFrame3.cs+3−3
@@ -83,9 +83,9 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 82 unmodified lines
8383 {
8484 // Skip past header that was already parsed...
8585 startIndex += CommonFrameHeader.FixedLength;
86− // State.CONT_IDX = EndianOrder.BigEndian.ToInt16(buffer, startIndex); FIXME: For now, this is completely ignored
87− m_timebase = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 2) & ~Common.TimeQualityFlagsMask;
88− State.CellCount = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 6);
86+ // State.CONT_IDX = BigEndian.ToInt16(buffer, startIndex); FIXME: For now, this is completely ignored
87+ m_timebase = BigEndian.ToUInt32(buffer, startIndex + 2) & ~Common.TimeQualityFlagsMask;
88+ State.CellCount = BigEndian.ToUInt16(buffer, startIndex + 6);
8989
9090 return FixedHeaderLength;
9191 }
Source/Libraries/GSF.PhasorProtocols/IeeeC37_118/FrameParser.cs+1−1
@@ -305,8 +305,8 @@ namespace GSF.PhasorProtocols.IEEEC37_118 · 304 unmodified lines
305305
306306 if (configurationFrame2 != null)
307307 m_configurationFrame2 = configurationFrame2;
308− //FIXME: Add cf3
309308
309+ // TODO: Add handler for config3 frame
310310 }
311311
312312 /// <summary>
Source/Libraries/GSF.PhasorProtocols/Macrodyne/CommandFrame.cs+1−1
@@ -138,7 +138,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 137 unmodified lines
138138 {
139139 byte[] buffer = new byte[BinaryLength];
140140
141− EndianOrder.BigEndian.CopyBytes((ushort)Command, buffer, 0);
141+ BigEndian.CopyBytes((ushort)Command, buffer, 0);
142142
143143 return buffer;
144144 }
Source/Libraries/GSF.PhasorProtocols/Macrodyne/CommonFrameHeader.cs+3−3
@@ -99,7 +99,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 98 unmodified lines
9999 }
100100 else
101101 {
102− switch (EndianOrder.BigEndian.ToUInt16(buffer, startIndex))
102+ switch (BigEndian.ToUInt16(buffer, startIndex))
103103 {
104104 case (ushort)DeviceCommand.RequestOnlineDataFormat:
105105 TypeID = Macrodyne.FrameType.ConfigurationFrame;
@@ -254,10 +254,10 @@ namespace GSF.PhasorProtocols.Macrodyne · 148 unmodified lines
254254 buffer[1] = (byte)m_statusFlags;
255255 break;
256256 case Macrodyne.FrameType.ConfigurationFrame:
257− EndianOrder.BigEndian.CopyBytes((ushort)DeviceCommand.RequestOnlineDataFormat, buffer, 0);
257+ BigEndian.CopyBytes((ushort)DeviceCommand.RequestOnlineDataFormat, buffer, 0);
258258 break;
259259 case Macrodyne.FrameType.HeaderFrame:
260− EndianOrder.BigEndian.CopyBytes((ushort)DeviceCommand.RequestUnitIDBufferValue, buffer, 0);
260+ BigEndian.CopyBytes((ushort)DeviceCommand.RequestUnitIDBufferValue, buffer, 0);
261261 break;
262262 }
263263
Source/Libraries/GSF.PhasorProtocols/Macrodyne/ConfigurationFrame.cs+2−2
@@ -465,7 +465,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 464 unmodified lines
465465 byte[] buffer = new byte[HeaderLength];
466466
467467 buffer.BlockCopy(0, CommonFrameHeader.FixedLength);
468− EndianOrder.BigEndian.CopyBytes((ushort)m_onlineDataFormatFlags, buffer, 2);
468+ BigEndian.CopyBytes((ushort)m_onlineDataFormatFlags, buffer, 2);
469469
470470 return buffer;
471471 }
@@ -644,7 +644,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 172 unmodified lines
644644 startIndex += CommonFrameHeader.FixedLength;
645645
646646 // Parse on -line data format
647− m_onlineDataFormatFlags = (OnlineDataFormatFlags)EndianOrder.BigEndian.ToUInt16(buffer, startIndex);
647+ m_onlineDataFormatFlags = (OnlineDataFormatFlags)BigEndian.ToUInt16(buffer, startIndex);
648648
649649 return CommonFrameHeader.FixedLength + 2;
650650 }
Source/Libraries/GSF.PhasorProtocols/Macrodyne/DataCell.cs+5−5
@@ -392,7 +392,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 391 unmodified lines
392392 else
393393 {
394394 // Read sample number for G protocol
395− m_sampleNumber = EndianOrder.BigEndian.ToUInt16(buffer, index);
395+ m_sampleNumber = BigEndian.ToUInt16(buffer, index);
396396 index += 2;
397397 }
398398
@@ -402,7 +402,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 3 unmodified lines
402402 m_clockStatusFlags = (ClockStatusFlags)buffer[index];
403403 index += 1;
404404
405− ushort day = BinaryCodedDecimal.Decode(EndianOrder.BigEndian.ToUInt16(buffer, index));
405+ ushort day = BinaryCodedDecimal.Decode(BigEndian.ToUInt16(buffer, index));
406406 byte hours = BinaryCodedDecimal.Decode(buffer[index + 2]);
407407 byte minutes = BinaryCodedDecimal.Decode(buffer[index + 3]);
408408 byte seconds = BinaryCodedDecimal.Decode(buffer[index + 4]);
@@ -412,7 +412,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 3 unmodified lines
412412 // Read sample number for M protocol
413413 if (protocolVersion == ProtocolVersion.M)
414414 {
415− m_sampleNumber = EndianOrder.BigEndian.ToUInt16(buffer, index + 5);
415+ m_sampleNumber = BigEndian.ToUInt16(buffer, index + 5);
416416 timebase = 719.0D;
417417 index += 2;
418418 }
@@ -425,7 +425,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 6 unmodified lines
425425 {
426426 Parent.Timestamp = DateTime.UtcNow.Ticks;
427427 SynchronizationIsValid = false;
428− m_sampleNumber = EndianOrder.BigEndian.ToUInt16(buffer, index);
428+ m_sampleNumber = BigEndian.ToUInt16(buffer, index);
429429 index += 2;
430430 }
431431
@@ -479,7 +479,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 47 unmodified lines
479479 // Parse reference phasor information
480480 if (configFrame.ReferenceIncluded)
481481 {
482− m_referenceSampleNumber = EndianOrder.BigEndian.ToUInt16(buffer, index);
482+ m_referenceSampleNumber = BigEndian.ToUInt16(buffer, index);
483483 m_referencePhasor = PhasorValue.CreateNewValue(this, new PhasorDefinition(null, "Reference Phasor", PhasorType.Voltage, null), buffer, index, out parsedLength) as PhasorValue;
484484 index += 6;
485485 }
Source/Libraries/GSF.PhasorProtocols/Macrodyne/FrequencyValue.cs+1−1
@@ -120,7 +120,7 @@ namespace GSF.PhasorProtocols.Macrodyne · 119 unmodified lines
120120 // 1690G protocol currently requires an INI file - as a result this means there will be on dF/dt value in the stream
121121 if (Parent.Parent.CommonHeader.ProtocolVersion == ProtocolVersion.G)
122122 {
123− UnscaledFrequency = EndianOrder.BigEndian.ToInt16(buffer, startIndex);
123+ UnscaledFrequency = BigEndian.ToInt16(buffer, startIndex);
124124 return 2;
125125 }
126126
Source/Libraries/GSF.PhasorProtocols/SelFastMessage/CommandFrame.cs+3−3
@@ -82,12 +82,12 @@ namespace GSF.PhasorProtocols.SelFastMessage · 81 unmodified lines
8282 Command = (DeviceCommand)buffer[startIndex + 9];
8383
8484 if (Command == DeviceCommand.EnableUnsolicitedMessages)
85− m_messagePeriod = (MessagePeriod)EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 14);
85+ m_messagePeriod = (MessagePeriod)BigEndian.ToUInt16(buffer, startIndex + 14);
8686
8787 // Validate check-sum
8888 int sumLength = FrameSize - 2;
8989
90− if (EndianOrder.BigEndian.ToUInt16(buffer, startIndex + sumLength) != CalculateChecksum(buffer, startIndex, sumLength))
90+ if (BigEndian.ToUInt16(buffer, startIndex + sumLength) != CalculateChecksum(buffer, startIndex, sumLength))
9191 throw new InvalidOperationException("Invalid binary image detected - check sum of " + this.GetType().Name + " did not match");
9292 }
9393
@@ -240,7 +240,7 @@ namespace GSF.PhasorProtocols.SelFastMessage · 146 unmodified lines
240240
241241 // Only add desired message rate for enable command
242242 if (Command == DeviceCommand.EnableUnsolicitedMessages)
243− EndianOrder.BigEndian.CopyBytes((ushort)m_messagePeriod, buffer, 5);
243+ BigEndian.CopyBytes((ushort)m_messagePeriod, buffer, 5);
244244
245245 return buffer;
246246 }
Source/Libraries/GSF.PhasorProtocols/SelFastMessage/CommonFrameHeader.cs+7−7
@@ -88,9 +88,9 @@ namespace GSF.PhasorProtocols.SelFastMessage · 87 unmodified lines
8888
8989 // Parse relevant common header values
9090 m_frameSize = (FrameSize)buffer[startIndex + 2];
91− m_idCode = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 12);
92− sampleCount = EndianOrder.BigEndian.ToUInt16(buffer, startIndex + 18);
93− secondOfCentury = EndianOrder.BigEndian.ToUInt32(buffer, startIndex + 20);
91+ m_idCode = BigEndian.ToUInt32(buffer, startIndex + 12);
92+ sampleCount = BigEndian.ToUInt16(buffer, startIndex + 18);
93+ secondOfCentury = BigEndian.ToUInt32(buffer, startIndex + 20);
9494
9595 // We use an NTP time tag since SEL Fast Message SOC also starts at 1/1/1900
9696 timetag = new NtpTimeTag(secondOfCentury, 0);
@@ -236,16 +236,16 @@ namespace GSF.PhasorProtocols.SelFastMessage · 139 unmodified lines
236236 buffer[10] = 0xC0; // Sequence byte
237237
238238 // Include destination address (PMADDR setting)
239− EndianOrder.BigEndian.CopyBytes(m_idCode, buffer, 12);
239+ BigEndian.CopyBytes(m_idCode, buffer, 12);
240240
241241 // Include register count
242− EndianOrder.BigEndian.CopyBytes(RegisterCount, buffer, 16);
242+ BigEndian.CopyBytes(RegisterCount, buffer, 16);
243243
244244 // Include sample number
245− EndianOrder.BigEndian.CopyBytes(SampleNumber, buffer, 18);
245+ BigEndian.CopyBytes(SampleNumber, buffer, 18);
246246
247247 // Include second of century
248− EndianOrder.BigEndian.CopyBytes(SecondOfCentury, buffer, 20);
248+ BigEndian.CopyBytes(SecondOfCentury, buffer, 20);
249249
250250 return buffer;
251251 }
Source/Libraries/GSF.PhasorProtocols/SelFastMessage/DataCell.cs+1−1
@@ -287,7 +287,7 @@ namespace GSF.PhasorProtocols.SelFastMessage · 286 unmodified lines
287287 }
288288
289289 // Parse out status flags
290− StatusFlags = (StatusFlags)EndianOrder.BigEndian.ToUInt16(buffer, index);
290+ StatusFlags = (StatusFlags)BigEndian.ToUInt16(buffer, index);
291291 index += 2;
292292
293293 // Return total parsed length
Source/Libraries/GSF.PhasorProtocols/SelFastMessage/FrequencyValue.cs+2−2
@@ -126,7 +126,7 @@ namespace GSF.PhasorProtocols.SelFastMessage · 125 unmodified lines
126126 {
127127 get
128128 {
129− return EndianOrder.BigEndian.GetBytes((float)Frequency);
129+ return BigEndian.GetBytes((float)Frequency);
130130 }
131131 }
132132
@@ -143,7 +143,7 @@ namespace GSF.PhasorProtocols.SelFastMessage · 10 unmodified lines
143143 /// <returns>The length of the data that was parsed.</returns>
144144 protected override int ParseBodyImage(byte[] buffer, int startIndex, int length)
145145 {
146− Frequency = EndianOrder.BigEndian.ToSingle(buffer, startIndex);
146+ Frequency = BigEndian.ToSingle(buffer, startIndex);
147147 return 4;
148148 }
149149
Source/Libraries/GSF.PhasorProtocols/SelFastMessage/PhasorValue.cs+4−4
@@ -136,8 +136,8 @@ namespace GSF.PhasorProtocols.SelFastMessage · 135 unmodified lines
136136 {
137137 byte[] buffer = new byte[8];
138138
139− EndianOrder.BigEndian.CopyBytes((float)Magnitude, buffer, 0);
140− EndianOrder.BigEndian.CopyBytes((float)Angle.ToDegrees(), buffer, 4);
139+ BigEndian.CopyBytes((float)Magnitude, buffer, 0);
140+ BigEndian.CopyBytes((float)Angle.ToDegrees(), buffer, 4);
141141
142142 return buffer;
143143 }
@@ -157,8 +157,8 @@ namespace GSF.PhasorProtocols.SelFastMessage · 13 unmodified lines
157157 protected override int ParseBodyImage(byte[] buffer, int startIndex, int length)
158158 {
159159 // Parse magnitude and angle in degrees
160− Magnitude = EndianOrder.BigEndian.ToSingle(buffer, startIndex);
161− Angle = Angle.FromDegrees(EndianOrder.BigEndian.ToSingle(buffer, startIndex + 4));
160+ Magnitude = BigEndian.ToSingle(buffer, startIndex);
161+ Angle = Angle.FromDegrees(BigEndian.ToSingle(buffer, startIndex + 4));
162162
163163 return 8;
164164 }
Source/Libraries/GSF.PhasorProtocols/UI/DataModels/CalculatedMeasurement.cs+1−1
@@ -201,7 +201,7 @@ namespace GSF.PhasorProtocols.UI.DataModels · 200 unmodified lines
201201 }
202202 set
203203 {
204− if (value == null)
204+ if ((object)value == null)
205205 m_connectionString = string.Empty;
206206 else
207207 m_connectionString = value;
Source/Libraries/GSF.PhasorProtocols/UI/DataModels/Device.cs+1−1
@@ -245,7 +245,7 @@ namespace GSF.PhasorProtocols.UI.DataModels · 244 unmodified lines
245245 }
246246 set
247247 {
248− if (value != null && value.Length > 200)
248+ if ((object)value != null && value.Length > 200)
249249 m_name = value.Substring(0, 200);
250250 else
251251 m_name = value;
Source/Libraries/GSF.PhasorProtocols/UI/DataModels/InputWizardDevice.cs+2−2
@@ -96,7 +96,7 @@ namespace GSF.PhasorProtocols.UI.DataModels · 95 unmodified lines
9696 }
9797 set
9898 {
99− if (value != null && value.Length > 200)
99+ if ((object)value != null && value.Length > 200)
100100 m_name = value.Substring(0, 200);
101101 else
102102 m_name = value;
@@ -429,7 +429,7 @@ namespace GSF.PhasorProtocols.UI.DataModels · 326 unmodified lines
429429 }
430430 set
431431 {
432− if (value != null & value.Length > 200)
432+ if ((object)value != null & value.Length > 200)
433433 m_label = value.Substring(0, 200);
434434 else
435435 m_label = value;
Source/Libraries/GSF.PhasorProtocols/UI/DataModels/Phasor.cs+1−1
@@ -117,7 +117,7 @@ namespace GSF.PhasorProtocols.UI.DataModels · 116 unmodified lines
117117 }
118118 set
119119 {
120− if (value != null && value.Length > 200)
120+ if ((object)value != null && value.Length > 200)
121121 m_label = value.Substring(0, 200);
122122 else
123123 m_label = value;
Source/Libraries/GSF.ServiceModel/Service.cs+3−2
@@ -207,7 +207,7 @@ namespace GSF.ServiceModel · 206 unmodified lines
207207 return tcpBinding;
208208 case "net.p2p":
209209 // Create binding.
210− #pragma warning disable 612, 618
210+#pragma warning disable 612, 618
211211 NetPeerTcpBinding p2pBinding = new NetPeerTcpBinding();
212212
213213 #if !MONO
@@ -285,7 +285,8 @@ namespace GSF.ServiceModel · 71 unmodified lines
285285 {
286286 // Find contract interface by service type name.
287287 Type contract = serviceType.GetInterface("I" + serviceType.Name);
288− if (contract == null)
288+
289+ if ((object)contract == null)
289290 {
290291 // Fall back to the first interface the service implements.
291292 Type[] interfaces = serviceType.GetInterfaces();
Source/Libraries/GSF.ServiceProcess/ClientInfo.cs+1−1
@@ -220,7 +220,7 @@ namespace GSF.ServiceProcess · 219 unmodified lines
220220 /// <param name="user">New <see cref="IPrincipal"/> object to be assigned to <see cref="ClientUser"/>.</param>
221221 internal void SetClientUser(IPrincipal user)
222222 {
223− if (user == null)
223+ if ((object)user == null)
224224 throw new ArgumentNullException("user");
225225
226226 m_clientUser = user;
Source/Libraries/GSF.ServiceProcess/ClientRequest.cs+1−1
@@ -164,7 +164,7 @@ namespace GSF.ServiceProcess · 163 unmodified lines
164164 public static ClientRequest Parse(string text)
165165 {
166166 // Input text can't be null.
167− if (text == null)
167+ if ((object)text == null)
168168 return null;
169169
170170 // Input text can't be empty.
Source/Libraries/GSF.ServiceProcess/ServiceHelper.cs+1−1
@@ -1541,7 +1541,7 @@ namespace GSF.ServiceProcess · 1540 unmodified lines
15411541 {
15421542 processName = processName.Trim();
15431543
1544− if (FindProcess(processName) == null)
1544+ if ((object)FindProcess(processName) == null)
15451545 return false;
15461546
15471547 // The specified process exists, so we'll schedule it, or update its schedule if it is scheduled already.
Source/Libraries/GSF.TimeSeries/Adapters/AdapterBase.cs+2−2
@@ -1188,7 +1188,7 @@ namespace GSF.TimeSeries.Adapters · 1187 unmodified lines
11881188 if (sourceIDKeys != null)
11891189 {
11901190 // Combine input measurement keys for source IDs with any existing input measurement keys and return unique set
1191− if (adapter.InputMeasurementKeys == null)
1191+ if ((object)adapter.InputMeasurementKeys == null)
11921192 adapter.InputMeasurementKeys = sourceIDKeys;
11931193 else
11941194 adapter.InputMeasurementKeys = sourceIDKeys.Concat(adapter.InputMeasurementKeys).Distinct().ToArray();
@@ -1281,7 +1281,7 @@ namespace GSF.TimeSeries.Adapters · 86 unmodified lines
12811281 }
12821282
12831283 // Combine output measurements for source IDs with any existing output measurements and return unique set
1284− if (adapter.OutputMeasurements == null)
1284+ if ((object)adapter.OutputMeasurements == null)
12851285 adapter.OutputMeasurements = measurements.ToArray();
12861286 else
12871287 adapter.OutputMeasurements = measurements.Concat(adapter.OutputMeasurements).Distinct().ToArray();
Source/Libraries/GSF.TimeSeries/Adapters/AdapterCollectionBase.cs+3−3
@@ -328,7 +328,7 @@ namespace GSF.TimeSeries.Adapters · 327 unmodified lines
328328
329329 // If any of the children expects all measurements (i.e., null InputMeasurementKeys)
330330 // then the parent collection must expect all measurements
331− if (inputMeasurementKeys == null)
331+ if ((object)inputMeasurementKeys == null)
332332 return null;
333333
334334 if (inputMeasurementKeys.Length > 0)
@@ -830,7 +830,7 @@ namespace GSF.TimeSeries.Adapters · 495 unmodified lines
830830 /// <exception cref="InvalidOperationException">DataMember is null or empty.</exception>
831831 public virtual void Initialize()
832832 {
833− if (DataSource == null)
833+ if ((object)DataSource == null)
834834 throw new NullReferenceException(string.Format("DataSource is null, cannot load {0}", Name));
835835
836836 if (string.IsNullOrWhiteSpace(DataMember))
@@ -877,7 +877,7 @@ namespace GSF.TimeSeries.Adapters · 40 unmodified lines
877877 /// <exception cref="NullReferenceException"><paramref name="adapterRow"/> is null.</exception>
878878 public virtual bool TryCreateAdapter(DataRow adapterRow, out T adapter)
879879 {
880− if (adapterRow == null)
880+ if ((object)adapterRow == null)
881881 throw new NullReferenceException(string.Format("Cannot initialize from null adapter DataRow"));
882882
883883 Assembly assembly;
Source/Libraries/GSF.TimeSeries/Adapters/FacileActionAdapterBase.cs+3−3
@@ -135,14 +135,14 @@ namespace GSF.TimeSeries.Adapters · 134 unmodified lines
135135 {
136136 get
137137 {
138− if (m_inputSourceIDs == null)
138+ if ((object)m_inputSourceIDs == null)
139139 return null;
140140
141141 return m_inputSourceIDs.ToArray();
142142 }
143143 set
144144 {
145− if (value == null)
145+ if ((object)value == null)
146146 {
147147 m_inputSourceIDs = null;
148148 }
@@ -175,7 +175,7 @@ namespace GSF.TimeSeries.Adapters · 26 unmodified lines
175175 }
176176 set
177177 {
178− if (value == null)
178+ if ((object)value == null)
179179 {
180180 m_outputSourceIDs = null;
181181 }
Source/Libraries/GSF.TimeSeries/Adapters/InputAdapterBase.cs+2−2
@@ -100,14 +100,14 @@ namespace GSF.TimeSeries.Adapters · 99 unmodified lines
100100 {
101101 get
102102 {
103− if (m_outputSourceIDs == null)
103+ if ((object)m_outputSourceIDs == null)
104104 return null;
105105
106106 return m_outputSourceIDs.ToArray();
107107 }
108108 set
109109 {
110− if (value == null)
110+ if ((object)value == null)
111111 {
112112 m_outputSourceIDs = null;
113113 }
Source/Libraries/GSF.TimeSeries/Adapters/OutputAdapterBase.cs+3−3
@@ -157,14 +157,14 @@ namespace GSF.TimeSeries.Adapters · 156 unmodified lines
157157 {
158158 get
159159 {
160− if (m_inputSourceIDs == null)
160+ if ((object)m_inputSourceIDs == null)
161161 return null;
162162
163163 return m_inputSourceIDs.ToArray();
164164 }
165165 set
166166 {
167− if (value == null)
167+ if ((object)value == null)
168168 {
169169 m_inputSourceIDs = null;
170170 }
@@ -369,7 +369,7 @@ namespace GSF.TimeSeries.Adapters · 198 unmodified lines
369369 status.AppendLine();
370370 }
371371
372− status.AppendFormat(" Source ID filter list: {0}", (m_inputSourceIDs == null ? "[No filter applied]" : m_inputSourceIDs.ToDelimitedString(',')));
372+ status.AppendFormat(" Source ID filter list: {0}", ((object)m_inputSourceIDs == null ? "[No filter applied]" : m_inputSourceIDs.ToDelimitedString(',')));
373373 status.AppendLine();
374374 status.AppendFormat(" Asynchronous connection: {0}", UseAsyncConnect);
375375 status.AppendLine();
Source/Libraries/GSF.TimeSeries/ConcentratorBase.cs+7−7
@@ -1516,7 +1516,7 @@ namespace GSF.TimeSeries · 1515 unmodified lines
15161516 status.Append("Last discarded measurement: ");
15171517
15181518 Interlocked.Exchange(ref lastDiscardedMeasurement, m_lastDiscardedMeasurement);
1519− if (lastDiscardedMeasurement == null)
1519+ if ((object)lastDiscardedMeasurement == null)
15201520 {
15211521 status.Append("<none>");
15221522 }
@@ -1581,7 +1581,7 @@ namespace GSF.TimeSeries · 58 unmodified lines
15811581 status.AppendLine();
15821582 status.Append(" Last published frame: ");
15831583
1584− if (lastFrame == null)
1584+ if ((object)lastFrame == null)
15851585 {
15861586 status.Append("<none>");
15871587 }
@@ -1846,7 +1846,7 @@ namespace GSF.TimeSeries · 258 unmodified lines
18461846 // Get the destination frame for the measurement. Note that groups of parsed measurements will
18471847 // typically be coming in from the same source and will have the same ticks. If we have already
18481848 // found the destination frame for the same ticks, then there is no need to lookup frame again.
1849− if (frame == null || timestamp != lastTimestamp)
1849+ if ((object)frame == null || timestamp != lastTimestamp)
18501850 {
18511851 if (m_processByReceivedTimestamp)
18521852 {
@@ -1879,7 +1879,7 @@ namespace GSF.TimeSeries · 26 unmodified lines
18791879 }
18801880 }
18811881
1882− if (frame == null)
1882+ if ((object)frame == null)
18831883 {
18841884 // Measurement is discarded if no bucket (i.e., destination frame) was found for it.
18851885 discardMeasurement = true;
@@ -1890,7 +1890,7 @@ namespace GSF.TimeSeries · 4 unmodified lines
18901890 // Derive new measurement value applying any needed down-sampling
18911891 derivedMeasurement = frame.DeriveMeasurementValue(measurement);
18921892
1893− if (derivedMeasurement == null)
1893+ if ((object)derivedMeasurement == null)
18941894 {
18951895 // Count this as a discarded measurement if down-sampling derivation was not applied.
18961896 discardMeasurement = true;
@@ -1949,7 +1949,7 @@ namespace GSF.TimeSeries · 52 unmodified lines
19491949 Interlocked.Increment(ref m_discardedMeasurements);
19501950
19511951 // Make sure discarded measurement collection exists
1952− if (discardedMeasurements == null)
1952+ if ((object)discardedMeasurements == null)
19531953 discardedMeasurements = new List<IMeasurement>();
19541954
19551955 // Add discarded measurement to local collection
@@ -2118,7 +2118,7 @@ namespace GSF.TimeSeries · 162 unmodified lines
21182118 frame = m_frameQueue.Head;
21192119
21202120 // If no frame is ready to publish, exit
2121− if (frame == null)
2121+ if ((object)frame == null)
21222122 break;
21232123
21242124 // Get ticks for this frame
Source/Libraries/GSF.TimeSeries/Configuration/BinaryFileConfigurationLoader.cs+2−0
@@ -26,6 +26,8 @@ using System.Data; · 25 unmodified lines
2626 using System.IO;
2727 using GSF.Data;
2828
29+#pragma warning disable 0067
30+
2931 namespace GSF.TimeSeries.Configuration
3032 {
3133 /// <summary>
Source/Libraries/GSF.TimeSeries/Configuration/WebServiceConfigurationLoader.cs+2−0
@@ -25,6 +25,8 @@ using System; · 24 unmodified lines
2525 using System.Data;
2626 using System.Net;
2727
28+#pragma warning disable 0067
29+
2830 namespace GSF.TimeSeries.Configuration
2931 {
3032 /// <summary>
Source/Libraries/GSF.TimeSeries/Configuration/XMLConfigurationLoader.cs+2−0
@@ -24,6 +24,8 @@ · 23 unmodified lines
2424 using System;
2525 using System.Data;
2626
27+#pragma warning disable 0067
28+
2729 namespace GSF.TimeSeries.Configuration
2830 {
2931 /// <summary>
Source/Libraries/GSF.TimeSeries/FrameQueue.cs+5−1
@@ -260,14 +260,18 @@ namespace GSF.TimeSeries · 259 unmodified lines
260260 else
261261 frame = null;
262262
263− if (frame == null)
263+ if ((object)frame == null)
264+ {
264265 status.AppendFormat("Frame {0} @ <null frame>", i.ToString().PadLeft(4, '0'));
266+ }
265267 else
268+ {
266269 status.AppendFormat("Frame {0} @ {1} - {2} measurements, {3} received",
267270 i.ToString().PadLeft(4, '0'),
268271 (new DateTime(frame.Timestamp)).ToString("dd-MMM-yyyy HH:mm:ss.fff"),
269272 frame.Measurements.Count,
270273 (frame.Measurements.Count / (double)expectedMeasurements).ToString("##0.00%"));
274+ }
271275
272276 status.AppendLine();
273277 node = node.Next;
Source/Libraries/GSF.TimeSeries/IMeasurement.cs+1−1
@@ -359,7 +359,7 @@ namespace GSF.TimeSeries · 358 unmodified lines
359359 /// <returns><see cref="MeasurementKey"/> values of the <see cref="IMeasurement"/> enumeration.</returns>
360360 public static MeasurementKey[] MeasurementKeys(this IEnumerable<IMeasurement> measurements)
361361 {
362− if (measurements == null)
362+ if ((object)measurements == null)
363363 return new MeasurementKey[0];
364364
365365 return measurements.Select(m => m.Key).ToArray();
Source/Libraries/GSF.TimeSeries/Measurement.cs+1−1
@@ -561,7 +561,7 @@ namespace GSF.TimeSeries · 560 unmodified lines
561561 /// <returns>A <see cref="String"/> that represents the specified <see cref="IMeasurement"/>.</returns>
562562 public static string ToString(IMeasurement measurement, bool includeTagName = true)
563563 {
564− if (measurement == null)
564+ if ((object)measurement == null)
565565 return "Undefined";
566566
567567 string tagName = measurement.TagName;
Source/Libraries/GSF.TimeSeries/MeasurementKey.cs+1−1
@@ -207,7 +207,7 @@ namespace GSF.TimeSeries · 206 unmodified lines
207207 /// <param name="key">The measurement key that was created or updated or <see cref="Undefined"/>.</param>
208208 /// <returns>True if the measurement key was successfully created or updated, false otherwise.</returns>
209209 /// <exception cref="ArgumentException"><paramref name="signalID"/> cannot be empty.</exception>
210− /// <exception cref="ArgumentNullException"><paramref name="source"/> cannot be null.</exception>
210+ /// <exception cref="ArgumentNullException">Measurement key Source cannot be null.</exception>
211211 public static bool TryCreateOrUpdate(Guid signalID, string value, out MeasurementKey key)
212212 {
213213 try
Source/Libraries/GSF.TimeSeries/ServiceHostBase.cs+17−6
@@ -370,7 +370,10 @@ namespace GSF.TimeSeries · 369 unmodified lines
370370 m_allowRemoteRestart = systemSettings["AllowRemoteRestart"].ValueAsBoolean(true);
371371 m_preferCachedConfiguration = systemSettings["PreferCachedConfiguration"].ValueAsBoolean(false);
372372 m_reloadConfigQueue = ProcessQueue<Tuple<string, Action<bool>>>.CreateSynchronousQueue(ExecuteReloadConfig, 500.0D, Timeout.Infinite, false, false);
373− m_configurationCacheOperation = new LongSynchronizedOperation(ExecuteConfigurationCache) { IsBackground = true };
373+ m_configurationCacheOperation = new LongSynchronizedOperation(ExecuteConfigurationCache)
374+ {
375+ IsBackground = true
376+ };
374377
375378 // Setup default thread pool size
376379 try
@@ -437,8 +440,14 @@ namespace GSF.TimeSeries · 60 unmodified lines
437440 break;
438441 }
439442
440− m_binaryCacheConfigurationLoader = new BinaryFileConfigurationLoader() { FilePath = m_cachedBinaryConfigurationFile };
441− m_xmlCacheConfigurationLoader = new XMLConfigurationLoader() { FilePath = m_cachedXmlConfigurationFile };
443+ m_binaryCacheConfigurationLoader = new BinaryFileConfigurationLoader()
444+ {
445+ FilePath = m_cachedBinaryConfigurationFile
446+ };
447+ m_xmlCacheConfigurationLoader = new XMLConfigurationLoader()
448+ {
449+ FilePath = m_cachedXmlConfigurationFile
450+ };
442451
443452 m_configurationLoader.StatusMessage += (o, args) => DisplayStatusMessage(args.Argument, UpdateType.Information);
444453 m_binaryCacheConfigurationLoader.StatusMessage += (o, args) => DisplayStatusMessage(args.Argument, UpdateType.Information);
@@ -1415,7 +1424,9 @@ namespace GSF.TimeSeries · 970 unmodified lines
14151424 /// </remarks>
14161425 private void m_iaonSession_ConfigurationChanged(object sender, EventArgs e)
14171426 {
1418− m_reloadConfigQueue.Add(Tuple.Create("System", new Action<bool>(success => { })));
1427+ m_reloadConfigQueue.Add(Tuple.Create("System", new Action<bool>(success =>
1428+ {
1429+ })));
14191430 }
14201431
14211432 // Handle task scheduler exceptions
@@ -1874,7 +1885,7 @@ namespace GSF.TimeSeries · 452 unmodified lines
18741885 if (success)
18751886 {
18761887 // Return value, if any, will be returned to requesting client as a response attachment
1877− if (returnValue == null)
1888+ if ((object)returnValue == null)
18781889 SendResponse(requestInfo, true, "Command \"{0}\" successfully invoked.", command);
18791890 else
18801891 SendResponseWithAttachment(requestInfo, true, returnValue, "Command \"{0}\" successfully invoked, return value = {1}", command, returnValue.ToNonNullString("null"));
@@ -2889,7 +2900,7 @@ namespace GSF.TimeSeries · 1008 unmodified lines
28892900 else if (addSetting)
28902901 {
28912902 // Add new setting.
2892− if (setting == null)
2903+ if ((object)setting == null)
28932904 {
28942905 settings.Add(settingName, settingValue);
28952906 config.Save();
Source/Libraries/GSF.TimeSeries/TrackingFrame.cs+1−1
@@ -188,7 +188,7 @@ namespace GSF.TimeSeries · 187 unmodified lines
188188 MeasurementValueFilterFunction measurementValueFilter = derivedMeasurement.MeasurementValueFilter;
189189
190190 // Default to average value filter if none is specified
191− if (measurementValueFilter == null)
191+ if ((object)measurementValueFilter == null)
192192 measurementValueFilter = Measurement.AverageValueFilter;
193193
194194 // Add new measurement to tracking collection
Source/Libraries/GSF.TimeSeries/Transport/ClientConnection.cs+4−4
@@ -711,22 +711,22 @@ namespace GSF.TimeSeries.Transport · 710 unmodified lines
711711 using (BlockAllocatedMemoryStream buffer = new BlockAllocatedMemoryStream())
712712 {
713713 // Write even key
714− bufferLen = EndianOrder.BigEndian.GetBytes(m_keyIVs[EvenKey][KeyIndex].Length);
714+ bufferLen = BigEndian.GetBytes(m_keyIVs[EvenKey][KeyIndex].Length);
715715 buffer.Write(bufferLen, 0, bufferLen.Length);
716716 buffer.Write(m_keyIVs[EvenKey][KeyIndex], 0, m_keyIVs[EvenKey][KeyIndex].Length);
717717
718718 // Write even initialization vector
719− bufferLen = EndianOrder.BigEndian.GetBytes(m_keyIVs[EvenKey][IVIndex].Length);
719+ bufferLen = BigEndian.GetBytes(m_keyIVs[EvenKey][IVIndex].Length);
720720 buffer.Write(bufferLen, 0, bufferLen.Length);
721721 buffer.Write(m_keyIVs[EvenKey][IVIndex], 0, m_keyIVs[EvenKey][IVIndex].Length);
722722
723723 // Write odd key
724− bufferLen = EndianOrder.BigEndian.GetBytes(m_keyIVs[OddKey][KeyIndex].Length);
724+ bufferLen = BigEndian.GetBytes(m_keyIVs[OddKey][KeyIndex].Length);
725725 buffer.Write(bufferLen, 0, bufferLen.Length);
726726 buffer.Write(m_keyIVs[OddKey][KeyIndex], 0, m_keyIVs[OddKey][KeyIndex].Length);
727727
728728 // Write odd initialization vector
729− bufferLen = EndianOrder.BigEndian.GetBytes(m_keyIVs[OddKey][IVIndex].Length);
729+ bufferLen = BigEndian.GetBytes(m_keyIVs[OddKey][IVIndex].Length);
730730 buffer.Write(bufferLen, 0, bufferLen.Length);
731731 buffer.Write(m_keyIVs[OddKey][IVIndex], 0, m_keyIVs[OddKey][IVIndex].Length);
732732
Source/Libraries/GSF.TimeSeries/Transport/CompactMeasurement.cs+12−12
@@ -203,7 +203,7 @@ namespace GSF.TimeSeries.Transport · 202 unmodified lines
203203 m_includeTime = includeTime;
204204
205205 // We keep a clone of the base time offsets, if provided, since array contents can change at any time
206− if (baseTimeOffsets == null)
206+ if ((object)baseTimeOffsets == null)
207207 m_baseTimeOffsets = s_emptyBaseTimeOffsets;
208208 else
209209 m_baseTimeOffsets = new[] { baseTimeOffsets[0], baseTimeOffsets[1] };
@@ -234,7 +234,7 @@ namespace GSF.TimeSeries.Transport · 24 unmodified lines
234234 m_includeTime = includeTime;
235235
236236 // We keep a clone of the base time offsets, if provided, since array contents can change at any time
237− if (baseTimeOffsets == null)
237+ if ((object)baseTimeOffsets == null)
238238 m_baseTimeOffsets = s_emptyBaseTimeOffsets;
239239 else
240240 m_baseTimeOffsets = new[] { baseTimeOffsets[0], baseTimeOffsets[1] };
@@ -409,11 +409,11 @@ namespace GSF.TimeSeries.Transport · 168 unmodified lines
409409 CompactStateFlags = buffer[index++];
410410
411411 // Decode runtime ID
412− RuntimeID = EndianOrder.BigEndian.ToUInt16(buffer, index);
412+ RuntimeID = BigEndian.ToUInt16(buffer, index);
413413 index += 2;
414414
415415 // Decode value
416− Value = EndianOrder.BigEndian.ToSingle(buffer, index);
416+ Value = BigEndian.ToSingle(buffer, index);
417417 index += 4;
418418
419419 if (m_includeTime)
@@ -426,7 +426,7 @@ namespace GSF.TimeSeries.Transport · 6 unmodified lines
426426 {
427427 // Decode 2-byte millisecond offset timestamp
428428 if (baseTimeOffset > 0)
429− Timestamp = baseTimeOffset + EndianOrder.BigEndian.ToUInt16(buffer, index) * Ticks.PerMillisecond;
429+ Timestamp = baseTimeOffset + BigEndian.ToUInt16(buffer, index) * Ticks.PerMillisecond;
430430
431431 index += 2;
432432 }
@@ -434,7 +434,7 @@ namespace GSF.TimeSeries.Transport · 1 unmodified line
434434 {
435435 // Decode 4-byte tick offset timestamp
436436 if (baseTimeOffset > 0)
437− Timestamp = baseTimeOffset + EndianOrder.BigEndian.ToUInt32(buffer, index);
437+ Timestamp = baseTimeOffset + BigEndian.ToUInt32(buffer, index);
438438
439439 index += 4;
440440 }
@@ -442,7 +442,7 @@ namespace GSF.TimeSeries.Transport · 1 unmodified line
442442 else
443443 {
444444 // Decode 8-byte full fidelity timestamp
445− Timestamp = EndianOrder.BigEndian.ToInt64(buffer, index);
445+ Timestamp = BigEndian.ToInt64(buffer, index);
446446 index += 8;
447447 }
448448 }
@@ -486,10 +486,10 @@ namespace GSF.TimeSeries.Transport · 37 unmodified lines
486486 buffer[startIndex++] = CompactStateFlags;
487487
488488 // Encode runtime ID
489− startIndex += EndianOrder.BigEndian.CopyBytes(RuntimeID, buffer, startIndex);
489+ startIndex += BigEndian.CopyBytes(RuntimeID, buffer, startIndex);
490490
491491 // Encode adjusted value (accounts for adder and multiplier)
492− startIndex += EndianOrder.BigEndian.CopyBytes((float)AdjustedValue, buffer, startIndex);
492+ startIndex += BigEndian.CopyBytes((float)AdjustedValue, buffer, startIndex);
493493
494494 if (m_includeTime)
495495 {
@@ -498,18 +498,18 @@ namespace GSF.TimeSeries.Transport · 2 unmodified lines
498498 if (m_useMillisecondResolution)
499499 {
500500 // Encode 2-byte millisecond offset timestamp
501− EndianOrder.BigEndian.CopyBytes(TimestampC2, buffer, startIndex);
501+ BigEndian.CopyBytes(TimestampC2, buffer, startIndex);
502502 }
503503 else
504504 {
505505 // Encode 4-byte ticks offset timestamp
506− EndianOrder.BigEndian.CopyBytes(TimestampC4, buffer, startIndex);
506+ BigEndian.CopyBytes(TimestampC4, buffer, startIndex);
507507 }
508508 }
509509 else
510510 {
511511 // Encode 8-byte full fidelity timestamp
512− EndianOrder.BigEndian.CopyBytes((long)Timestamp, buffer, startIndex);
512+ BigEndian.CopyBytes((long)Timestamp, buffer, startIndex);
513513 }
514514 }
515515
Source/Libraries/GSF.TimeSeries/Transport/DataPublisher.cs+11−11
@@ -1995,7 +1995,7 @@ namespace GSF.TimeSeries.Transport · 1994 unmodified lines
19951995 {
19961996 foreach (KeyValuePair<int, string> pair in notifications)
19971997 {
1998− hash = EndianOrder.BigEndian.GetBytes(pair.Key);
1998+ hash = BigEndian.GetBytes(pair.Key);
19991999 message = connection.Encoding.GetBytes(pair.Value);
20002000
20012001 buffer.Write(hash, 0, hash.Length);
@@ -2189,7 +2189,7 @@ namespace GSF.TimeSeries.Transport · 187 unmodified lines
21892189 /// <param name="startTime">Start time, in <see cref="Ticks"/>, of first measurement transmitted.</param>
21902190 internal protected virtual bool SendDataStartTime(Guid clientID, Ticks startTime)
21912191 {
2192− bool result = SendClientResponse(clientID, ServerResponse.DataStartTime, ServerCommand.Subscribe, EndianOrder.BigEndian.GetBytes((long)startTime));
2192+ bool result = SendClientResponse(clientID, ServerResponse.DataStartTime, ServerCommand.Subscribe, BigEndian.GetBytes((long)startTime));
21932193
21942194 ClientConnection connection;
21952195
@@ -2532,12 +2532,12 @@ namespace GSF.TimeSeries.Transport · 336 unmodified lines
25322532 workingBuffer.Seek(2, SeekOrigin.Begin);
25332533
25342534 // Add the actual size of payload length to response packet
2535− workingBuffer.Write(EndianOrder.BigEndian.GetBytes(payloadLength), 0, 4);
2535+ workingBuffer.Write(BigEndian.GetBytes(payloadLength), 0, 4);
25362536 }
25372537 else
25382538 {
25392539 // Add size of data buffer to response packet
2540− workingBuffer.Write(EndianOrder.BigEndian.GetBytes(data.Length), 0, 4);
2540+ workingBuffer.Write(BigEndian.GetBytes(data.Length), 0, 4);
25412541
25422542 // Add data buffer
25432543 workingBuffer.Write(data, 0, data.Length);
@@ -2877,7 +2877,7 @@ namespace GSF.TimeSeries.Transport · 333 unmodified lines
28772877 if (length >= 5)
28782878 {
28792879 // First 4 bytes beyond command byte represent an integer representing the length of the authentication string that follows
2880− int byteLength = EndianOrder.BigEndian.ToInt32(buffer, startIndex);
2880+ int byteLength = BigEndian.ToInt32(buffer, startIndex);
28812881 startIndex += 4;
28822882
28832883 // Byte length should be reasonable
@@ -2975,7 +2975,7 @@ namespace GSF.TimeSeries.Transport · 91 unmodified lines
29752975 bool addSubscription = false;
29762976
29772977 // Next 4 bytes are an integer representing the length of the connection string that follows
2978− int byteLength = EndianOrder.BigEndian.ToInt32(buffer, startIndex);
2978+ int byteLength = BigEndian.ToInt32(buffer, startIndex);
29792979 startIndex += 4;
29802980
29812981 if (byteLength > 0 && length >= 6 + byteLength)
@@ -3240,7 +3240,7 @@ namespace GSF.TimeSeries.Transport · 258 unmodified lines
32403240 // DataTable.Select() function against an in-memory DataSet and therefore are not subject to SQL injection attacks
32413241 if (length > 4)
32423242 {
3243− int responseLength = EndianOrder.BigEndian.ToInt32(buffer, startIndex);
3243+ int responseLength = BigEndian.ToInt32(buffer, startIndex);
32443244 startIndex += 4;
32453245
32463246 if (length >= responseLength + 4)
@@ -3438,7 +3438,7 @@ namespace GSF.TimeSeries.Transport · 191 unmodified lines
34383438 if (length >= 4)
34393439 {
34403440 // Next 4 bytes are an integer representing the new processing interval
3441− int processingInterval = EndianOrder.BigEndian.ToInt32(buffer, startIndex);
3441+ int processingInterval = BigEndian.ToInt32(buffer, startIndex);
34423442
34433443 IClientSubscription subscription = connection.Subscription;
34443444
@@ -3470,7 +3470,7 @@ namespace GSF.TimeSeries.Transport · 25 unmodified lines
34703470
34713471 if (length >= 4)
34723472 {
3473− operationalModes = EndianOrder.BigEndian.ToUInt32(buffer, startIndex);
3473+ operationalModes = BigEndian.ToUInt32(buffer, startIndex);
34743474
34753475 if ((operationalModes & (uint)OperationalModes.VersionMask) != 0u)
34763476 OnStatusMessage("WARNING: Protocol version not supported. Operational modes may not be set correctly for client {0}.", connection.ClientID);
@@ -3482,7 +3482,7 @@ namespace GSF.TimeSeries.Transport · 5 unmodified lines
34823482 // Handle confirmation of receipt of notification
34833483 private void HandleConfirmNotification(ClientConnection connection, byte[] buffer, int startIndex, int length)
34843484 {
3485− int hash = EndianOrder.BigEndian.ToInt32(buffer, startIndex);
3485+ int hash = BigEndian.ToInt32(buffer, startIndex);
34863486 Dictionary<int, string> notifications;
34873487 string notification;
34883488
@@ -3521,7 +3521,7 @@ namespace GSF.TimeSeries.Transport · 32 unmodified lines
35213521
35223522 if (length >= 4)
35233523 {
3524− sequenceNumber = EndianOrder.BigEndian.ToUInt32(buffer, startIndex);
3524+ sequenceNumber = BigEndian.ToUInt32(buffer, startIndex);
35253525 connection.Subscription.ConfirmBufferBlock(sequenceNumber);
35263526 }
35273527 }
Source/Libraries/GSF.TimeSeries/Transport/DataSubscriber.cs+17−17
@@ -875,7 +875,7 @@ namespace GSF.TimeSeries.Transport · 874 unmodified lines
875875 base.ProcessingInterval = value;
876876
877877 // Request server update the processing interval
878− SendServerCommand(ServerCommand.UpdateProcessingInterval, EndianOrder.BigEndian.GetBytes(value));
878+ SendServerCommand(ServerCommand.UpdateProcessingInterval, BigEndian.GetBytes(value));
879879 }
880880 }
881881
@@ -1542,7 +1542,7 @@ namespace GSF.TimeSeries.Transport · 660 unmodified lines
15421542 bytes = bytes.Encrypt(sharedSecret, CipherStrength.Aes256);
15431543
15441544 // Write encoded authentication key length into buffer
1545− buffer.Write(EndianOrder.BigEndian.GetBytes(bytes.Length), 0, 4);
1545+ buffer.Write(BigEndian.GetBytes(bytes.Length), 0, 4);
15461546
15471547 // Encode encrypted authentication key into buffer
15481548 buffer.Write(bytes, 0, bytes.Length);
@@ -2133,7 +2133,7 @@ namespace GSF.TimeSeries.Transport · 584 unmodified lines
21332133 bytes = m_encoding.GetBytes(connectionString);
21342134
21352135 // Write encoded connection string length into buffer
2136− buffer.Write(EndianOrder.BigEndian.GetBytes(bytes.Length), 0, 4);
2136+ buffer.Write(BigEndian.GetBytes(bytes.Length), 0, 4);
21372137
21382138 // Encode connection string into buffer
21392139 buffer.Write(bytes, 0, bytes.Length);
@@ -2248,7 +2248,7 @@ namespace GSF.TimeSeries.Transport · 108 unmodified lines
22482248 {
22492249 byte[] bytes = m_encoding.GetBytes(message);
22502250
2251− buffer.Write(EndianOrder.BigEndian.GetBytes(bytes.Length), 0, 4);
2251+ buffer.Write(BigEndian.GetBytes(bytes.Length), 0, 4);
22522252 buffer.Write(bytes, 0, bytes.Length);
22532253
22542254 return SendServerCommand(commandCode, buffer.ToArray());
@@ -2418,7 +2418,7 @@ namespace GSF.TimeSeries.Transport · 163 unmodified lines
24182418
24192419 ServerResponse responseCode = (ServerResponse)buffer[0];
24202420 ServerCommand commandCode = (ServerCommand)buffer[1];
2421− int responseLength = EndianOrder.BigEndian.ToInt32(buffer, 2);
2421+ int responseLength = BigEndian.ToInt32(buffer, 2);
24222422 int responseIndex = DataPublisher.ClientResponseHeaderSize;
24232423 bool solicited = false;
24242424 byte[][][] keyIVs;
@@ -2544,12 +2544,12 @@ namespace GSF.TimeSeries.Transport · 119 unmodified lines
25442544 // Synchronized packets contain a frame level timestamp
25452545 if (synchronizedMeasurements)
25462546 {
2547− timestamp = EndianOrder.BigEndian.ToInt64(buffer, responseIndex);
2547+ timestamp = BigEndian.ToInt64(buffer, responseIndex);
25482548 responseIndex += 8;
25492549 }
25502550
25512551 // Deserialize number of measurements that follow
2552− count = EndianOrder.BigEndian.ToInt32(buffer, responseIndex);
2552+ count = BigEndian.ToInt32(buffer, responseIndex);
25532553 responseIndex += 4;
25542554
25552555 if (compressedPayload)
@@ -2713,7 +2713,7 @@ namespace GSF.TimeSeries.Transport · 157 unmodified lines
27132713 break;
27142714 case ServerResponse.BufferBlock:
27152715 // Buffer block received - wrap as a buffer block measurement and expose back to consumer
2716− uint sequenceNumber = EndianOrder.BigEndian.ToUInt32(buffer, responseIndex);
2716+ uint sequenceNumber = BigEndian.ToUInt32(buffer, responseIndex);
27172717 int cacheIndex = (int)(sequenceNumber - m_expectedBufferBlockSequenceNumber);
27182718 BufferBlockMeasurement bufferBlockMeasurement;
27192719 Tuple<Guid, string, uint> measurementKey;
@@ -2726,7 +2726,7 @@ namespace GSF.TimeSeries.Transport · 6 unmodified lines
27262726 SendServerCommand(ServerCommand.ConfirmBufferBlock, buffer.BlockCopy(responseIndex, 4));
27272727
27282728 // Get measurement key from signal index cache
2729− signalIndex = EndianOrder.BigEndian.ToUInt16(buffer, responseIndex + 4);
2729+ signalIndex = BigEndian.ToUInt16(buffer, responseIndex + 4);
27302730
27312731 if (!m_signalIndexCache.Reference.TryGetValue(signalIndex, out measurementKey))
27322732 throw new InvalidOperationException("Failed to find associated signal identification for runtime ID " + signalIndex);
@@ -2781,7 +2781,7 @@ namespace GSF.TimeSeries.Transport · 48 unmodified lines
27812781 break;
27822782 case ServerResponse.DataStartTime:
27832783 // Raise data start time event
2784− OnDataStartTime(EndianOrder.BigEndian.ToInt64(buffer, responseIndex));
2784+ OnDataStartTime(BigEndian.ToInt64(buffer, responseIndex));
27852785 break;
27862786 case ServerResponse.ProcessingComplete:
27872787 // Raise input processing completed event
@@ -2795,11 +2795,11 @@ namespace GSF.TimeSeries.Transport · 7 unmodified lines
27952795 break;
27962796 case ServerResponse.UpdateBaseTimes:
27972797 // Get active time index
2798− m_timeIndex = EndianOrder.BigEndian.ToInt32(buffer, responseIndex);
2798+ m_timeIndex = BigEndian.ToInt32(buffer, responseIndex);
27992799 responseIndex += 4;
28002800
28012801 // Deserialize new base time offsets
2802− m_baseTimeOffsets = new[] { EndianOrder.BigEndian.ToInt64(buffer, responseIndex), EndianOrder.BigEndian.ToInt64(buffer, responseIndex + 8) };
2802+ m_baseTimeOffsets = new[] { BigEndian.ToInt64(buffer, responseIndex), BigEndian.ToInt64(buffer, responseIndex + 8) };
28032803 break;
28042804 case ServerResponse.UpdateCipherKeys:
28052805 // Move past active cipher index (not currently used anywhere else)
@@ -2821,7 +2821,7 @@ namespace GSF.TimeSeries.Transport · 15 unmodified lines
28212821 int bufferLen;
28222822
28232823 // Read even key size
2824− bufferLen = EndianOrder.BigEndian.ToInt32(bytes, index);
2824+ bufferLen = BigEndian.ToInt32(bytes, index);
28252825 index += 4;
28262826
28272827 // Read even key
@@ -2830,7 +2830,7 @@ namespace GSF.TimeSeries.Transport · 2 unmodified lines
28302830 index += bufferLen;
28312831
28322832 // Read even initialization vector size
2833− bufferLen = EndianOrder.BigEndian.ToInt32(bytes, index);
2833+ bufferLen = BigEndian.ToInt32(bytes, index);
28342834 index += 4;
28352835
28362836 // Read even initialization vector
@@ -2839,7 +2839,7 @@ namespace GSF.TimeSeries.Transport · 2 unmodified lines
28392839 index += bufferLen;
28402840
28412841 // Read odd key size
2842− bufferLen = EndianOrder.BigEndian.ToInt32(bytes, index);
2842+ bufferLen = BigEndian.ToInt32(bytes, index);
28432843 index += 4;
28442844
28452845 // Read odd key
@@ -2848,7 +2848,7 @@ namespace GSF.TimeSeries.Transport · 2 unmodified lines
28482848 index += bufferLen;
28492849
28502850 // Read odd initialization vector size
2851− bufferLen = EndianOrder.BigEndian.ToInt32(bytes, index);
2851+ bufferLen = BigEndian.ToInt32(bytes, index);
28522852 index += 4;
28532853
28542854 // Read odd initialization vector
@@ -4123,7 +4123,7 @@ namespace GSF.TimeSeries.Transport · 1268 unmodified lines
41234123 }
41244124
41254125 // Define operational modes as soon as possible
4126− SendServerCommand(ServerCommand.DefineOperationalModes, EndianOrder.BigEndian.GetBytes((uint)m_operationalModes));
4126+ SendServerCommand(ServerCommand.DefineOperationalModes, BigEndian.GetBytes((uint)m_operationalModes));
41274127
41284128 // Notify input adapter base that asynchronous connection succeeded
41294129 OnConnected();
Source/Libraries/GSF.TimeSeries/Transport/SerializableMeasurement.cs+18−16
@@ -29,6 +29,8 @@ using System; · 28 unmodified lines
2929 using System.Text;
3030 using GSF.Parsing;
3131
32+#pragma warning disable 618
33+
3234 namespace GSF.TimeSeries.Transport
3335 {
3436 /// <summary>
@@ -132,11 +134,11 @@ namespace GSF.TimeSeries.Transport · 97 unmodified lines
132134 string keySource = "";
133135
134136 // Decode key ID
135− keyID = EndianOrder.BigEndian.ToUInt32(buffer, index);
137+ keyID = BigEndian.ToUInt32(buffer, index);
136138 index += 4;
137139
138140 // Decode key source string length
139− size = EndianOrder.BigEndian.ToInt32(buffer, index);
141+ size = BigEndian.ToInt32(buffer, index);
140142 index += 4;
141143
142144 // Decode key source string
@@ -154,7 +156,7 @@ namespace GSF.TimeSeries.Transport · 11 unmodified lines
154156 Key = MeasurementKey.LookUpOrCreate(signalID, keySource, keyID);
155157
156158 // Decode tag name string length
157− size = EndianOrder.BigEndian.ToInt32(buffer, index);
159+ size = BigEndian.ToInt32(buffer, index);
158160 index += 4;
159161
160162 // Decode tag name string
@@ -167,23 +169,23 @@ namespace GSF.TimeSeries.Transport · 6 unmodified lines
167169 TagName = null;
168170
169171 // Decode value
170− Value = EndianOrder.BigEndian.ToDouble(buffer, index);
172+ Value = BigEndian.ToDouble(buffer, index);
171173 index += 8;
172174
173175 // Decode adder
174− Adder = EndianOrder.BigEndian.ToDouble(buffer, index);
176+ Adder = BigEndian.ToDouble(buffer, index);
175177 index += 8;
176178
177179 // Decode multiplier
178− Multiplier = EndianOrder.BigEndian.ToDouble(buffer, index);
180+ Multiplier = BigEndian.ToDouble(buffer, index);
179181 index += 8;
180182
181183 // Decode timestamp
182− Timestamp = EndianOrder.BigEndian.ToInt64(buffer, index);
184+ Timestamp = BigEndian.ToInt64(buffer, index);
183185 index += 8;
184186
185187 // Decode state flags
186− StateFlags = (MeasurementStateFlags)EndianOrder.BigEndian.ToUInt32(buffer, index);
188+ StateFlags = (MeasurementStateFlags)BigEndian.ToUInt32(buffer, index);
187189 index += 4;
188190
189191 return (index - startIndex);
@@ -233,13 +235,13 @@ namespace GSF.TimeSeries.Transport · 43 unmodified lines
233235 string tagName = TagName.ToNonNullString();
234236
235237 // Encode key ID
236− EndianOrder.BigEndian.CopyBytes(Key.ID, buffer, index);
238+ BigEndian.CopyBytes(Key.ID, buffer, index);
237239 index += 4;
238240
239241 // Encode key source string length
240242 bytes = m_encoding.GetBytes(source);
241243 size = bytes.Length;
242− EndianOrder.BigEndian.CopyBytes(size, buffer, index);
244+ BigEndian.CopyBytes(size, buffer, index);
243245 index += 4;
244246
245247 // Encode key source string
@@ -256,7 +258,7 @@ namespace GSF.TimeSeries.Transport · 10 unmodified lines
256258 // Encode tag name string length
257259 bytes = m_encoding.GetBytes(tagName);
258260 size = bytes.Length;
259− EndianOrder.BigEndian.CopyBytes(size, buffer, index);
261+ BigEndian.CopyBytes(size, buffer, index);
260262 index += 4;
261263
262264 // Encode tag name string
@@ -267,23 +269,23 @@ namespace GSF.TimeSeries.Transport · 4 unmodified lines
267269 }
268270
269271 // Encode value
270− EndianOrder.BigEndian.CopyBytes(Value, buffer, index);
272+ BigEndian.CopyBytes(Value, buffer, index);
271273 index += 8;
272274
273275 // Encode adder
274− EndianOrder.BigEndian.CopyBytes(Adder, buffer, index);
276+ BigEndian.CopyBytes(Adder, buffer, index);
275277 index += 8;
276278
277279 // Encode multiplier
278− EndianOrder.BigEndian.CopyBytes(Multiplier, buffer, index);
280+ BigEndian.CopyBytes(Multiplier, buffer, index);
279281 index += 8;
280282
281283 // Encode timestamp
282− EndianOrder.BigEndian.CopyBytes((long)Timestamp, buffer, index);
284+ BigEndian.CopyBytes((long)Timestamp, buffer, index);
283285 index += 8;
284286
285287 // Encode state flags
286− EndianOrder.BigEndian.CopyBytes((uint)StateFlags, buffer, index);
288+ BigEndian.CopyBytes((uint)StateFlags, buffer, index);
287289
288290 return length;
289291 }
Source/Libraries/GSF.TimeSeries/Transport/SignalIndexCache.cs+14−12
@@ -31,6 +31,8 @@ using System.Linq; · 30 unmodified lines
3131 using System.Text;
3232 using GSF.Parsing;
3333
34+#pragma warning disable 618
35+
3436 namespace GSF.TimeSeries.Transport
3537 {
3638 /// <summary>
@@ -281,7 +283,7 @@ namespace GSF.TimeSeries.Transport · 244 unmodified lines
281283 buffer.ValidateParameters(startIndex, binaryLength);
282284
283285 // Byte size of cache
284− bigEndianBuffer = EndianOrder.BigEndian.GetBytes(binaryLength);
286+ bigEndianBuffer = BigEndian.GetBytes(binaryLength);
285287 Buffer.BlockCopy(bigEndianBuffer, 0, buffer, offset, bigEndianBuffer.Length);
286288 offset += bigEndianBuffer.Length;
287289
@@ -291,14 +293,14 @@ namespace GSF.TimeSeries.Transport · 3 unmodified lines
291293 offset += bigEndianBuffer.Length;
292294
293295 // Number of references
294− bigEndianBuffer = EndianOrder.BigEndian.GetBytes(m_reference.Count);
296+ bigEndianBuffer = BigEndian.GetBytes(m_reference.Count);
295297 Buffer.BlockCopy(bigEndianBuffer, 0, buffer, offset, bigEndianBuffer.Length);
296298 offset += bigEndianBuffer.Length;
297299
298300 foreach (KeyValuePair<ushort, Tuple<Guid, string, uint>> kvp in m_reference)
299301 {
300302 // Signal index
301− bigEndianBuffer = EndianOrder.BigEndian.GetBytes(kvp.Key);
303+ bigEndianBuffer = BigEndian.GetBytes(kvp.Key);
302304 Buffer.BlockCopy(bigEndianBuffer, 0, buffer, offset, bigEndianBuffer.Length);
303305 offset += bigEndianBuffer.Length;
304306
@@ -309,20 +311,20 @@ namespace GSF.TimeSeries.Transport · 4 unmodified lines
309311
310312 // Source
311313 unicodeBuffer = m_encoding.GetBytes(kvp.Value.Item2);
312− bigEndianBuffer = EndianOrder.BigEndian.GetBytes(unicodeBuffer.Length);
314+ bigEndianBuffer = BigEndian.GetBytes(unicodeBuffer.Length);
313315 Buffer.BlockCopy(bigEndianBuffer, 0, buffer, offset, bigEndianBuffer.Length);
314316 offset += bigEndianBuffer.Length;
315317 Buffer.BlockCopy(unicodeBuffer, 0, buffer, offset, unicodeBuffer.Length);
316318 offset += unicodeBuffer.Length;
317319
318320 // ID
319− bigEndianBuffer = EndianOrder.BigEndian.GetBytes(kvp.Value.Item3);
321+ bigEndianBuffer = BigEndian.GetBytes(kvp.Value.Item3);
320322 Buffer.BlockCopy(bigEndianBuffer, 0, buffer, offset, bigEndianBuffer.Length);
321323 offset += bigEndianBuffer.Length;
322324 }
323325
324326 // Number of unauthorized IDs
325− bigEndianBuffer = EndianOrder.BigEndian.GetBytes(unauthorizedSignalIDs.Length);
327+ bigEndianBuffer = BigEndian.GetBytes(unauthorizedSignalIDs.Length);
326328 Buffer.BlockCopy(bigEndianBuffer, 0, buffer, offset, bigEndianBuffer.Length);
327329 offset += bigEndianBuffer.Length;
328330
@@ -367,7 +369,7 @@ namespace GSF.TimeSeries.Transport · 38 unmodified lines
367369 return 0;
368370
369371 // Byte size of cache
370− binaryLength = EndianOrder.BigEndian.ToInt32(buffer, offset);
372+ binaryLength = BigEndian.ToInt32(buffer, offset);
371373 offset += 4;
372374
373375 if (length < binaryLength)
@@ -381,13 +383,13 @@ namespace GSF.TimeSeries.Transport · 7 unmodified lines
381383 offset += 16;
382384
383385 // Number of references
384− referenceCount = EndianOrder.BigEndian.ToInt32(buffer, offset);
386+ referenceCount = BigEndian.ToInt32(buffer, offset);
385387 offset += 4;
386388
387389 for (int i = 0; i < referenceCount; i++)
388390 {
389391 // Signal index
390− signalIndex = EndianOrder.BigEndian.ToUInt16(buffer, offset);
392+ signalIndex = BigEndian.ToUInt16(buffer, offset);
391393 offset += 2;
392394
393395 // Signal ID
@@ -395,20 +397,20 @@ namespace GSF.TimeSeries.Transport · 1 unmodified line
395397 offset += 16;
396398
397399 // Source
398− sourceSize = EndianOrder.BigEndian.ToInt32(buffer, offset);
400+ sourceSize = BigEndian.ToInt32(buffer, offset);
399401 offset += 4;
400402 source = m_encoding.GetString(buffer, offset, sourceSize);
401403 offset += sourceSize;
402404
403405 // ID
404− id = EndianOrder.BigEndian.ToUInt32(buffer, offset);
406+ id = BigEndian.ToUInt32(buffer, offset);
405407 offset += 4;
406408
407409 m_reference[signalIndex] = new Tuple<Guid, string, uint>(signalID, source, id);
408410 }
409411
410412 // Number of unauthorized IDs
411− unauthorizedIDCount = EndianOrder.BigEndian.ToInt32(buffer, offset);
413+ unauthorizedIDCount = BigEndian.ToInt32(buffer, offset);
412414 m_unauthorizedSignalIDs = new Guid[unauthorizedIDCount];
413415 offset += 4;
414416
Source/Libraries/GSF.TimeSeries/Transport/SynchronizedClientSubscription.cs+3−3
@@ -552,7 +552,7 @@ namespace GSF.TimeSeries.Transport · 551 unmodified lines
552552 bufferBlock = new byte[4 + bufferBlockMeasurement.Length];
553553
554554 // Prepend sequence number
555− EndianOrder.BigEndian.CopyBytes(m_bufferBlockSequenceNumber, bufferBlock, 0);
555+ BigEndian.CopyBytes(m_bufferBlockSequenceNumber, bufferBlock, 0);
556556 m_bufferBlockSequenceNumber++;
557557
558558 // Append measurement data and send
@@ -618,10 +618,10 @@ namespace GSF.TimeSeries.Transport · 59 unmodified lines
618618
619619 // Serialize frame timestamp into data packet - this only occurs in synchronized data packets,
620620 // unsynchronized subscriptions always include timestamps in the serialized measurements
621− m_workingBuffer.Write(EndianOrder.BigEndian.GetBytes(frameLevelTimestamp), 0, 8);
621+ m_workingBuffer.Write(BigEndian.GetBytes(frameLevelTimestamp), 0, 8);
622622
623623 // Serialize total number of measurement values to follow
624− m_workingBuffer.Write(EndianOrder.BigEndian.GetBytes(measurements.Count()), 0, 4);
624+ m_workingBuffer.Write(BigEndian.GetBytes(measurements.Count()), 0, 4);
625625
626626 // Attempt compression when requested - encoding of compressed buffer only happens if size would be smaller than normal serialization
627627 if (!usePayloadCompression || !measurements.Cast<CompactMeasurement>().CompressPayload(m_workingBuffer, m_compressionStrength, false, ref flags))
Source/Libraries/GSF.TimeSeries/Transport/UnsynchronizedClientSubscription.cs+6−6
@@ -686,12 +686,12 @@ namespace GSF.TimeSeries.Transport · 685 unmodified lines
686686 bufferBlock = new byte[6 + bufferBlockMeasurement.Length];
687687
688688 // Prepend sequence number
689− EndianOrder.BigEndian.CopyBytes(m_bufferBlockSequenceNumber, bufferBlock, 0);
689+ BigEndian.CopyBytes(m_bufferBlockSequenceNumber, bufferBlock, 0);
690690 m_bufferBlockSequenceNumber++;
691691
692692 // Copy signal index into buffer
693693 bufferBlockSignalIndex = m_signalIndexCache.GetSignalIndex(bufferBlockMeasurement.ID);
694− EndianOrder.BigEndian.CopyBytes(bufferBlockSignalIndex, bufferBlock, 4);
694+ BigEndian.CopyBytes(bufferBlockSignalIndex, bufferBlock, 4);
695695
696696 // Append measurement data and send
697697 Buffer.BlockCopy(bufferBlockMeasurement.Buffer, 0, bufferBlock, 6, bufferBlockMeasurement.Length);
@@ -765,7 +765,7 @@ namespace GSF.TimeSeries.Transport · 67 unmodified lines
765765 // published upon receipt, however timestamps are optionally included in the serialized measurements.
766766
767767 // Serialize total number of measurement values to follow
768− m_workingBuffer.Write(EndianOrder.BigEndian.GetBytes(measurements.Count()), 0, 4);
768+ m_workingBuffer.Write(BigEndian.GetBytes(measurements.Count()), 0, 4);
769769
770770 // Attempt compression when requested - encoding of compressed buffer only happens if size would be smaller than normal serialization
771771 if (!usePayloadCompression || !measurements.Cast<CompactMeasurement>().CompressPayload(m_workingBuffer, m_compressionStrength, m_includeTime, ref flags))
@@ -838,9 +838,9 @@ namespace GSF.TimeSeries.Transport · 66 unmodified lines
838838 // to maintaining this memory stream at a member level
839839 using (BlockAllocatedMemoryStream responsePacket = new BlockAllocatedMemoryStream())
840840 {
841− responsePacket.Write(EndianOrder.BigEndian.GetBytes(m_timeIndex), 0, 4);
842− responsePacket.Write(EndianOrder.BigEndian.GetBytes(m_baseTimeOffsets[0]), 0, 8);
843− responsePacket.Write(EndianOrder.BigEndian.GetBytes(m_baseTimeOffsets[1]), 0, 8);
841+ responsePacket.Write(BigEndian.GetBytes(m_timeIndex), 0, 4);
842+ responsePacket.Write(BigEndian.GetBytes(m_baseTimeOffsets[0]), 0, 8);
843+ responsePacket.Write(BigEndian.GetBytes(m_baseTimeOffsets[1]), 0, 8);
844844
845845 m_parent.SendClientResponse(m_clientID, ServerResponse.UpdateBaseTimes, ServerCommand.Subscribe, responsePacket.ToArray());
846846 }
Source/Libraries/GSF.TimeSeries/UI/CommonFunctions.cs+1−1
@@ -434,7 +434,7 @@ namespace GSF.TimeSeries.UI · 433 unmodified lines
434434 /// <returns><see cref="DBNull"/> if <paramref name="value"/> is <c>null</c>; otherwise <paramref name="value"/>.</returns>
435435 public static object ToNotNull(this object value)
436436 {
437− if (value == null)
437+ if ((object)value == null)
438438 return (object)DBNull.Value;
439439
440440 if (value is int && (int)value == 0)
Source/Libraries/GSF.TimeSeries/UI/Converters/DictionaryToKeyValuePairConverter.cs+2−2
@@ -105,7 +105,7 @@ namespace GSF.TimeSeries.UI.Converters · 104 unmodified lines
105105 {
106106 Dictionary<Type, string> collection = (Dictionary<Type, string>)viewSource.Source;
107107
108− if (value != null)
108+ if ((object)value != null)
109109 {
110110 KeyValuePair<Type, string> item = collection.ToList().SingleOrDefault(pair => pair.Key.FullName == value.ToString());
111111
@@ -128,7 +128,7 @@ namespace GSF.TimeSeries.UI.Converters · 16 unmodified lines
128128 /// <returns>Integer, to bind to UI object.</returns>
129129 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
130130 {
131− if (value != null)
131+ if ((object)value != null)
132132 {
133133 if (value is KeyValuePair<int, string>)
134134 return ((KeyValuePair<int, string>)value).Key == 0 ? (object)DBNull.Value : ((KeyValuePair<int, string>)value).Key;
Source/Libraries/GSF.TimeSeries/UI/Converters/IndexToBooleanConverter.cs+3−3
@@ -44,11 +44,11 @@ namespace GSF.TimeSeries.UI.Converters · 43 unmodified lines
4444 /// <returns>Boolean value.</returns>
4545 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
4646 {
47− if (value != null)
47+ if ((object)value != null)
4848 {
49− int temp = (int) value;
49+ int temp = (int)value;
5050 if (temp > 0)
51− return false;
51+ return false;
5252 else
5353 return true;
5454 }
Source/Libraries/GSF.TimeSeries/UI/Converters/ObjectToVisibilityConverter.cs+1−1
@@ -47,7 +47,7 @@ namespace GSF.TimeSeries.UI.Converters · 46 unmodified lines
4747 /// <returns><see cref="System.Windows.Visibility"/> enumeration.</returns>
4848 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
4949 {
50− if (value != null)
50+ if ((object)value != null)
5151 {
5252 // if value is int, then if it is greater than zero then, set it to true otherwise false.
5353 // Once we set value to boolean instead of integer, next code will take care of visibility.
Source/Libraries/GSF.TimeSeries/UI/Converters/RoleBasedVisibilityConverter.cs+2−2
@@ -46,10 +46,10 @@ namespace GSF.TimeSeries.UI.Converters · 45 unmodified lines
4646 /// <param name="targetType">The type of the binding target property.</param>
4747 /// <param name="parameter">The converter parameter to use.</param>
4848 /// <param name="culture">The culture to use in the converter.</param>
49− /// <returns>One of the visibility enummeration</returns>
49+ /// <returns>One of the visibility enumeration</returns>
5050 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
5151 {
52− if (value == null || string.IsNullOrEmpty(value.ToString()) || value.ToString() == "*" || CommonFunctions.CurrentPrincipal.IsInRole(value.ToString()))
52+ if ((object)value == null || string.IsNullOrEmpty(value.ToString()) || value.ToString() == "*" || CommonFunctions.CurrentPrincipal.IsInRole(value.ToString()))
5353 return Visibility.Visible;
5454 else
5555 return Visibility.Collapsed;
Source/Libraries/GSF.TimeSeries/UI/Converters/StringToBooleanConverter.cs+1−1
@@ -46,7 +46,7 @@ namespace GSF.TimeSeries.UI.Converters · 45 unmodified lines
4646 /// <returns>Boolean value.</returns>
4747 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
4848 {
49− if (value != null)
49+ if ((object)value != null)
5050 {
5151 string temp = value.ToString().ToUpper();
5252 if (temp == "TRUE" || temp == "1" || temp == "IPHA" || temp == "IPHM" || temp == "VPHA" || temp == "VPHM" || temp == "FREQ")
Source/Libraries/GSF.TimeSeries/UI/Converters/StringToStatusColorConverter.cs+1−1
@@ -51,7 +51,7 @@ namespace GSF.TimeSeries.UI.Converters · 50 unmodified lines
5151 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
5252 {
5353 string input = string.Empty;
54− if (value != null)
54+ if ((object)value != null)
5555 input = value.ToString().ToLower();
5656
5757 switch (input)
Source/Libraries/GSF.TimeSeries/UI/DataModels/Measurement.cs+1−1
@@ -188,7 +188,7 @@ namespace GSF.TimeSeries.UI.DataModels · 187 unmodified lines
188188 }
189189 set
190190 {
191− if (value != null && value.Length > 200)
191+ if ((object)value != null && value.Length > 200)
192192 m_pointTag = value.Substring(0, 200);
193193 else
194194 m_pointTag = value;
Source/Libraries/GSF.Web/Embedded/SecurityPortal.aspx.cs+1−1
@@ -179,7 +179,7 @@ namespace GSF.Web.Embedded · 178 unmodified lines
179179 // Show reset password.
180180 Page.Title = StaticPageTitle + " :: Reset Password";
181181
182− if (ViewState[UsernameKey] == null)
182+ if ((object)ViewState[UsernameKey] == null)
183183 {
184184 // Check for reset support.
185185 ResetPasswordCheckPanel.Visible = true;
Source/Libraries/GSF.Windows/Forms/AboutDialog.cs+1−1
@@ -221,7 +221,7 @@ namespace GSF.Windows.Forms · 220 unmodified lines
221221 //AddListViewItem(ListViewApplicationInfo, "Trademark", AssemblyInfo.EntryAssembly.Trademark);
222222
223223 // Query all the assemblies used by the calling application.
224− if (m_assemblies == null)
224+ if ((object)m_assemblies == null)
225225 {
226226 m_assemblies = new List<AssemblyInfo>();
227227 foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
Source/Libraries/GSF.Windows/Forms/SecureForm.cs+1−1
@@ -119,7 +119,7 @@ namespace GSF.Windows.Forms · 118 unmodified lines
119119 Thread.CurrentPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
120120
121121 // Setup the security provider for role-based security.
122− if (SecurityProviderCache.CurrentProvider == null)
122+ if ((object)SecurityProviderCache.CurrentProvider == null)
123123 SecurityProviderCache.CurrentProvider = SecurityProviderUtility.CreateProvider(string.Empty);
124124
125125 // Verify that the current thread principal has been authenticated.
Source/Libraries/Hadoop.Replication/HadoopReplicationProvider.cs+1−1
@@ -604,7 +604,7 @@ namespace Hadoop.Replication · 603 unmodified lines
604604 while ((bytesRead = fileStream.Read(readBuffer, 0, readBuffer.Length)) != 0)
605605 {
606606 // Read "bytesPerCrc32" bytes from the file and compute CRC32.
607− blockCRC = EndianOrder.BigEndian.GetBytes(readBuffer.Crc32Checksum(0, bytesRead));
607+ blockCRC = BigEndian.GetBytes(readBuffer.Crc32Checksum(0, bytesRead));
608608 // Add big-endian byte array of the computed CRC32 to CRC32 buffer.
609609 blockCRCs.AddRange(blockCRC);
610610 // Stop reading and compute block MD5 hash when a HDFS block data has been processed.
Source/Libraries/Tests/GSF.Core.Tests/EndianOrderTest.cs+3−0
@@ -36,6 +36,9 @@ namespace GSF.Core.Tests · 35 unmodified lines
3636 {
3737 #region [ Byte Swap/Copy Only Endian Order Testing Classes ]
3838
39+ // These classes represent a brute-force approach to Endian order handling
40+ // that are used as a base-line for testing other optimized approaches
41+
3942 /// <summary>
4043 /// Represents a big-endian byte order interoperability class.
4144 /// </summary>
Source/Libraries/Tests/GSF.Core.Tests/GuidExtensionsTest.cs+2−1
@@ -25,9 +25,10 @@ · 24 unmodified lines
2525 using System;
2626 using System.Linq;
2727 using System.Text;
28−using System.Web.ModelBinding;
2928 using Microsoft.VisualStudio.TestTools.UnitTesting;
3029
30+#pragma warning disable 618
31+
3132 namespace GSF.Core.Tests
3233 {
3334 [TestClass]

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