当前位置: 首页>>代码示例>>C#>>正文


C# ReturnContainers类代码示例

本文整理汇总了C#中ReturnContainers的典型用法代码示例。如果您正苦于以下问题:C# ReturnContainers类的具体用法?C# ReturnContainers怎么用?C# ReturnContainers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ReturnContainers类属于命名空间,在下文中一共展示了ReturnContainers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetChildNames

 protected virtual void GetChildNames(string path, ReturnContainers returnContainers)
 {
     using (PSTransactionManager.GetEngineProtectionScope())
     {
         throw PSTraceSource.NewNotSupportedException("SessionStateStrings", "CmdletProvider_NotSupported", new object[0]);
     }
 }
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:ContainerCmdletProvider.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: GetChildNames

 protected override void GetChildNames(string path, ReturnContainers returnContainers)
 {
     if (PathIsDrive(path))
     {
         foreach (var repository in gitConfigManager.GetTrackedRepositories())
         {
             WriteItemObject(repository.Name, path, true);
         }
         return;
     }
     var trackedRepository = gitConfigManager.GetTrackedRepository(path);
     if (trackedRepository != null)
     {
         WriteItemObject("Git repo", path, false);
     }
 }
开发者ID:bpatra,项目名称:Pit,代码行数:16,代码来源:GitRepositoryProvider.cs

示例4: GetChildNames

        protected override void GetChildNames(string path, ReturnContainers returnContainers)
        {
            using (new CurrentContextSession(this))
            {
                var children = GetChildNodesOfPath(path);
                if (String.IsNullOrEmpty(path))
                {
                    path = "/";
                }

                foreach (var child in children)
                {
                    WriteItemObject(child.Name, path, child.GetNodeChildren().Any());
                }
            }
        }
开发者ID:jayrobot,项目名称:Powershell-Settings,代码行数:16,代码来源:MongoProvider.cs

示例5: GetChildNames

 protected override void GetChildNames(string path, ReturnContainers returnContainers)
 {
     path = NormalizePath(path);
     if (path.Length == 0)
     {
         foreach (var key in GetFilteredItems().Keys)
         {
             WriteItemObject(key, key, false);
         }
         return;
     }
     if (ItemExists(path))
     {
         WriteItemObject(path, path, false);
     }
 }
开发者ID:mauve,项目名称:Pash,代码行数:16,代码来源:TestContainerProvider.cs

示例6: GetChildNames

        protected override void GetChildNames(string path, ReturnContainers returnContainers)
        {
            path = NormalizePath(path);

            // check for a named child
            if (path.Length > 0)
            {
                object item = GetSessionStateItem(path);
                if (item != null)
                {
                    WriteItemObject(path, path, false);
                }
                return;
            }
            // otherwise names of all children
            IDictionary sessionStateTable = GetSessionStateTable();
            foreach (DictionaryEntry entry in sessionStateTable)
            {
                var name = (string)entry.Key;
                WriteItemObject(name, name, false);
            }
        }
开发者ID:mauve,项目名称:Pash,代码行数:22,代码来源:SessionStateProviderBase.cs

示例7: GetChildNames

 //internal object GetChildItemsDynamicParameters(Path path, bool recurse, CmdletProviderContext context);
 internal void GetChildNames(Path path, ReturnContainers returnContainers, ProviderRuntime runtime)
 {
     ProviderRuntime = runtime;
     GetChildNames(path, returnContainers);
 }
开发者ID:Ventero,项目名称:Pash,代码行数:6,代码来源:ContainerCmdletProvider.cs

示例8: GetChildNames

 protected override void GetChildNames(string path, ReturnContainers returnContainers)
 {
     if (TransactionAvailable())
     {
         using (CurrentPSTransaction)
         {
             base.GetChildNames(path, returnContainers);
             return;
         }
     }
     base.GetChildNames(path, returnContainers);
 }
开发者ID:viciousviper,项目名称:p2f,代码行数:12,代码来源:ProviderWithTransactions.cs

