Skip to content
This repository
Browse code

Merge pull request #234 from michaelaird/KnockoutCompareResult

Enumeration for Knockout CompareResult status
  • Loading branch information...
commit 8338fae61daf42bf2bed65ddfb48d5a5248985bd 2 parents 24ce066 + a64ec9b
Nikhil Kothari authored

Showing 1 changed file with 35 additions and 27 deletions. Show diff stats Hide diff stats

  1. +35 27 src/Libraries/Knockout/CompareResult.cs
62 src/Libraries/Knockout/CompareResult.cs
... ... @@ -1,27 +1,35 @@
1   -// CompareResult.cs
2   -// Script#/Libraries/Knockout
3   -// This source code is subject to terms and conditions of the Apache License, Version 2.0.
4   -//
5   -
6   -using System;
7   -using System.Runtime.CompilerServices;
8   -
9   -namespace KnockoutApi {
10   -
11   - [Imported]
12   - [IgnoreNamespace]
13   - public class CompareResult<T> {
14   -
15   - [IntrinsicProperty]
16   - public string Status {
17   - get;
18   - set;
19   - }
20   -
21   - [IntrinsicProperty]
22   - public T Value {
23   - get;
24   - set;
25   - }
26   - }
27   -}
  1 +// CompareResult.cs
  2 +// Script#/Libraries/Knockout
  3 +// This source code is subject to terms and conditions of the Apache License, Version 2.0.
  4 +//
  5 +
  6 +using System;
  7 +using System.Runtime.CompilerServices;
  8 +
  9 +namespace KnockoutApi {
  10 +
  11 + [Imported]
  12 + [IgnoreNamespace]
  13 + public class CompareResult<T> {
  14 +
  15 + [IntrinsicProperty]
  16 + public CompareResultStatus Status
  17 + {
  18 + get;
  19 + set;
  20 + }
  21 +
  22 + [IntrinsicProperty]
  23 + public T Value {
  24 + get;
  25 + set;
  26 + }
  27 + }
  28 +
  29 + [NamedValues]
  30 + public enum CompareResultStatus{
  31 + added,
  32 + deleted,
  33 + retained
  34 + }
  35 +}

0 comments on commit 8338fae

Please sign in to comment.
Something went wrong with that request. Please try again.