Skip to content

Commit

Permalink
Fixed fxcop issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Mar 24, 2013
1 parent 8455dec commit 4262703
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ namespace Microsoft.AspNet.SignalR.Messaging
public sealed class ScaleoutStore
{
private const uint _minFragmentCount = 4;

[SuppressMessage("Microsoft.Performance", "CA1802:UseLiteralsWhereAppropriate", Justification = "It's conditional based on architecture")]
private static readonly uint _maxFragmentSize = (IntPtr.Size == 4) ? (uint)16384 : (uint)8192; // guarantees that fragments never end up in the LOH

private static readonly ArraySegment<ScaleoutMapping> _emptyArraySegment = new ArraySegment<ScaleoutMapping>(new ScaleoutMapping[0]);

private Fragment[] _fragments;
Expand Down Expand Up @@ -203,7 +206,7 @@ public MessageStoreResult<ScaleoutMapping> GetMessages(ulong firstMessageIdReque
if (tailFragment.FragmentNum < fragmentNum)
{
firstMessageIdInThisFragment = GetMessageId(tailFragment.FragmentNum, offset: 0);

return new MessageStoreResult<ScaleoutMapping>(firstMessageIdInThisFragment, new ArraySegment<ScaleoutMapping>(tailFragment.Data, 0, tailFragment.Length), hasMoreData: true);
}
nextFreeMessageId = (ulong)Volatile.Read(ref _nextFreeMessageId);
Expand Down

0 comments on commit 4262703

Please sign in to comment.