StaticSiteMapProvider Clase

Definición

Actúa como implementación parcial de la clase SiteMapProvider abstracta y como clase base para la clase XmlSiteMapProvider, que es el proveedor del mapa del sitio predeterminado en ASP.NET.

public ref class StaticSiteMapProvider abstract : System::Web::SiteMapProvider
public abstract class StaticSiteMapProvider : System.Web.SiteMapProvider
type StaticSiteMapProvider = class
    inherit SiteMapProvider
Public MustInherit Class StaticSiteMapProvider
Inherits SiteMapProvider
Herencia
StaticSiteMapProvider
Derivado

Ejemplos

En el ejemplo de código siguiente se muestra cómo extender la StaticSiteMapProvider clase para usar Microsoft Access como proveedor de mapas de sitio. La AccessSiteMapProvider clase es un proveedor de mapa de sitio que solo admite una jerarquía simple de un nivel profundo. La tabla en la que se almacenan los datos del mapa del sitio tiene la siguiente estructura:

NODEID URL            NAME       PARENTNODEID  
 ---------------------------------------------  
 1      default.aspx   Default    <NULL>  
 2      catalog.aspx   Catalog    1  
 3      aboutus.aspx   Contact Us 1  
...  

La AccessSiteMapProvider clase se deriva de la StaticSiteMapProvider clase y recupera su información de una base de datos de Microsoft Access mediante consultas SQL básicas y los OleDbCommand objetos y OleDbDataReader .

#using <System.Data.dll>
#using <System.Transactions.dll>
#using <System.EnterpriseServices.dll>
#using <System.dll>
#using <System.Web.dll>
#using <System.Configuration.dll>

using namespace System;
using namespace System::Collections;
using namespace System::Collections::Specialized;
using namespace System::Configuration;
using namespace System::Data;
using namespace System::Data::OleDb;
using namespace System::Security::Permissions;
using namespace System::Web;

/// An extremely simple AccessSiteMapProvider that only supports a
/// site map node hierarchy 1 level deep.

