diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-05 10:58:56 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-05 10:58:56 +0100 |
| commit | 96bd9ab0c3f03018f90551e685d896bf1743fd36 (patch) | |
| tree | 4e897d32719ff02c626000c1ee68f971be062e02 /src/GraphicObjects | |
| parent | 2d20e043e62bd075b3f5f6c4e4bedb2ab7d910f8 (diff) | |
use StringComparison.Ordinal for dyn updates in bindings
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index b9b142c0..f32ac30e 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -913,6 +913,9 @@ namespace Crow } resolved.Add (b); } + + MethodInfo stringEquals = typeof(string).GetMethod + ("Compare", new Type[3] {typeof(string), typeof(string), typeof(StringComparison)}); //group;only one dynMethods by target (valuechanged event source) //changed value name tested in switch IEnumerable<Binding[]> groupedByTarget = resolved.GroupBy (g => g.Target.Instance, g => g, (k, g) => g.ToArray ()); @@ -924,10 +927,6 @@ namespace Crow DynamicMethod dm = null; ILGenerator il = null; - MethodInfo stringEquals = typeof(string).GetMethod - ("op_Equality", new Type[2] {typeof(string), typeof(string)}); - - System.Reflection.Emit.Label[] jumpTable = null; System.Reflection.Emit.Label endMethod = new System.Reflection.Emit.Label(); @@ -1018,8 +1017,9 @@ namespace Crow il.Emit (OpCodes.Ldstr, b.Target.Member.Name); else il.Emit (OpCodes.Ldstr, b.Expression.Split('/').LastOrDefault()); + il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal il.Emit (OpCodes.Callvirt, stringEquals); - il.Emit (OpCodes.Brtrue, jumpTable[i]); + il.Emit (OpCodes.Brfalse, jumpTable[i]); i++; } |