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

« back to all changes in this revision

Viewing changes to external/maccore/src/CoreFoundation/CFArray.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:
1
1
// 
2
2
// CFArray.cs: P/Invokes for CFArray
3
3
//
4
 
// Authors: Mono Team
 
4
// Authors:
 
5
//    Mono Team
 
6
//    Rolf Bjarne Kvinge (rolf@xamarin.com)
 
7
//
5
8
//     
6
9
// Copyright 2010 Novell, Inc
 
10
// Copyright 2012 Xamarin Inc
7
11
//
8
12
// Permission is hereby granted, free of charge, to any person obtaining
9
13
// a copy of this software and associated documentation files (the
38
42
 
39
43
                internal IntPtr handle;
40
44
 
 
45
                internal CFArray (IntPtr handle)
 
46
                        : this (handle, false)
 
47
                {
 
48
                }
 
49
 
41
50
                [Preserve (Conditional = true)]
42
51
                internal CFArray (IntPtr handle, bool owns)
43
52
                {
105
114
                [DllImport (Constants.CoreFoundationLibrary)]
106
115
                extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, CFIndex numValues, IntPtr callbacks);
107
116
 
 
117
                [DllImport (Constants.CoreFoundationLibrary)]
 
118
                extern static IntPtr CFArrayGetValueAtIndex (IntPtr theArray, IntPtr index);
 
119
 
 
120
                public IntPtr GetValue (int index)
 
121
                {
 
122
                        return CFArrayGetValueAtIndex (handle, new IntPtr (index));
 
123
                }
 
124
 
108
125
                public static unsafe IntPtr Create (params IntPtr[] values)
109
126
                {
110
127
                        if (values == null)