Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit dc09f6b

Browse files
committed
Initial int to long conversion work
ServiceStack library and methods have been updated to use longs where appropriate. Also added one failing test that should work with successful long conversion. Test code still needs to be updated.
1 parent 6cdbf5f commit dc09f6b

29 files changed

+179
-182
lines changed

lib/ServiceStack.Common.dll

1 KB
Binary file not shown.

lib/ServiceStack.Interfaces.dll

0 Bytes
Binary file not shown.

lib/ServiceStack.Text.dll

1.5 KB
Binary file not shown.

src/ServiceStack.Redis/BasicRedisClientManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public partial class BasicRedisClientManager
3636

3737
public IRedisClientFactory RedisClientFactory { get; set; }
3838

39-
public int Db { get; private set; }
39+
public long Db { get; private set; }
4040

4141
public Action<IRedisNativeClient> ConnectionFilter { get; set; }
4242

src/ServiceStack.Redis/Generic/ManagedListGeneric.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private List<T> GetRedisList()
3030
return client.Lists[key].ToList();
3131
}
3232
}
33-
public int IndexOf(T item)
33+
public int IndexOf(T item)
3434
{
3535
return GetRedisList().IndexOf(item);
3636
}
@@ -93,7 +93,7 @@ public void CopyTo(T[] array, int arrayIndex)
9393
GetRedisList().CopyTo(array, arrayIndex);
9494
}
9595

96-
public int Count
96+
public int Count
9797
{
9898
get { return GetRedisList().Count(); }
9999
}

src/ServiceStack.Redis/Generic/RedisClientHash.Generic.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public bool Remove(KeyValuePair<TKey, T> item)
8686

8787
public int Count
8888
{
89-
get { return client.GetHashCount(this); }
89+
get { return (int)client.GetHashCount(this); }
9090
}
9191

9292
public bool IsReadOnly

src/ServiceStack.Redis/Generic/RedisClientList.Generic.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public int Count
103103
{
104104
get
105105
{
106-
return client.GetListCount(this);
106+
return (int)client.GetListCount(this);
107107
}
108108
}
109109

@@ -167,12 +167,12 @@ public void Trim(int keepStartingFrom, int keepEndingAt)
167167
client.TrimList(this, keepStartingFrom, keepEndingAt);
168168
}
169169

170-
public int RemoveValue(T value)
170+
public long RemoveValue(T value)
171171
{
172172
return client.RemoveItemFromList(this, value);
173173
}
174174

175-
public int RemoveValue(T value, int noOfMatches)
175+
public long RemoveValue(T value, int noOfMatches)
176176
{
177177
return client.RemoveItemFromList(this, value, noOfMatches);
178178
}

src/ServiceStack.Redis/Generic/RedisClientSet.Generic.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public int Count
9595
{
9696
get
9797
{
98-
var setCount = client.GetSetCount(this);
98+
var setCount = (int)client.GetSetCount(this);
9999
return setCount;
100100
}
101101
}

src/ServiceStack.Redis/Generic/RedisClientSortedSet.Generic.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public int Count
100100
{
101101
get
102102
{
103-
var setCount = client.GetSortedSetCount(this);
103+
var setCount = (int)client.GetSortedSetCount(this);
104104
return setCount;
105105
}
106106
}
@@ -124,10 +124,10 @@ public double IncrementItem(T item, double incrementBy)
124124

125125
public int IndexOf(T item)
126126
{
127-
return client.GetItemIndexInSortedSet(this, item);
127+
return (int)client.GetItemIndexInSortedSet(this, item);
128128
}
129129

130-
public int IndexOfDescending(T item)
130+
public long IndexOfDescending(T item)
131131
{
132132
return client.GetItemIndexInSortedSetDesc(this, item);
133133
}
@@ -167,12 +167,12 @@ public List<T> GetRangeByHighestScore(double fromScore, double toScore, int? ski
167167
return client.GetRangeFromSortedSetByHighestScore(this, fromScore, toScore, skip, take);
168168
}
169169

170-
public int RemoveRange(int minRank, int maxRank)
170+
public long RemoveRange(int minRank, int maxRank)
171171
{
172172
return client.RemoveRangeFromSortedSet(this, minRank, maxRank);
173173
}
174174

175-
public int RemoveRangeByScore(double fromScore, double toScore)
175+
public long RemoveRangeByScore(double fromScore, double toScore)
176176
{
177177
return client.RemoveRangeFromSortedSetByScore(this, fromScore, toScore);
178178
}
@@ -182,12 +182,12 @@ public double GetItemScore(T item)
182182
return client.GetItemScoreInSortedSet(this, item);
183183
}
184184

185-
public int PopulateWithIntersectOf(params IRedisSortedSet<T>[] setIds)
185+
public long PopulateWithIntersectOf(params IRedisSortedSet<T>[] setIds)
186186
{
187187
return client.StoreIntersectFromSortedSets(this, setIds);
188188
}
189189

190-
public int PopulateWithUnionOf(params IRedisSortedSet<T>[] setIds)
190+
public long PopulateWithUnionOf(params IRedisSortedSet<T>[] setIds)
191191
{
192192
return client.StoreUnionFromSortedSets(this, setIds);
193193
}

src/ServiceStack.Redis/Generic/RedisTypedClient_App.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public List<TChild> GetRelatedEntities<TChild>(object parentId)
5757
}
5858
}
5959

60-
public int GetRelatedEntitiesCount<TChild>(object parentId)
60+
public long GetRelatedEntitiesCount<TChild>(object parentId)
6161
{
6262
var childRefKey = GetChildReferenceSetKey<TChild>(parentId);
6363
return client.GetSetCount(childRefKey);

0 commit comments

Comments
 (0)