[AspNetHostingPermission(SecurityAction::Demand,Level=AspNetHostingPermissionLevel::Minimal)]
public ref class AccessSiteMapProvider: public StaticSiteMapProvider
{
private:
   SiteMapNode ^ rootNode;
   OleDbConnection^ accessConnection;

   // This string is case sensitive.
   String^ AccessConnectionStringName;

public:
   // Implement a default constructor.
   AccessSiteMapProvider()
   {
      initialized = false;
      AccessConnectionStringName = "accessSiteMapConnectionString";
   }


private:

   // Some basic state to help track the initialization state of the provider.
   bool initialized;

public:

   property bool IsInitialized 
   {
      virtual bool get()
      {
         return initialized;
      }

   }

   property SiteMapNode ^ RootNode 
   {

      // Return the root node of the current site map.
      virtual SiteMapNode ^ get() override
      {
         SiteMapNode ^ temp = nullptr;
         temp = BuildSiteMap();
         return temp;
      }

   }

protected:

   virtual SiteMapNode ^ GetRootNodeCore() override
   {
      return RootNode;
   }


public:

   // Initialize is used to initialize the properties and any state that the
   // AccessProvider holds, but is not used to build the site map.
   // The site map is built when the BuildSiteMap method is called.
   virtual void Initialize( String^ name, NameValueCollection^ attributes ) override
   {
      if ( IsInitialized )
            return;

      StaticSiteMapProvider::Initialize( name, attributes );
      
      // Create and test the connection to the Microsoft Access database.
      // Retrieve the Value of the Access connection string from the
      // attributes NameValueCollection.
      String^ connectionString = attributes[ AccessConnectionStringName ];
      if ( nullptr == connectionString || connectionString->Length == 0 )
            throw gcnew Exception( "The connection string was not found." );
      else
            accessConnection = gcnew OleDbConnection( connectionString );

      initialized = true;
   }


protected:

   ///
   /// SiteMapProvider and StaticSiteMapProvider methods that this derived class must override.
   ///
   // Clean up any collections or other state that an instance of this may hold.
   virtual void Clear() override
   {
      System::Threading::Monitor::Enter( this );
      try
      {
         rootNode = nullptr;
         StaticSiteMapProvider::Clear();
      }
      finally
      {
         System::Threading::Monitor::Exit( this );
      }

   }


public:

   // Build an in-memory representation from persistent
   // storage, and return the root node of the site map.
   virtual SiteMapNode ^ BuildSiteMap() override
   {
      // Since the SiteMap class is static, make sure that it is
      // not modified while the site map is built.
      System::Threading::Monitor::Enter( this );
      try
      {
         
         // If there is no initialization, this method is being
         // called out of order.
         if (  !IsInitialized )
         {
            throw gcnew Exception( "BuildSiteMap called incorrectly." );
         }
         
         // If there is no root node, then there is no site map.
         if ( nullptr == rootNode )
         {
            
            // Start with a clean slate
            Clear();
            
            // Select the root node of the site map from Microsoft Access.
            int rootNodeId = -1;
            if ( accessConnection->State == ConnectionState::Closed )
               accessConnection->Open();
            
            OleDbCommand^ rootNodeCommand = gcnew OleDbCommand
               ("SELECT nodeid, url, name FROM SiteMap WHERE parentnodeid IS NULL", accessConnection);
            OleDbDataReader^ rootNodeReader = rootNodeCommand->ExecuteReader();
            if ( rootNodeReader->HasRows )
            {
               rootNodeReader->Read();
               rootNodeId = rootNodeReader->GetInt32( 0 );
               
               // Create a SiteMapNode that references the current StaticSiteMapProvider.
               rootNode = gcnew SiteMapNode(this, rootNodeId.ToString(), 
                  rootNodeReader->GetString( 1 ),rootNodeReader->GetString( 2 ));
            }
            else
               return nullptr;
            rootNodeReader->Close();
            
            // Select the child nodes of the root node.
            OleDbCommand^ childNodesCommand = gcnew OleDbCommand
               ("SELECT nodeid, url, name FROM SiteMap WHERE parentnodeid = ?", accessConnection);
            OleDbParameter^ rootParam = gcnew OleDbParameter( "parentid", OleDbType::Integer);
            rootParam->Value = rootNodeId;
            childNodesCommand->Parameters->Add( rootParam );
            OleDbDataReader^ childNodesReader = childNodesCommand->ExecuteReader();
            if ( childNodesReader->HasRows )
            {
               SiteMapNode ^ childNode = nullptr;
               while ( childNodesReader->Read() )
               {
                  childNode = gcnew SiteMapNode( this, 
                      System::Convert::ToString(childNodesReader->GetInt32( 0 )),
                     childNodesReader->GetString( 1 ),
                     childNodesReader->GetString( 2 ) 
                  );
                  // Use the SiteMapNode AddNode method to add
                  // the SiteMapNode to the ChildNodes collection.
                  AddNode( childNode, rootNode );
               }
            }
            childNodesReader->Close();
            accessConnection->Close();
         }
         return rootNode;
      }
      finally
      {
         System::Threading::Monitor::Exit( this );
      }

   }

};
namespace Samples.AspNet.CS.Controls {

    using System;
    using System.Collections;
    using System.Collections.Specialized;
    using System.Data;
    using System.Data.OleDb;
    using System.Security.Permissions;
    using System.Web;

    /// An extremely simple AccessSiteMapProvider that only supports a
    /// site map node hierarchy 1 level deep.
    [AspNetHostingPermission(SecurityAction.Demand, Level=AspNetHostingPermissionLevel.Minimal)]
    public class AccessSiteMapProvider : StaticSiteMapProvider
    {
        private SiteMapNode rootNode =  null;
        private OleDbConnection accessConnection = null;

        // This string is case sensitive.
        private string AccessConnectionStringName = "accessSiteMapConnectionString";

        // Implement a default constructor.
        public AccessSiteMapProvider () { }

        // Some basic state to help track the initialization state of the provider.
        private bool initialized = false;
        public virtual bool IsInitialized {
            get {
                return initialized;
            }
        }
        // Return the root node of the current site map.
        public override SiteMapNode RootNode {
            get {
                SiteMapNode temp = null;
                temp = BuildSiteMap();
                return temp;
            }
        }
        protected override SiteMapNode GetRootNodeCore() {
            return RootNode;
        }
        // Initialize is used to initialize the properties and any state that the
        // AccessProvider holds, but is not used to build the site map.
        // The site map is built when the BuildSiteMap method is called.
        public override void Initialize(string name, NameValueCollection attributes) {
            if (IsInitialized)
                return;

            base.Initialize(name, attributes);

            // Create and test the connection to the Microsoft Access database.

            // Retrieve the Value of the Access connection string from the
            // attributes NameValueCollection.
            string connectionString = attributes[AccessConnectionStringName];

            if (null == connectionString || connectionString.Length == 0)
                throw new Exception ("The connection string was not found.");
            else
                accessConnection = new OleDbConnection(connectionString);

            initialized = true;
        }

        ///
        /// SiteMapProvider and StaticSiteMapProvider methods that this derived class must override.
        ///
        // Clean up any collections or other state that an instance of this may hold.
        protected override void Clear() {
            lock (this) {
                rootNode = null;
                base.Clear();
            }
        }

        // Build an in-memory representation from persistent
        // storage, and return the root node of the site map.
        public override SiteMapNode BuildSiteMap() {

            // Since the SiteMap class is static, make sure that it is
            // not modified while the site map is built.
            lock(this) {

                // If there is no initialization, this method is being
                // called out of order.
                if (! IsInitialized) {
                    throw new Exception("BuildSiteMap called incorrectly.");
                }

                // If there is no root node, then there is no site map.
                if (null == rootNode) {
                    // Start with a clean slate
                    Clear();

                    // Select the root node of the site map from Microsoft Access.
                    int rootNodeId = -1;

                    if (accessConnection.State == ConnectionState.Closed)
                        accessConnection.Open();
                    OleDbCommand rootNodeCommand =
                        new OleDbCommand("SELECT nodeid, url, name FROM SiteMap WHERE parentnodeid IS NULL",
                                         accessConnection);
                    OleDbDataReader rootNodeReader = rootNodeCommand.ExecuteReader();

                    if(rootNodeReader.HasRows) {
                        rootNodeReader.Read();
                        rootNodeId = rootNodeReader.GetInt32(0);
                        // Create a SiteMapNode that references the current StaticSiteMapProvider.
                        rootNode   = new SiteMapNode(this,
                                                     rootNodeId.ToString(),
                                                     rootNodeReader.GetString(1),
                                                     rootNodeReader.GetString(2));
                    }
                    else
                    {
                        return null;
                    }

                    rootNodeReader.Close();
                    // Select the child nodes of the root node.
                    OleDbCommand childNodesCommand =
                        new OleDbCommand("SELECT nodeid, url, name FROM SiteMap WHERE parentnodeid = ?",
                                         accessConnection);
                    OleDbParameter rootParam = new OleDbParameter("parentid", OleDbType.Integer);
                    rootParam.Value = rootNodeId;
                    childNodesCommand.Parameters.Add(rootParam);

                    OleDbDataReader childNodesReader = childNodesCommand.ExecuteReader();

                    if (childNodesReader.HasRows) {

                        SiteMapNode childNode = null;
                        while(childNodesReader.Read()) {
                            childNode =  new SiteMapNode(this,
                                                         childNodesReader.GetInt32(0).ToString(),
                                                         childNodesReader.GetString(1),
                                                         childNodesReader.GetString(2));

                            // Use the SiteMapNode AddNode method to add
                            // the SiteMapNode to the ChildNodes collection.
                            AddNode(childNode, rootNode);
                        }
                    }

                    childNodesReader.Close();
                    accessConnection.Close();
                }
                return rootNode;
            }
        }
    }
}
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Data
Imports System.Data.OleDb
Imports System.Security.Permissions
Imports System.Web