示例9: GetChildNames

 /// <summary>
 /// Gets names of the children of the specified path.
 /// </summary>
 /// 
 /// <param name="path">
 /// The path to the item from which to retrieve the child names.
 /// </param>
 /// 
 /// <param name="returnAllContainers">
 /// If true, the provider should return all containers, even if they
 /// don't match the filter.  If false, the provider should only return
 /// containers that do match the filter.
 /// </param>
 /// 
 /// <remarks>
 /// Providers override this method to give the user access to the 
 /// provider objects using the get-childitem -name cmdlet.
 /// 
 /// Providers that declare 
 /// <see cref="System.Management.Automation.Provider.ProviderCapabilities"/>
 /// of ExpandWildcards, Filter, Include, or Exclude should ensure that
 /// the path passed meets those requirements by accessing the 
 /// appropriate property from the base class. The exception to this is
 /// if <paramref name="returnAllContainers"/> is true, then any child 
 /// name for a container should be returned even if it doesn't match 
 /// the Filter, Include, or Exclude.
 /// 
 /// By default overrides of this method should not write the names of
 /// objects that are generally hidden from the user unless the Force 
 /// property is set to true. For instance, the FileSystem provider 
 /// should not call WriteItemObject for hidden or system files unless 
 /// the Force property is set to true. 
 /// 
 /// The provider implementation is responsible for preventing infinite 
 /// recursion when there are circular links and the like. An 
 /// appropriate terminating exception should be thrown if this
 /// situation occurs.
 /// 
 /// The child names are the leaf portion of the path. Example, for the
 /// file system the name for the path c:\windows\system32\foo.dll would
 /// be foo.dll or for the directory c:\windows\system32 would be
 /// system32.  For Active Directory the child names would be RDN values
 /// of the child objects of the container.
 /// 
 /// All names should be written to the WriteItemObject method.
 /// </remarks>
 protected override void GetChildNames( string path,
                             ReturnContainers returnAllContainers )
 {
     // Get the names of children at the specified path
     // and writing them
     // WriteItemObject( item, path, isContainer );
 }
开发者ID:dgrapp1,项目名称:WindowsSDK7-Samples,代码行数:53,代码来源:TemplateProvider.cs

示例10: GetChildNames

        } // GetChildItems

        /// <summary>
        /// Return the names of all child items.
        /// </summary>
        /// <param name="path">The root path.</param>
        /// <param name="returnContainers">Not used.</param>
        protected override void GetChildNames(string path,
                                      ReturnContainers returnContainers)
        {
            // If the path represented is a drive, then the child items are
            // tables. get the names of all the tables in the drive.
            if (PathIsDrive(path))
            {
                foreach (DatabaseTableInfo table in GetTables())
                {
                    WriteItemObject(table.Name, path, true);
                } // foreach (DatabaseTableInfo...
            } // if (PathIsDrive...
            else
            {
                // Get type, table name and row number from path specified
                string tableName;
                int rowNumber;

                PathType type = GetNamesFromPath(path, out tableName, out rowNumber);

                if (type == PathType.Table)
                {
                    // Get all the rows in the table and then write out the 
                    // row numbers.
                    foreach (DatabaseRowInfo row in GetRows(tableName))
                    {
                        WriteItemObject(row.RowNumber, path, false);
                    } // foreach (DatabaseRowInfo...
                }
                else if (type == PathType.Row)
                {
                    // In this case the user has directly specified a row, hence
                    // just give that particular row
                    DatabaseRowInfo row = GetRow(tableName, rowNumber);

                    WriteItemObject(row.RowNumber, path, false);
                }
                else
                {
                    ThrowTerminatingInvalidPathException(path);
                }
            } // else
        } // GetChildNames
开发者ID:dhanzhang,项目名称:Windows-classic-samples,代码行数:50,代码来源:AccessDBProviderSample06.cs

示例11: GetChildNames

 protected override void GetChildNames(string path, ReturnContainers returnContainers)
 {
     base.GetChildNames(path, returnContainers);
 }
开发者ID:beefarino,项目名称:TxF,代码行数:4,代码来源:ProviderWithDisposableSession.cs

示例12: GetChildNames

        protected override void GetChildNames(string path, ReturnContainers returnContainers)
        {
            var nodeFactory = GetNodeFactoryFromPath(path, false);
            if (null == nodeFactory)
            {
                return;
            }

            nodeFactory.ToList().ForEach(f => GetChildNames(path, f, returnContainers));
        }
开发者ID:modulexcite,项目名称:EntityShell,代码行数:10,代码来源:Provider.cs

示例13: GetChildNames

 protected override void GetChildNames(string path, ReturnContainers returnContainers)
 {
     GetPathItems(path, false, true, returnContainers);
 }
开发者ID:nickchal,项目名称:pash,代码行数:4,代码来源:DirectoryServiceProvider.cs

示例14: GetNames

 public Collection<string> GetNames(string[] path, ReturnContainers returnContainers, bool recurse, bool force, bool literalPath)
 {
     return this.sessionState.GetChildNames(path, returnContainers, recurse, force, literalPath);
 }
开发者ID:nickchal,项目名称:pash,代码行数:4,代码来源:ChildItemCmdletProviderIntrinsics.cs

示例15: GetChildNames

 protected override void GetChildNames(string path, ReturnContainers returnContainers)
 {
     foreach (var subItem in this.ZookeeperDriver.Zookeeper.GetChildren(path))
     {
         this.WriteNodeName( path, subItem );
     }
 }
开发者ID:Klakier,项目名称:PsZookeeper,代码行数:7,代码来源:ZookeeperPSProvider.cs


注:本文中的ReturnContainers类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。