protected override IEnumerable <IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { foreach (var environmentVariable in Environment.GetEnvironmentVariables().Keys) { yield return(new EnvironmentVariableNamespaceItem(environmentVariable.ToString())); } }
public IEnumerable<IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { return new[] { new GitHubBranch {Name = "Branch1"}, new GitHubBranch {Name = "Branch2"}, new GitHubBranch {Name = "Branch3"} }; }
protected override IEnumerable <IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { if (flags.HasFlag(ShellNamespaceEnumerationFlags.Folders)) { foreach (var hive in hives) { yield return(hive); } } }
public IEnumerable <IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { return(new[] { new GitHubBranch { Name = "Branch1" }, new GitHubBranch { Name = "Branch2" }, new GitHubBranch { Name = "Branch3" } }); }
IEnumerable<IShellNamespaceItem> IShellNamespaceFolder.GetChildren(ShellNamespaceEnumerationFlags flags) { // If we've been asked for folders, return all subkeys. if (flags.HasFlag(ShellNamespaceEnumerationFlags.Folders)) { foreach (var childKey in lazyChildKeys.Value) yield return childKey; } // If we've been asked for items, return all items. if (flags.HasFlag(ShellNamespaceEnumerationFlags.Items)) { foreach (var childAttribute in lazyAttributes.Value) yield return childAttribute; } }
public ShellNamespaceFolderIdListEnumerator(IShellNamespaceFolder shellNamespaceFolder, SHCONTF grfFlags, uint index) { // todo: The flags should be a type in the sharpshell domain, not the shell. // todo the flags might change how we have to do this. // Store the extension for the folder we're enuerating. this.shellNamespaceFolder = shellNamespaceFolder; this.currentIndex = index; this.flags = grfFlags; // Map the flags. // TODO: more to be done here. _shellNamespaceEnumerationFlags = 0; if (grfFlags.HasFlag(SHCONTF.SHCONTF_FOLDERS)) _shellNamespaceEnumerationFlags |= ShellNamespaceEnumerationFlags.Folders; if (grfFlags.HasFlag(SHCONTF.SHCONTF_NONFOLDERS)) _shellNamespaceEnumerationFlags |= ShellNamespaceEnumerationFlags.Items; }
IEnumerable <IShellNamespaceItem> IShellNamespaceFolder.GetChildren(ShellNamespaceEnumerationFlags flags) { // If we've been asked for folders, return all subkeys. if (flags.HasFlag(ShellNamespaceEnumerationFlags.Folders)) { foreach (var childKey in lazyChildKeys.Value) { yield return(childKey); } } // If we've been asked for items, return all items. if (flags.HasFlag(ShellNamespaceEnumerationFlags.Items)) { foreach (var childAttribute in lazyAttributes.Value) { yield return(childAttribute); } } }
protected override IEnumerable<IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { yield break; }
protected override IEnumerable <IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { return(sampleRepos); }
protected override IEnumerable <IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { yield break; }
protected override IEnumerable<IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { return sampleRepos; }
/// <summary> /// Gets the children of the extension. /// </summary> /// <param name="flags">The flags. Only return children that match the flags.</param> /// <returns>The children of the extension.</returns> protected abstract IEnumerable<IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags);
IEnumerable<IShellNamespaceItem> IShellNamespaceFolder.GetChildren(ShellNamespaceEnumerationFlags flags) { return GetChildren(flags); }
/// <summary> /// Gets the children of the extension. /// </summary> /// <param name="flags">The flags. Only return children that match the flags.</param> /// <returns>The children of the extension.</returns> protected abstract IEnumerable <IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags);
IEnumerable <IShellNamespaceItem> IShellNamespaceFolder.GetChildren(ShellNamespaceEnumerationFlags flags) { return(GetChildren(flags)); }
protected override IEnumerable<IShellNamespaceItem> GetChildren(ShellNamespaceEnumerationFlags flags) { if(flags.HasFlag(ShellNamespaceEnumerationFlags.Folders)) foreach (var hive in hives) yield return hive; }