Namespace Samples.AspNet.VB.Controls
 
    ' An extremely simple AccessSiteMapProvider that only supports a
    ' site map node hierarchy one level deep.
    <AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)> _
    Public Class AccessSiteMapProvider
        Inherits StaticSiteMapProvider

        Private aRootNode As SiteMapNode = Nothing
        Private accessConnection As OleDbConnection = Nothing

        ' This string is case sensitive.
        Private AccessConnectionStringName As String = "accessSiteMapConnectionString"

        ' Implement a default constructor.
        Public Sub New()
        End Sub

        ' Some basic state to help track the initialization state of the provider.
        Private initialized As Boolean = False

        Public Overridable ReadOnly Property IsInitialized() As Boolean
            Get
                Return initialized
            End Get
        End Property

        ' Return the root node of the current site map.
        Public Overrides ReadOnly Property RootNode() As SiteMapNode
            Get
                Return BuildSiteMap()
            End Get
        End Property

        Protected Overrides Function GetRootNodeCore() As SiteMapNode
            Return RootNode
        End Function

        ' Initialize is used to initialize the properties and any state that the
        ' AccessProvider holds, but is not used to build the site map.
        ' The site map is built when the BuildSiteMap method is called.
        Public Overrides Sub Initialize(ByVal name As String, ByVal attributes As NameValueCollection)
            If IsInitialized Then
                Return
            End If
            MyBase.Initialize(name, attributes)

            ' Create and test the connection to the Microsoft Access database.
            ' Retrieve the Value of the Access connection string from the
            ' attributes NameValueCollection.
            Dim connectionString As String = attributes(AccessConnectionStringName)

            If Nothing = connectionString OrElse connectionString.Length = 0 Then
                Throw New Exception("The connection string was not found.")
            Else
                accessConnection = New OleDbConnection(connectionString)
            End If
            initialized = True
        End Sub

        ' SiteMapProvider and StaticSiteMapProvider methods that this derived class must override.
        '
        ' Clean up any collections or other state that an instance of this may hold.
        Protected Overrides Sub Clear()
            SyncLock Me
                aRootNode = Nothing
                MyBase.Clear()
            End SyncLock
        End Sub

        ' Build an in-memory representation from persistent
        ' storage, and return the root node of the site map.
        Public Overrides Function BuildSiteMap() As SiteMapNode

            ' Since the SiteMap class is static, make sure that it is
            ' not modified while the site map is built.
            SyncLock Me

                ' If there is no initialization, this method is being
                ' called out of order.
                If Not IsInitialized Then
                    Throw New Exception("BuildSiteMap called incorrectly.")
                End If

                ' If there is no root node, then there is no site map.
                If aRootNode Is Nothing Then
                    ' Start with a clean slate
                    Clear()

                    ' Select the root node of the site map from Microsoft Access.
                    Dim rootNodeId As Integer = -1

                    If accessConnection.State = ConnectionState.Closed Then
                        accessConnection.Open()
                    End If
                    Dim rootNodeCommand As New OleDbCommand("SELECT nodeid, url, name FROM SiteMap WHERE parentnodeid IS NULL", accessConnection)
                    Dim rootNodeReader As OleDbDataReader = rootNodeCommand.ExecuteReader()

                    If rootNodeReader.HasRows Then
                        rootNodeReader.Read()
                        rootNodeId = rootNodeReader.GetInt32(0)
                        ' Create a SiteMapNode that references the current StaticSiteMapProvider.
                        aRootNode = New SiteMapNode(Me, rootNodeId.ToString(), rootNodeReader.GetString(1), rootNodeReader.GetString(2))
                    Else
                        Return Nothing
                    End If
                    rootNodeReader.Close()
                    ' Select the child nodes of the root node.
                    Dim childNodesCommand As New OleDbCommand("SELECT nodeid, url, name FROM SiteMap WHERE parentnodeid = ?", accessConnection)
                    Dim rootParam As New OleDbParameter("parentid", OleDbType.Integer)
                    rootParam.Value = rootNodeId
                    childNodesCommand.Parameters.Add(rootParam)

                    Dim childNodesReader As OleDbDataReader = childNodesCommand.ExecuteReader()

                    If childNodesReader.HasRows Then

                        Dim childNode As SiteMapNode = Nothing
                        While childNodesReader.Read()
                            childNode = New SiteMapNode(Me, _
                            childNodesReader.GetInt32(0).ToString(), _
                            childNodesReader.GetString(1), _
                            childNodesReader.GetString(2))

                            ' Use the SiteMapNode AddNode method to add
                            ' the SiteMapNode to the ChildNodes collection.
                            AddNode(childNode, aRootNode)
                        End While
                    End If

                    childNodesReader.Close()
                    accessConnection.Close()
                End If
                Return aRootNode
            End SyncLock

        End Function 'BuildSiteMap

    End Class

End Namespace

Por último, AccessSiteMapProvider se configura como el proveedor predeterminado en el siguiente archivo Web.config.

<configuration>  
  <system.web>  
    <siteMap defaultProvider="AccessSiteMapProvider">  
     <providers>  
       <add   
         name="AccessSiteMapProvider"  
         type="Samples.AspNet.AccessSiteMapProvider,Samples.AspNet "  
         accessSiteMapConnectionString="PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=sitemap.mdb "/>  
     </providers>   
    </siteMap>  
  </system.web>  
</configuration>  

Comentarios

La StaticSiteMapProvider clase es una implementación parcial de la clase abstracta SiteMapProvider y proporciona dos métodos adicionales: AddNode y RemoveNode, así como los métodos abstractos BuildSiteMap y protegidos Clear .

La StaticSiteMapProvider clase admite la escritura de un proveedor de mapa de sitio (por ejemplo, un XmlSiteMapProvider) que traduce un mapa de sitio que se almacena en un almacenamiento persistente en uno que se almacena en la memoria. La StaticSiteMapProvider clase proporciona implementaciones básicas para almacenar y recuperar SiteMapNode objetos.

Las SiteMapProvider clases y StaticSiteMapProvider admiten el concepto de jerarquía de proveedores de mapa de sitio, donde un proveedor de mapa de sitio puede tener una relación jerárquica con otros proveedores de mapas de sitio. Este patrón se implementa con las RootProvider propiedades y ParentProvider .

La StaticSiteMapProvider clase almacena sus SiteMapNode objetos en tablas hash y usa internamente la SiteMapNode.Url propiedad de las páginas, representada por nodos de mapa del sitio, como claves. (Si un nodo de mapa de sitio no especifica una dirección URL, se realiza un seguimiento mediante una clave única generada automáticamente). Como resultado, no puede tener nodos de mapa de sitio donde se use más de una vez un nodo de mapa de sitio con la misma dirección URL. Por ejemplo, al intentar cargar el nodo de mapa de sitio que se muestra en el ejemplo de código siguiente con la XmlSiteMapProvider clase , que es el proveedor de mapa de sitio predeterminado ASP.NET, o cualquier proveedor de mapa de sitio derivado de la StaticSiteMapProvider clase no funcionará porque la página AboutUs.aspx se usa más de una vez.

<sitemap>  
  <sitemapnode title="Home" description="Home" url="default.aspx" >  
    <sitemapnode title="Catalog" description="Our catalog" url="catalog.aspx"/>  
    <sitemapnode title="About Us" description="All about our company" url="aboutus.aspx"/>  
    <sitemapnode title="Driving Directions" description="Directions to our store" url="aboutus.aspx"/>  
  </sitemapnode>  
</sitemap>  

Si va a extender la StaticSiteMapProvider clase , los tres métodos más importantes son los GetRootNodeCoremétodos , Initializey BuildSiteMap . Los Clear métodos y FindSiteMapNode tienen implementaciones predeterminadas que son suficientes para la mayoría de las implementaciones personalizadas del proveedor de mapas de sitio.

Se Initialize llama al método para inicializar proveedores de mapas de sitio derivados, incluidos los recursos necesarios para cargar los datos del mapa del sitio, pero intenta crear el nodo de mapa del sitio en memoria. Si la clase derivada usa archivos para almacenar datos de mapa del sitio, aquí se puede realizar cualquier inicialización de archivo. Si el nodo de mapa del sitio usa algún otro tipo de almacén de datos, como una base de datos relacional, es posible que la inicialización de una conexión se realice aquí. Los atributos adicionales, como los nombres de archivo o las cadenas de conexión que se colocan en el elemento del proveedor de mapa del sitio en la configuración, se procesan mediante el sistema de configuración de ASP.NET y se pasan al Initialize método con el attributes parámetro .

Todas las clases derivadas de la StaticSiteMapProvider clase deben invalidar el BuildSiteMap método y se llama para cargar el nodo de mapa del sitio desde el almacenamiento persistente y convertirlo en una representación interna. El BuildSiteMap método se llama internamente en muchas de las implementaciones de miembro predeterminadas de las StaticSiteMapProvider clases y XmlSiteMapProvider . Si implementa su propio proveedor de mapa de sitio, asegúrese de que el procesamiento de datos del mapa del sitio se produce una vez y las llamadas posteriores al BuildSiteMap método devuelven inmediatamente, si ya se ha cargado la información del mapa del sitio. Al implementar el BuildSiteMap método , asegúrese de que es seguro para subprocesos, ya que varias solicitudes de página simultáneas pueden dar lugar indirectamente a varias llamadas para cargar la información del mapa del sitio. La infraestructura de mapa de sitio admite la visualización de información del mapa del sitio en función del rol del usuario. Dependiendo de la Roles propiedad admitida por los objetos individuales SiteMapNode , puede existir una estructura de navegación diferente para distintos usuarios. Las implementaciones predeterminadas de los miembros de recuperación del nodo de mapa del sitio de la StaticSiteMapProvider clase realizan el recorte de seguridad automáticamente mediante una llamada al IsAccessibleToUser método .

Los AddNodemétodos , Clear y RemoveNode manipulan las colecciones internas que se usan para realizar un seguimiento de los nodos de mapa del sitio de forma segura para subprocesos.

Notas a los implementadores

Al heredar de la StaticSiteMapProvider clase , debe invalidar el siguiente miembro: BuildSiteMap().

Constructores

StaticSiteMapProvider()

Inicializa una nueva instancia de la clase StaticSiteMapProvider.

Propiedades

CurrentNode

Obtiene el objeto SiteMapNode que representa la página solicitada actualmente.

(Heredado de SiteMapProvider)
Description

Obtiene una descripción breve y fácil de comprender apropiada para mostrarla en las herramientas administrativas u otras interfaces de usuario.

(Heredado de ProviderBase)
EnableLocalization

Obtiene o establece un valor booleano que indica si se van a devolver valores localizados de los atributos SiteMapNode.

(Heredado de SiteMapProvider)
Name

Obtiene el nombre descriptivo utilizado para hacer referencia al proveedor durante la configuración.

(Heredado de ProviderBase)
ParentProvider

Obtiene o establece el objeto SiteMapProvider primario del proveedor actual.

(Heredado de SiteMapProvider)
ResourceKey

Obtiene o establece la clave de recurso utilizada para localizar los atributos SiteMapNode.

(Heredado de SiteMapProvider)
RootNode

Obtiene objeto SiteMapNode raíz de los datos del mapa del sitio representado por el proveedor actual.

(Heredado de SiteMapProvider)
RootProvider

Obtiene el objeto SiteMapProvider raíz de la jerarquía de proveedores actual.

(Heredado de SiteMapProvider)
SecurityTrimmingEnabled

Obtiene un valor booleano que indica si un proveedor del mapa del sitio filtra los nodos del mapa del sitio basándose en el rol de un usuario.

(Heredado de SiteMapProvider)

Métodos

AddNode(SiteMapNode)

Agrega un objeto SiteMapNode a la colección de nodos mantenida por el proveedor del mapa del sitio.

(Heredado de SiteMapProvider)
AddNode(SiteMapNode, SiteMapNode)

Agrega SiteMapNode a las colecciones mantenidas por el proveedor del mapa del sitio y establece una relación de elemento primario/secundario entre los objetos SiteMapNode.

BuildSiteMap()

Cuando se reemplaza en una clase derivada, carga la información del mapa del sitio del almacenamiento persistente y lo crea en la memoria.

Clear()

Quita todos los elementos de las colecciones de nodos secundarios y primarios del mapa del sitio cuyo seguimiento efectúa StaticSiteMapProvider como parte de su estado.

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.

(Heredado de Object)
FindSiteMapNode(HttpContext)

Recupera un objeto SiteMapNode que representa la página solicitada actualmente mediante el objeto HttpContext especificado.

(Heredado de SiteMapProvider)
FindSiteMapNode(String)

Recupera un objeto SiteMapNode que representa la página en la dirección URL especificada.

FindSiteMapNodeFromKey(String)

Recupera un objeto SiteMapNode basándose en una clave especificada.

GetChildNodes(SiteMapNode)

Recupera los nodos secundarios del mapa del sitio de un objeto SiteMapNode concreto.

GetCurrentNodeAndHintAncestorNodes(Int32)

Proporciona un método de búsqueda optimizado para los proveedores del mapa del sitio en las operaciones de recuperación de un nodo para hallar la página solicitada actualmente y de extracción de los nodos primarios y antecesores del mapa del sitio correspondientes a la página actual.

(Heredado de SiteMapProvider)
GetCurrentNodeAndHintNeighborhoodNodes(Int32, Int32)

Proporciona un método de búsqueda optimizado para los proveedores del mapa del sitio en las operaciones de recuperación de un nodo para hallar la página solicitada actualmente y de extracción de los nodos del mapa del sitio próximos al nodo actual.

(Heredado de SiteMapProvider)
GetHashCode()

Sirve como la función hash predeterminada.

(Heredado de Object)
GetParentNode(SiteMapNode)

Recupera el nodo primario del mapa del sitio de un objeto SiteMapNode concreto.

GetParentNodeRelativeToCurrentNodeAndHintDownFromParent(Int32, Int32)

Proporciona un método de búsqueda optimizado para los proveedores del mapa del sitio al recuperar un nodo antecesor correspondiente a la página solicitada actualmente y extraer los nodos descendientes del antecesor.

(Heredado de SiteMapProvider)
GetParentNodeRelativeToNodeAndHintDownFromParent(SiteMapNode, Int32, Int32)

Proporciona un método de búsqueda optimizado para los proveedores del mapa del sitio al recuperar un nodo antecesor para el objeto SiteMapNode especificado y extraer sus nodos secundarios.

(Heredado de SiteMapProvider)
GetRootNodeCore()

Cuando se reemplaza en una clase derivada, se recupera el nodo raíz de todos los nodos administrados actualmente por el proveedor actual.

(Heredado de SiteMapProvider)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
HintAncestorNodes(SiteMapNode, Int32)

Proporciona un método que los proveedores del mapa del sitio pueden reemplazar para realizar una recuperación optimizada de uno o más niveles de nodos primarios y antecesores, de manera relativa al objeto SiteMapNode especificado.

(Heredado de SiteMapProvider)
HintNeighborhoodNodes(SiteMapNode, Int32, Int32)

Proporciona un método que los proveedores del mapa del sitio pueden reemplazar para realizar una recuperación optimizada de los nodos próximos al nodo especificado.

(Heredado de SiteMapProvider)
Initialize(String, NameValueCollection)

Inicializa la implementación de SiteMapProvider, incluyendo todos los recursos necesarios para cargar los datos del mapa del sitio desde el almacenamiento persistente.

(Heredado de SiteMapProvider)
IsAccessibleToUser(HttpContext, SiteMapNode)

Recupera un valor booleano que indica si el usuario puede ver el objeto SiteMapNode especificado en el contexto indicado.

(Heredado de SiteMapProvider)
MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
RemoveNode(SiteMapNode)

Quita el objeto SiteMapNode especificado de todas las colecciones de nodos del mapa del sitio cuyo seguimiento realiza el proveedor del mapa del sitio.

ResolveSiteMapNode(HttpContext)

Genera el evento SiteMapResolve.

(Heredado de SiteMapProvider)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Eventos

SiteMapResolve

Se produce cuando se llama a la propiedad CurrentNode.

(Heredado de SiteMapProvider)

Se aplica a

Consulte también