~ubuntu-branches/ubuntu/vivid/monodevelop/vivid-proposed

« back to all changes in this revision

Viewing changes to src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellItemArray.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2014-10-09 14:09:23 UTC
  • mfrom: (10.3.5)
  • Revision ID: package-import@ubuntu.com-20141009140923-s0d22u5f9kg8jvds
Tags: 5.5.0.227-1
* [b2c8331] Imported Upstream version 5.5.0.227 (Closes: #754316)
* [d210995] Delete obsolete patches
* [1b59ae1] Clear patch fizz, via quilt refresh
* [3dd147d] Fix error in configure.in which applies for tarball builds but 
  not git builds when running autoreconf
* [21c2a57] Remove Metacity references for good
* [3331661] Ensure NUnit 2.6.3 is installed
* [fd85c88] Build-depend on NuGet
* [a1ae116] Add WebKit to build dependencies, for Xwt moduleref resolution
* [9b4cf12] Since the GDB addin is integrated now, declare it in 
  debian/control
* [6231562] Correct NUnit links
* [3d2b693] Fix NuGet addin, by copying libs locally
* [74bf9a8] Don't symlink unused Mocks NUnit assembly
* [ade52b2] Ensure IKVM.Reflection is built with default (4.5) profile

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//Copyright (c) Microsoft Corporation.  All rights reserved.
 
2
 
 
3
using System;
 
4
using System.Collections.Generic;
 
5
using Microsoft.WindowsAPICodePack.Shell.PropertySystem;
 
6
using MS.WindowsAPICodePack.Internal;
 
7
 
 
8
namespace Microsoft.WindowsAPICodePack.Shell
 
9
{
 
10
    internal class ShellItemArray : IShellItemArray
 
11
    {
 
12
        List<IShellItem> shellItemsList = new List<IShellItem>();
 
13
 
 
14
        internal ShellItemArray(IShellItem[] shellItems)
 
15
        {
 
16
            shellItemsList.AddRange(shellItems);
 
17
        }
 
18
 
 
19
        #region IShellItemArray Members
 
20
 
 
21
        public HResult BindToHandler(IntPtr pbc, ref Guid rbhid, ref Guid riid, out IntPtr ppvOut)
 
22
        {
 
23
            throw new NotSupportedException();
 
24
        }
 
25
 
 
26
        public HResult GetPropertyStore(int Flags, ref Guid riid, out IntPtr ppv)
 
27
        {
 
28
            throw new NotSupportedException();
 
29
        }
 
30
 
 
31
        public HResult GetPropertyDescriptionList(ref PropertyKey keyType, ref Guid riid, out IntPtr ppv)
 
32
        {
 
33
            throw new NotSupportedException();
 
34
        }
 
35
 
 
36
        public HResult GetAttributes(ShellNativeMethods.ShellItemAttributeOptions dwAttribFlags, ShellNativeMethods.ShellFileGetAttributesOptions sfgaoMask, out ShellNativeMethods.ShellFileGetAttributesOptions psfgaoAttribs)
 
37
        {
 
38
            throw new NotSupportedException();
 
39
        }
 
40
 
 
41
        public HResult GetCount(out uint pdwNumItems)
 
42
        {
 
43
            pdwNumItems = (uint)shellItemsList.Count;
 
44
            return HResult.Ok;
 
45
        }
 
46
 
 
47
        public HResult GetItemAt(uint dwIndex, out IShellItem ppsi)
 
48
        {
 
49
            int index = (int)dwIndex;
 
50
 
 
51
            if (index < shellItemsList.Count)
 
52
            {
 
53
                ppsi = shellItemsList[index];
 
54
                return HResult.Ok;
 
55
            }
 
56
            else
 
57
            {
 
58
                ppsi = null;
 
59
                return HResult.Fail;
 
60
            }
 
61
        }
 
62
 
 
63
        public HResult EnumItems(out IntPtr ppenumShellItems)
 
64
        {
 
65
            throw new NotSupportedException();
 
66
        }
 
67
 
 
68
        #endregion
 
69
    }
 
70
}