public Collection <PSObject> Get(string[] path, bool recurse, bool force, bool literalPath) { var runtime = new ProviderRuntime(SessionState, force, literalPath); Get(path, recurse, runtime); return(runtime.ThrowFirstErrorOrReturnResults()); }
public Collection <PSObject> Rename(string path, string newName, bool force) { var runtime = new ProviderRuntime(SessionState, force, true); Rename(path, newName, runtime); return(runtime.ThrowFirstErrorOrReturnResults()); }
public Collection <PSObject> New(string[] paths, string name, string itemTypeName, object content, bool force) { var runtime = new ProviderRuntime(SessionState, force, true); New(paths, name, itemTypeName, content, runtime); return(runtime.ThrowFirstErrorOrReturnResults()); }
public Collection <PSObject> Move(string[] path, string destination, bool force, bool literalPath) { var runtime = new ProviderRuntime(SessionState, force, literalPath); Move(path, destination, runtime); return(runtime.ThrowFirstErrorOrReturnResults()); }
public Collection <PSObject> Copy(string[] path, string destinationPath, bool recurse, CopyContainers copyContainers, bool force, bool literalPath) { var runtime = new ProviderRuntime(SessionState, force, literalPath); Copy(path, destinationPath, recurse, copyContainers, runtime); return(runtime.ThrowFirstErrorOrReturnResults()); }
public Collection <string> GetNames(string[] path, ReturnContainers returnContainers, bool recurse, bool force, bool literalPath) { var runtime = new ProviderRuntime(SessionState, force, literalPath); GetNames(path, returnContainers, recurse, runtime); var packedResults = runtime.ThrowFirstErrorOrReturnResults(); var results = (from r in packedResults select r.ToString()).ToList(); return(new Collection <string>(results)); }
internal List <string> GetValidChildNames(ContainerCmdletProvider provider, string providerPath, ReturnContainers returnContainers, ProviderRuntime runtime) { var subRuntime = new ProviderRuntime(runtime); subRuntime.PassThru = false; // so we can catch the results provider.GetChildNames(providerPath, returnContainers, subRuntime); var results = subRuntime.ThrowFirstErrorOrReturnResults(); return((from c in results where c.BaseObject is string select((string)c.BaseObject)).ToList()); }