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

Commit 4b7f189

Browse files
committed
Remove dependency on ServiceStack.Client.dll.
1 parent 7805964 commit 4b7f189

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/ServiceStack.OrmLite.Oracle/OracleExecFilter.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private static Action<IDbCommand, bool> GetBindByNameSetter(Type commandType)
3131
if (prop != null && prop.CanWrite && prop.PropertyType == typeof(bool)
3232
&& prop.GetIndexParameters().Length == 0 && (setter = prop.GetSetMethod()) != null)
3333
{
34-
var methodName = commandType.GetOperationName() + "_BindByName";
34+
var methodName = GetOperationName(commandType) + "_BindByName";
3535
var method = new DynamicMethod(methodName, null, new []{ typeof(IDbCommand), typeof(bool) });
3636
var il = method.GetILGenerator();
3737
il.Emit(OpCodes.Ldarg_0);
@@ -44,5 +44,12 @@ private static Action<IDbCommand, bool> GetBindByNameSetter(Type commandType)
4444
Cache.Add(commandType, action);
4545
return action;
4646
}
47+
48+
private static string GetOperationName(Type type)
49+
{
50+
return type.FullName != null //can be null, e.g. generic types
51+
? type.FullName.Replace(type.Namespace + ".", "").Replace("+", ".")
52+
: type.Name;
53+
}
4754
}
4855
}

src/ServiceStack.OrmLite.Oracle/ServiceStack.OrmLite.Oracle.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4242
</PropertyGroup>
4343
<ItemGroup>
44-
<Reference Include="ServiceStack.Client">
45-
<HintPath>..\..\lib\ServiceStack.Client.dll</HintPath>
46-
</Reference>
4744
<Reference Include="ServiceStack.Text">
4845
<HintPath>..\..\lib\ServiceStack.Text.dll</HintPath>
4946
</Reference>

0 commit comments

Comments
 (0)