Skip to content
Browse files

checked in latest libs

  • Loading branch information...
1 parent c80abb2 commit 1eb79878120b30c8538d6a70ed1d2e5b4d04502c @mythz mythz committed
View
BIN build/ServiceStack.ServiceInterface.dll
Binary file not shown.
View
BIN build/ServiceStack.dll
Binary file not shown.
View
BIN lib/ServiceStack.CacheAccess.Memcached.dll
Binary file not shown.
View
BIN lib/ServiceStack.Logging.Log4Net.dll
Binary file not shown.
View
BIN lib/ServiceStack.Logging.dll
Binary file not shown.
View
BIN lib/ServiceStack.Logging.pdb
Binary file not shown.
View
BIN lib/ServiceStack.Memcached.dll
Binary file not shown.
View
BIN lib/ServiceStack.Messaging.dll
Binary file not shown.
View
BIN lib/ServiceStack.Messaging.pdb
Binary file not shown.
View
BIN lib/ServiceStack.OrmLite.Sqlite.dll
Binary file not shown.
View
BIN lib/ServiceStack.OrmLite.dll
Binary file not shown.
View
BIN lib/ServiceStack.OrmLite.pdb
Binary file not shown.
View
BIN lib/tests/ServiceStack.OrmLite.Sqlite.dll
Binary file not shown.
View
BIN lib/tests/ServiceStack.OrmLite.dll
Binary file not shown.
View
BIN lib/tests/ServiceStack.Redis.dll
Binary file not shown.
View
2 src/ServiceStack.CacheAccess.Providers/ServiceStack.CacheAccess.Providers.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3F22FE6E-7E15-4561-8BC7-2CABF37B46CE}</ProjectGuid>
<OutputType>Library</OutputType>
View
2 src/ServiceStack.Common/Extensions/EnumerableExtensions.cs
@@ -103,7 +103,7 @@ public static bool EquivalentTo<T>(this IEnumerable<T> thisList, IEnumerable<T>
if (!otherEnum.MoveNext()) return false;
var thisIsDefault = Equals(item, default(T));
- var otherIsDefault = Equals(item, default(T));
+ var otherIsDefault = Equals(otherEnum.Current, default(T));
if (thisIsDefault || otherIsDefault)
{
return thisIsDefault && otherIsDefault;
View
31 src/ServiceStack.ServiceModel/XLinqExtensions.cs
@@ -23,6 +23,12 @@ public static string GetString(this XElement el, string name)
return el == null ? null : GetElementValueOrDefault(el, name, x => x.Value);
}
+ public static string GetStringAttributeOrDefault(this XElement element, string name)
+ {
+ var attr = AnyAttribute(element, name);
+ return attr == null ? null : GetAttributeValueOrDefault(attr, name, x => x.Value);
+ }
+
public static bool GetBool(this XElement el, string name)
{
AssertElementHasValue(el, name);
@@ -48,13 +54,13 @@ public static int GetInt(this XElement el, string name)
public static int GetIntOrDefault(this XElement el, string name)
{
- return GetElementValueOrDefault(el, name, x => (int) x);
+ return GetElementValueOrDefault(el, name, x => (int)x);
}
public static int? GetNullableInt(this XElement el, string name)
{
var childEl = GetElement(el, name);
- return childEl == null || string.IsNullOrEmpty(childEl.Value) ? null : (int?) childEl;
+ return childEl == null || string.IsNullOrEmpty(childEl.Value) ? null : (int?)childEl;
}
public static long GetLong(this XElement el, string name)
@@ -165,6 +171,25 @@ public static XElement GetElement(this XElement element, string name)
return element.AnyElement(name);
}
+ public static T GetAttributeValueOrDefault<T>(this XAttribute attr, string name, Func<XAttribute, T> converter)
+ {
+ if (converter == null)
+ {
+ throw new ArgumentNullException("converter");
+ }
+ return attr == null || string.IsNullOrEmpty(attr.Value) ? default(T) : converter(attr);
+ }
+
+ public static void AssertExactlyOneResult(this XElement queryListItems, string referenceNumber, string formType)
+ {
+ int count = Convert.ToInt32(queryListItems.AnyAttribute("ItemCount").Value);
+ if (count == 0)
+ throw new InvalidOperationException(string.Format("There is no {0} for with a deal reference number {1}", formType, referenceNumber));
+ if (count > 1)
+ throw new InvalidOperationException(
+ string.Format("There are more than one {0}s with deal reference number {1}", formType, referenceNumber));
+ }
+
public static void AssertElementHasValue(this XElement element, string name)
{
if (element == null)
@@ -262,7 +287,7 @@ public static XElement FirstElement(this XElement element)
{
if (element.FirstNode.NodeType == XmlNodeType.Element)
{
- return (XElement) element.FirstNode;
+ return (XElement)element.FirstNode;
}
return null;
}
View
15 tests/ServiceStack.Common.Tests/EnumerableExtensionsTests.cs
@@ -15,6 +15,9 @@ public class EnumerableExtensionsTests
readonly int[] LessIntValues = new[] { 1, 2 };
readonly int[] UnorderedIntValues = new[] { 3, 2, 1 };
+ readonly string[] StringValues = new[] { "A", "B", "C" };
+ readonly string[] NoStringValues = new string[] { };
+
[Test]
public void Can_Join()
{
@@ -69,5 +72,17 @@ public void Not_EquivalentTo_null()
Assert.That(IntValues.EquivalentTo(null), Is.False);
}
+ [Test]
+ public void EquivalentTo_StringValues()
+ {
+ Assert.That(StringValues.EquivalentTo(NoStringValues), Is.False);
+ Assert.That(NoStringValues.EquivalentTo(StringValues), Is.False);
+ Assert.That(NoStringValues.EquivalentTo(NoStringValues), Is.True);
+ Assert.That(StringValues.EquivalentTo(StringValues), Is.True);
+
+ Assert.That(StringValues.EquivalentTo(new string[] { null }), Is.False);
+ Assert.That(new string[] { null }.EquivalentTo(StringValues), Is.False);
+ }
+
}
}
View
2 tests/ServiceStack.WebHost.IntegrationTests/Web.config
@@ -59,7 +59,7 @@
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
-
+
<add path="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack.WebHost.Endpoints" verb="*"/>
</httpHandlers>
<httpModules>

0 comments on commit 1eb7987

Please sign in to comment.
Something went wrong with that request. Please try again.