SiteMapProviderCollection.AddArray(SiteMapProvider[]) Método
Definição
Adiciona uma matriz de objetos SiteMapProvider na coleção de provedores usando as propriedades Name como chaves.Adds an array of SiteMapProvider objects into the provider collection using the Name properties as keys.
public:
void AddArray(cli::array <System::Web::SiteMapProvider ^> ^ providerArray);
public void AddArray (System.Web.SiteMapProvider[] providerArray);
member this.AddArray : System.Web.SiteMapProvider[] -> unit
Public Sub AddArray (providerArray As SiteMapProvider())
Parâmetros
- providerArray
- SiteMapProvider[]
A matriz de objetos SiteMapProvider a ser adicionada.The array of SiteMapProvider objects to add.
Exceções
Um SiteMapProvider com o mesmo nome já existe no SiteMapProviderCollection.A SiteMapProvider with the same name already exists in the SiteMapProviderCollection.
providerArray é null.providerArray is null.
O SiteMapProviderCollection é somente leitura.The SiteMapProviderCollection is read-only.
Comentários
O SiteMapProviderCollection que é retornado pela Providers propriedade é somente leitura.The SiteMapProviderCollection that is returned by the Providers property is read-only. Por esse motivo, você não pode usar Add os AddArray métodos e para adicionar provedores adicionais programaticamente em tempo de execução.For this reason, you cannot use the Add and AddArray methods to add additional providers programmatically at run time. Portanto, os Add AddArray métodos e são usados apenas em cenários em que você cria manualmente os objetos do provedor do mapa do site e os gerencia com uma instância da SiteMapProviderCollection classe.Therefore, the Add and AddArray methods are only used in scenarios where you manually create site map provider objects and manage them with an instance of the SiteMapProviderCollection class.
Como a SiteMap classe é estática, qualquer uma SiteMapProvider contida em sua Providers coleção permanece durante o tempo de vida do aplicativo Web.Because the SiteMap class is static, any SiteMapProvider contained in its Providers collection remains for the lifetime of the Web application.