History

Initial check-in of Unix based GSF.Identity.UserInfo (not tested)

ritchiecarroll committed 12 years ago

Commit 4e2d2361 parent 85f1ce230 files · +4691 −1446Browse files

Showing the changes to Source/Libraries/GSF.Core/ArrayExtensions.cs (1 of 30 files). Show all

Unified · Split

Source/Libraries/GSF.Core/ArrayExtensions.cs+2−2
@@ -717,7 +717,7 @@ namespace GSF · 716 unmodified lines
717717 /// <param name="bytes">Bytes containing structure.</param>
718718 /// <returns>A structure from <paramref name="bytes"/>.</returns>
719719 [MethodImpl(MethodImplOptions.AggressiveInlining)]
720− public unsafe static T ReadStructure<T>(this byte[] bytes)
720+ public unsafe static T ReadStructure<T>(this byte[] bytes) where T : struct
721721 {
722722 T structure;
723723
@@ -736,7 +736,7 @@ namespace GSF · 12 unmodified lines
736736 /// <param name="reader"><see cref="BinaryReader"/> positioned at desired structure.</param>
737737 /// <returns>A structure read from <see cref="BinaryReader"/>.</returns>
738738 [MethodImpl(MethodImplOptions.AggressiveInlining)]
739− public static T ReadStructure<T>(this BinaryReader reader)
739+ public static T ReadStructure<T>(this BinaryReader reader) where T : struct
740740 {
741741 return reader.ReadBytes(Marshal.SizeOf(typeof(T))).ReadStructure<T>();
742742 }

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