I think code below will work (haven't tried on Beta1 to verify):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 

type SUndirectedTaggedEdge<'a,'b>() = class end

let get_edges: int -> seq<SUndirectedTaggedEdge<int, int>> = fun x -> Seq.empty 

open System.Collections.Generic
open System.Runtime.InteropServices
open ClassLibrary1  // has C# delegate definition of TryFunc: public delegate bool TryFunc<T, TResult>(T arg, out TResult result);

let MyTryFuncDelegate (get_edges: int -> seq<SUndirectedTaggedEdge<int, int>>) = 
     new TryFunc<int, IEnumerable<SUndirectedTaggedEdge<int, int>>  >
          (
          fun i ([<Out>] res: byref<IEnumerable<SUndirectedTaggedEdge<int, int>>>  ) ->
               res <- get_edges i  
               not (Seq.isEmpty res))  
By on 7/8/2009 1:56 PM ()

It worked in Beta 1. Thanks.

By on 7/9/2009 3:34 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper