~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/maccore/src/CoreFoundation/CFType.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
        public class CFType {
10
10
                [DllImport (Constants.CoreFoundationLibrary, EntryPoint="CFGetTypeID")]
11
11
                public static extern int GetTypeID (IntPtr typeRef);
 
12
 
 
13
                [DllImport (Constants.CoreFoundationLibrary)]
 
14
                extern static IntPtr CFCopyDescription (IntPtr ptr);
 
15
 
 
16
                public string GetDescription (IntPtr handle)
 
17
                {
 
18
                        if (handle == IntPtr.Zero)
 
19
                                throw new ArgumentNullException ("handle");
 
20
                        
 
21
                        using (var s = new CFString (CFCopyDescription (handle)))
 
22
                                return s.ToString ();
 
23
                }
 
24
                
12
25
        }
13
26
 
14
27
        public interface ICFType : INativeObject {
15
28
        }
16
 
}
 
 
b'\\ No newline at end of file'
 
29
}