Permalink
Browse files

Merge pull request #234 from michaelaird/KnockoutCompareResult

Enumeration for Knockout CompareResult status
  • Loading branch information...
2 parents 24ce066 + a64ec9b commit 8338fae61daf42bf2bed65ddfb48d5a5248985bd @nikhilk committed Sep 19, 2012
Showing with 35 additions and 27 deletions.
  1. +35 −27 src/Libraries/Knockout/CompareResult.cs
@@ -1,27 +1,35 @@
-// CompareResult.cs
-// Script#/Libraries/Knockout
-// This source code is subject to terms and conditions of the Apache License, Version 2.0.
-//
-
-using System;
-using System.Runtime.CompilerServices;
-
-namespace KnockoutApi {
-
- [Imported]
- [IgnoreNamespace]
- public class CompareResult<T> {
-
- [IntrinsicProperty]
- public string Status {
- get;
- set;
- }
-
- [IntrinsicProperty]
- public T Value {
- get;
- set;
- }
- }
-}
+// CompareResult.cs
+// Script#/Libraries/Knockout
+// This source code is subject to terms and conditions of the Apache License, Version 2.0.
+//
+
+using System;
+using System.Runtime.CompilerServices;
+
+namespace KnockoutApi {
+
+ [Imported]
+ [IgnoreNamespace]
+ public class CompareResult<T> {
+
+ [IntrinsicProperty]
+ public CompareResultStatus Status
+ {
+ get;
+ set;
+ }
+
+ [IntrinsicProperty]
+ public T Value {
+ get;
+ set;
+ }
+ }
+
+ [NamedValues]
+ public enum CompareResultStatus{
+ added,
+ deleted,
+ retained
+ }
+}

0 comments on commit 8338fae

Please sign in to comment.