~ubuntu-branches/ubuntu/feisty/nant/feisty

« back to all changes in this revision

Viewing changes to src/NAnt.Core/ExpressionEvalBase.cs

  • Committer: Bazaar Package Importer
  • Author(s): Dave Beckett
  • Date: 2006-06-12 23:30:36 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060612233036-a1uwh0949z0218ep
Tags: 0.84+0.85-rc4-1
* New upstream release
* Acknowledge NMU (Closes: #372588)
* Standards-Version 3.7.2
* Update to latest CLI policy package split.  Build-Depends-Indep: on
  cli-common-dev, libmono-winforms1.0-cil, libmono-winforms2.0-cil and
  mono-gmcs to get 1.0 and 2.0 packages
* Removed patches no longer needed:
  - 01-AssemblyInfoTask.cs.patch
  - 02-ScriptTask.cs.patch
  - 03-XmlResultFormatter.cs.patch
  - 04-SourceControl.patch
  - 05-ExceptionTest.cs

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
                            return o.Equals(o2);
202
202
                        } else if (o is TimeSpan && o2 is TimeSpan) {
203
203
                            return o.Equals(o2);
 
204
                        } else if (o.GetType().IsEnum) {
 
205
                            if (o2 is string) {
 
206
                                return o.Equals(Enum.Parse(o.GetType(), (string) o2, false));
 
207
                            } else {
 
208
                                return o.Equals(Enum.ToObject(o.GetType(), o2));
 
209
                            }
 
210
                        } else if (o2.GetType().IsEnum) {
 
211
                            if (o is string) {
 
212
                                return o2.Equals(Enum.Parse(o2.GetType(), (string) o, false));
 
213
                            } else {
 
214
                                return o2.Equals(Enum.ToObject(o2.GetType(), o));
 
215
                            }
204
216
                        }
205
217
 
206
218
                        throw BuildParseError(string.Format(CultureInfo.InvariantCulture, 
234
246
                            return !o.Equals(o2);
235
247
                        } else if (o is TimeSpan && o2 is TimeSpan) {
236
248
                            return !o.Equals(o2);
 
249
                        } else if (o.GetType().IsEnum) {
 
250
                            if (o2 is string) {
 
251
                                return !o.Equals(Enum.Parse(o.GetType(), (string) o2, false));
 
252
                            } else {
 
253
                                return !o.Equals(Enum.ToObject(o.GetType(), o2));
 
254
                            }
 
255
                        } else if (o2.GetType().IsEnum) {
 
256
                            if (o is string) {
 
257
                                return !o2.Equals(Enum.Parse(o2.GetType(), (string) o, false));
 
258
                            } else {
 
259
                                return !o2.Equals(Enum.ToObject(o2.GetType(), o));
 
260
                            }
237
261
                        }
238
262
 
239
263
                        throw BuildParseError(string.Format(CultureInfo.InvariantCulture,