Ejemplo n.º 1
0
 public ShellId GetShellId()
 {
     return(ShellId.FromString(Name));
 }
Ejemplo n.º 2
0
 ShellId IShellNamespaceItem.GetShellId()
 {
     return(ShellId.FromString(displayName));
 }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public ShellId GetShellId()
 {
     //  The environment variable name will be unique in the folder, so works perfectly as a PIDL.
     return(ShellId.FromString(_name));
 }
Ejemplo n.º 4
0
        private static IShellNamespaceFolder GetChildFolder(IShellNamespaceFolder folder, ShellId itemId)
        {
            //  Get the item that is represented by the shell id.
            var childFolder = folder
                              .GetChildren(ShellNamespaceEnumerationFlags.Folders)
                              .OfType <IShellNamespaceFolder>()
                              .SingleOrDefault(i => i.GetShellId().Equals(itemId));

            //  If we don't find the item, we've got a problem.
            if (childFolder == null)
            {
                //  TODO how will we handle this error?
                var me  = folder.GetDisplayName(DisplayNameContext.Normal);
                var you = itemId.ToString();
                return(null);
            }
            return(childFolder);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the unique identifier.
 /// </summary>
 /// <returns>The unique identifier, which in this case is based on the repo name.</returns>
 public ShellId GetShellId()
 {
     //  Use the name as the source of the ID.
     return(ShellId.FromString(Name));
 }