View difference between Paste ID: 63KRMeNu and PQTWyGh9
SHOW: | | - or go back to the newest paste.
1
[<AbstractClass>]
2
type A () =
3
    override x.Equals(yobj) =
4
        match yobj with
5
        | :? A as y ->
6
            if (x.Guid = Guid.Empty || y.Guid = Guid.Empty) then
7
                // Lets look for ExternalId
8
                x.ExternalId = y.ExternalId
9
            else
10
                x.Guid = y.Guid
11
        | _ -> false
12
13
type B () =
14
    inherit A ()
15
16
    override x.Equals(yobj) =
17
        match yobj with
18
        | :? B as y ->
19
            if (x.Guid = Guid.Empty || y.Guid = Guid.Empty) then
20
                // Lets look for ExternalId
21
                x.ExternalId = y.ExternalId
22
            else
23
                x.Guid = y.Guid
24
        | _ -> false
25
26
type C () =
27
    inherit A ()
28
29
    override x.Equals(yobj) =
30
        match yobj with
31
        | :? C as y ->
32
            if (x.Guid = Guid.Empty || y.Guid = Guid.Empty) then
33
                // Lets look for ExternalId
34
                x.ExternalId = y.ExternalId
35
            else
36
                x.Guid = y.Guid
37
        | _ -> false