File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Griddly/Views/Shared/Griddly Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 15
15
//
16
16
// You can specify all the values or you can default the Revision and Build Numbers
17
17
// by using the '*' as shown below:
18
- [ assembly: AssemblyVersion ( "3.7.1 " ) ]
19
- [ assembly: AssemblyFileVersion ( "3.7.1 " ) ]
18
+ [ assembly: AssemblyVersion ( "3.7.2 " ) ]
19
+ [ assembly: AssemblyFileVersion ( "3.7.2 " ) ]
20
20
//[assembly: AssemblyInformationalVersion("2.5-filters")]
Original file line number Diff line number Diff line change 120
120
121
121
if (param != null )
122
122
{
123
- // TODO: perhaps use hashset for performance or a scrambled equals algo?
124
- // https://stackoverflow.com/a/3670008/65611
125
- // https://stackoverflow.com/a/3670089/65611
126
- return Griddly .Mvc .GriddlyExtensions .GetFormattedValueByType (x .Value )? .OrderBy (y => y ).SequenceEqual (Griddly .Mvc .GriddlyExtensions .GetFormattedValueByType (param ).OrderBy (y => y )) ?? false ;
123
+ // se hashset for performance https://stackoverflow.com/a/3670008/65611
124
+ // if duplicate values are desirable (I can't think of why) we can switch to a a scrambled equals: https://stackoverflow.com/a/3670089/65611
125
+ // return Griddly.Mvc.GriddlyExtensions.GetFormattedValueByType(x.Value)?.OrderBy(y => y).SequenceEqual(Griddly.Mvc.GriddlyExtensions.GetFormattedValueByType(param).OrderBy(y => y)) ?? false;
126
+
127
+ var vals = Griddly .Mvc .GriddlyExtensions .GetFormattedValueByType (x .Value );
128
+
129
+ if (vals == null )
130
+ {
131
+ return false ;
132
+ }
133
+
134
+ var parms = Griddly .Mvc .GriddlyExtensions .GetFormattedValueByType (param );
135
+
136
+ return new HashSet <string >(vals ).SetEquals (new HashSet <string >(parms ));
127
137
}
128
138
129
139
return false ;
You can’t perform that action at this time.
0 commit comments