當前位置: 首頁>>代碼示例>>C#>>正文


C# ProviderRuntime.ThrowFirstErrorOrReturnResults方法代碼示例

本文整理匯總了C#中Pash.Implementation.ProviderRuntime.ThrowFirstErrorOrReturnResults方法的典型用法代碼示例。如果您正苦於以下問題:C# ProviderRuntime.ThrowFirstErrorOrReturnResults方法的具體用法?C# ProviderRuntime.ThrowFirstErrorOrReturnResults怎麽用?C# ProviderRuntime.ThrowFirstErrorOrReturnResults使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Pash.Implementation.ProviderRuntime的用法示例。


在下文中一共展示了ProviderRuntime.ThrowFirstErrorOrReturnResults方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Copy

 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();
 }
開發者ID:mauve,項目名稱:Pash,代碼行數:7,代碼來源:ItemCmdletProviderIntrinsics.cs

示例2: GetNames

 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);
 }
開發者ID:mauve,項目名稱:Pash,代碼行數:9,代碼來源:ChildItemCmdletProviderIntrinsics.cs

示例3: Get

 public Collection<PSObject> Get(string[] path, bool force, bool literalPath)
 {
     var runtime = new ProviderRuntime(SessionState, force, literalPath);
     Get(path, runtime);
     return runtime.ThrowFirstErrorOrReturnResults();
 }
開發者ID:mauve,項目名稱:Pash,代碼行數:6,代碼來源:ItemCmdletProviderIntrinsics.cs

示例4: Rename

 public Collection<PSObject> Rename(string path, string newName, bool force)
 {
     var runtime = new ProviderRuntime(SessionState, force, true);
     Rename(path, newName, runtime);
     return runtime.ThrowFirstErrorOrReturnResults();
 }
開發者ID:mauve,項目名稱:Pash,代碼行數:6,代碼來源:ItemCmdletProviderIntrinsics.cs

示例5: New

 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();
 }
開發者ID:mauve,項目名稱:Pash,代碼行數:6,代碼來源:ItemCmdletProviderIntrinsics.cs

示例6: GetValidChildNames

 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();
 }
開發者ID:mauve,項目名稱:Pash,代碼行數:10,代碼來源:ChildItemCmdletProviderIntrinsics.cs


注:本文中的Pash.Implementation.ProviderRuntime.ThrowFirstErrorOrReturnResults方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。