SiteMapProviderとは? わかりやすく解説

SiteMap.Provider プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

現在のサイト マップ既定の SiteMapProvider オブジェクト取得します

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Shared ReadOnly Property
 Provider As SiteMapProvider
Dim value As SiteMapProvider

value = SiteMap.Provider
public static SiteMapProvider Provider { get;
 }
public:
static property SiteMapProvider^ Provider {
    SiteMapProvider^ get ();
}
/** @property */
public static SiteMapProvider get_Provider
 ()

プロパティ
SiteMap既定サイト マップ プロバイダ

例外例外
例外種類条件

InvalidOperationException

このサイト マップ機能無効になっています。

ConfigurationErrorsException

構成指定されている既定プロバイダ存在しません。

HttpException

この機能は、信頼性が低以上の場合にのみサポートされます。

解説解説
使用例使用例

サイト既定SiteMapProvider オブジェクト静的プロパティ Provider使用してアクセスする方法コード例次に示します

<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<SCRIPT runat="server">
Private Sub Page_Load(Sender As
 Object, E As EventArgs)

    ' Navigate the SiteMap built by the default SiteMapProvider.
    Response.Write(SiteMap.RootNode.ToString() & "<BR>")

    Response.Write(SiteMap.RootNode.Url & "<BR>")
    Response.Write(SiteMap.RootNode.Title & "<BR>")

    Dim sitemapnode As SiteMapNode
    For Each sitemapnode In
 SiteMap.RootNode.ChildNodes
        ' Iterate through the ChildNodes SiteMapNodesCollection
        ' maintained by the RootNode.
        Response.Write(sitemapnode.Url & "<BR>"
 )
    Next

    Dim providers As IDictionaryEnumerator
 = SiteMap.Providers.GetEnumerator()
    While (providers.MoveNext())
        Response.Write(providers.Current)
        Response.Write("&nbsp;&nbsp;&nbsp;")
        Response.Write("<BR>")
    End While
End Sub ' Page_Load

</SCRIPT>
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<SCRIPT runat="server">
private void Page_Load(object sender, System.EventArgs
 e)
{
    // Navigate the SiteMap built by the default SiteMapProvider.
    Response.Write(SiteMap.RootNode.ToString() + "<BR>");

    Response.Write(SiteMap.RootNode.Url + "<BR>");
    Response.Write(SiteMap.RootNode.Title + "<BR>");

    foreach (SiteMapNode sitemapnode in SiteMap.RootNode.ChildNodes)
    {
        // Iterate through the ChildNodes SiteMapNodesCollection
        // maintained by the RootNode.
        Response.Write(sitemapnode.Url + "<BR>" );
    }

    IEnumerator providers = SiteMap.Providers.GetEnumerator();
    while (providers.MoveNext())
    {
        Response.Write(providers.Current);
        Response.Write("&nbsp;&nbsp;&nbsp;");
        Response.Write("<BR>");
    }
}
</SCRIPT>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMap クラス
SiteMap メンバ
System.Web 名前空間
Providers
SiteMapProvider
StaticSiteMapProvider

SiteMapProvider イベント


SiteMapProvider クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

すべてのサイト マップ データ プロバイダに共通基本クラス提供しますまた、SiteMap オブジェクト永続記憶領域として ASP.NET サイト マップ インフラストラクチャ組み合わせて使用できるカスタム サイト マップ データ プロバイダ実装する手段提供します

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public MustInherit Class
 SiteMapProvider
    Inherits ProviderBase
Dim instance As SiteMapProvider
public abstract class SiteMapProvider : ProviderBase
public ref class SiteMapProvider abstract :
 public ProviderBase
public abstract class SiteMapProvider extends
 ProviderBase
public abstract class SiteMapProvider extends
 ProviderBase
解説解説

StaticSiteMapProvider クラスと XmlSiteMapProvider クラスは、SiteMapProvider 抽象クラス既定実装表しますXmlSiteMapProvider では、Web.sitemap という名前の XML ファイル使用してサイト マップ データ保存します。Web.sitemap ファイル詳細については、「ASP.NET サイト マップ」を参照してください

SiteMapProvider クラスは、RootProvider プロパティと ParentProvider プロパティ宣言することで、サイト マップ プロバイダ階層概念サポートしますSiteMapProvider は、他のプロバイダの親にも子にもなれます。これにより、サイトさまざまなコンテンツ領域が、独自のサイト マップおよびサイト マップ プロバイダ管理する別の開発グループによって所有または実装される、というシナリオ実現できます

SiteMapProvider オブジェクトはすべて Web.config ファイル構成されます。この構成ファイル宣言されているサイト マップ プロバイダはすべて実行時読み込まれサイト ナビゲーション データ読み込みと処理に使用されます。SiteMap オブジェクトは、その Providers プロパティ コレクション使用して使用可能なすべてのプロバイダ追跡します。このオブジェクトは、プロバイダ管理するナビゲーション データへのプログラム使用したアクセス実現します。Web.config ファイルサイト マップ プロバイダ宣言使用する形式コード例次に示します

<siteMap defaultProvider="<name>">
  <providers>
    <add
      name="<friendly name>"
      type="<class name>, <fully-qualified type name>" 
      siteMapFile = "<file name>" />
  </providers>
</siteMap>

プロバイダによって読み込まれサイト ナビゲーション データは、SiteMapPath コントロールおよび TreeView コントロールなど、サイト マップ インフラストラクチャ別のコンポーネントによって、ユーザーサイト マップ情報表示するために使用されます。

独自のサイト マップ プロバイダ実装する場合ソース ファイルASP.NET アプリケーションの App_Code ディレクトリ配置すると、アセンブリ自動的にコンパイルされますまた、独自のサイト マップ プロバイダグローバル アセンブリ キャッシュ (GAC: Global Assembly Cache) に配置して、そのプロバイダへの完全修参照を Web.config ファイル指定することもできますコンパイラ サービスの詳細については、「アセンブリグローバル アセンブリ キャッシュ使用」を参照してください

継承時の注意 SiteMapProvider クラスから継承する場合、GetRootNodeCore、FindSiteMapNode、GetChildNodes、GetParentNode の各メンバオーバーライドする必要があります

使用例使用例

SiteMapProvider 抽象クラス実装するクラス記述する方法次のコード例示します。この例では、サイト マップ情報読み込み必要な構造準拠したコンマ区切りファイル使用します。このファイル先頭行はサイト マップルート ノード表し後続の行はサブノードを表します。各サブノードの親ノードURL識別します。この条件を満たすファイルの例次に示します

default.aspx,Home,MyCompany Home Page,
sale.aspx,Now On Sale,Check Out These Great Deals!,default.aspx
catalog.aspx,Online Catalog,Browse Our Many Great Items!,default.aspx

SimpleTextSiteMapProvider は、SiteMapProviderすべてのプロパティメソッド実装例です。

Imports System
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Configuration.Provider
Imports System.IO
Imports System.Security.Permissions
Imports System.Web

Namespace Samples.AspNet.VB

  <AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)>
 _
  Public Class SimpleTextSiteMapProvider
    Inherits SiteMapProvider

    Private parentSiteMapProvider As SiteMapProvider
 = Nothing
    Private simpleTextProviderName As String
 = Nothing
    Private sourceFilename As String
 = Nothing
    Private aRootNode As SiteMapNode = Nothing
    Private siteMapNodes As ArrayList = Nothing
    Private childParentRelationship As ArrayList
 = Nothing

    ' A default constructor. The Name property is initialized in the
    ' Initialize method.
    Public Sub New()
    End Sub 'New

    ' Implement the CurrentNode property.
    Public Overrides ReadOnly
 Property CurrentNode() As SiteMapNode
      Get
        Dim currentUrl As String
 = FindCurrentUrl()
        ' Find the SiteMapNode that represents the current page.
        Dim aCurrentNode As SiteMapNode = FindSiteMapNode(currentUrl)
        Return aCurrentNode
      End Get
    End Property

    ' Implement the RootNode property.
    Public Overrides ReadOnly
 Property RootNode() As SiteMapNode
      Get
        Return aRootNode
      End Get
    End Property

    ' Implement the ParentProvider property.
    Public Overrides Property
 ParentProvider() As SiteMapProvider
      Get
        Return parentSiteMapProvider
      End Get
      Set(ByVal value As
 SiteMapProvider)
        parentSiteMapProvider = Value
      End Set
    End Property

    ' Implement the RootProvider property.
    Public Overrides ReadOnly
 Property RootProvider() As SiteMapProvider
      Get
        ' If the current instance belongs to a provider hierarchy, it
        ' cannot be the RootProvider. Rely on the ParentProvider.
        If Not (Me.ParentProvider
 Is Nothing) Then
          Return ParentProvider.RootProvider
          ' If the current instance does not have a ParentProvider,
 it is
          ' not a child in a hierarchy, and can be the RootProvider.
        Else
          Return Me
        End If
      End Get
    End Property

    ' Implement the FindSiteMapNode method.
    Public Overrides Function
 FindSiteMapNode(ByVal rawUrl As String)
 As SiteMapNode
      ' Does the root node match the URL?
      If RootNode.Url = rawUrl Then
        Return RootNode
      Else
        Dim candidate As SiteMapNode = Nothing
        ' Retrieve the SiteMapNode that matches the URL.
        SyncLock Me
          candidate = GetNode(siteMapNodes, rawUrl)
        End SyncLock
        Return candidate
      End If
    End Function 'FindSiteMapNode

    ' Implement the GetChildNodes method.
    Public Overrides Function
 GetChildNodes(ByVal node As SiteMapNode)
 As SiteMapNodeCollection
      Dim children As New
 SiteMapNodeCollection()
      ' Iterate through the ArrayList and find all nodes that have the
 specified node as a parent.
      SyncLock Me
        Dim i As Integer
        For i = 0 To childParentRelationship.Count
 - 1

          Dim de As DictionaryEntry = CType(childParentRelationship(i),
 DictionaryEntry)
          Dim nodeUrl As String
 = CType(de.Key, String)

          Dim parent As SiteMapNode = GetNode(childParentRelationship,
 nodeUrl)

          If Not (parent Is
 Nothing) AndAlso node.Url = parent.Url Then
            ' The SiteMapNode with the Url that corresponds to nodeUrl
            ' is a child of the specified node. Get the SiteMapNode
 for
            ' the nodeUrl.
            Dim child As SiteMapNode = FindSiteMapNode(nodeUrl)
            If Not (child Is
 Nothing) Then
              children.Add(CType(child, SiteMapNode))
            Else
              Throw New Exception("ArrayLists
 not in sync.")
            End If
          End If
        Next i
      End SyncLock
      Return children
    End Function 'GetChildNodes

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

    ' Implement the GetParentNode method.
    Public Overrides Function
 GetParentNode(ByVal node As SiteMapNode)
 As SiteMapNode
      ' Check the childParentRelationship table and find the parent
 of the current node.
      ' If there is no parent, the current node is the RootNode.
      Dim parent As SiteMapNode = Nothing
      SyncLock Me
        ' Get the Value of the node in childParentRelationship
        parent = GetNode(childParentRelationship, node.Url)
      End SyncLock
      Return parent
    End Function 'GetParentNode

    ' Implement the ProviderBase.Initialize method.
    ' Initialize is used to initialize the state that the Provider holds,
 but
    ' not actually build the site map.
    Public Overrides Sub
 Initialize(ByVal name As String,
 ByVal attributes As NameValueCollection)
      SyncLock Me
        MyBase.Initialize(name, attributes)
        simpleTextProviderName = name
        sourceFilename = attributes("siteMapFile")
        siteMapNodes = New ArrayList()
        childParentRelationship = New ArrayList()
        ' Build the site map in memory.
        LoadSiteMapFromStore()
      End SyncLock
    End Sub 'Initialize

    ' Private helper methods
    Private Function GetNode(ByVal
 list As ArrayList, ByVal url As
 String) As SiteMapNode
      Dim i As Integer
      For i = 0 To list.Count - 1
        Dim item As DictionaryEntry = CType(list(i),
 DictionaryEntry)
        If CStr(item.Key) = url Then
          Return CType(item.Value, SiteMapNode)
        End If
      Next i
      Return Nothing
    End Function 'GetNode


    ' Get the URL of the currently displayed page.
    Private Function FindCurrentUrl() As
 String
      Try
        ' The current HttpContext.
        Dim currentContext As HttpContext =
 HttpContext.Current
        If Not (currentContext Is
 Nothing) Then
          Return currentContext.Request.RawUrl
        Else
          Throw New Exception("HttpContext.Current
 is Invalid")
        End If
      Catch e As Exception
        Throw New NotSupportedException("This
 provider requires a valid context.", e)
      End Try
    End Function 'FindCurrentUrl

    Protected Overridable Sub
 LoadSiteMapFromStore()
      Dim pathToOpen As String
      SyncLock Me
        ' If a root node exists, LoadSiteMapFromStore has already
        ' been called, and the method can return.
        If Not (aRootNode Is
 Nothing) Then
          Return
        Else
          pathToOpen = HttpContext.Current.Server.MapPath("~"
 & "\\" & sourceFilename)
          If File.Exists(pathToOpen) Then
            ' Open the file to read from.
            Dim sr As StreamReader = File.OpenText(pathToOpen)
            Try

              ' Clear the state of the collections and aRootNode
              aRootNode = Nothing
              siteMapNodes.Clear()
              childParentRelationship.Clear()

              ' Parse the file and build the site map
              Dim s As String
 = ""
              Dim nodeValues As String()
 = Nothing
              Dim temp As SiteMapNode = Nothing

              Do
                s = sr.ReadLine()

                If Not s Is
 Nothing Then
                  ' Build the various SiteMapNode objects and add
                  ' them to the ArrayList collections. The format used
                  ' is: URL,TITLE,DESCRIPTION,PARENTURL
                  nodeValues = s.Split(","c)

                  temp = New SiteMapNode(Me,
 _
                      HttpRuntime.AppDomainAppVirtualPath & "/"
 & nodeValues(0), _
                      HttpRuntime.AppDomainAppVirtualPath & "/"
 & nodeValues(0), _
                      nodeValues(1), _
                      nodeValues(2))

                  ' Is this a root node yet?
                  If aRootNode Is Nothing
 AndAlso _
                    (nodeValues(3) Is Nothing
 OrElse _
                     nodeValues(3) = String.Empty) Then
                    aRootNode = temp

                    ' If not the root node, add the node to the various
 collections.
                  Else

                    siteMapNodes.Add(New DictionaryEntry(temp.Url,
 temp))

                    ' The parent node has already been added to the
 collection.
                    Dim parentNode As SiteMapNode
 = _
                        FindSiteMapNode(HttpRuntime.AppDomainAppVirtualPath &
 "/" & nodeValues(3))

                    If Not (parentNode Is
 Nothing) Then
                      childParentRelationship.Add(New DictionaryEntry(temp.Url,
 parentNode))
                    Else
                      Throw New Exception("Parent
 node not found for current node.")
                    End If
                  End If
                End If
              Loop Until s Is
 Nothing
            Finally
              sr.Close()
            End Try
          Else
            Throw New Exception("File
 not found")
          End If
        End If
      End SyncLock
      Return
    End Sub 'LoadSiteMapFromStore
  End Class 'SimpleTextSiteMapProvider
End Namespace
using System;
using System.Configuration.Provider;
using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Security.Permissions;
using System.Web;

namespace Samples.AspNet.CS
{

  [AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
  public class SimpleTextSiteMapProvider :
 SiteMapProvider
  {
    private SiteMapProvider parentSiteMapProvider = null;
    private string simpleTextProviderName =
 null;
    private string sourceFilename = null;
    private SiteMapNode rootNode = null;
    private ArrayList siteMapNodes = null;
    private ArrayList childParentRelationship = null;


    // A default constructor. The Name property is initialized in the
    // Initialize method.
    public SimpleTextSiteMapProvider()
    {
    }
    // Implement the CurrentNode property.
    public override SiteMapNode CurrentNode
    {
      get
      {
        string currentUrl = FindCurrentUrl();
        // Find the SiteMapNode that represents the current page.
        SiteMapNode currentNode = FindSiteMapNode(currentUrl);
        return currentNode;
      }
    }

    // Implement the RootNode property.
    public override SiteMapNode RootNode
    {
      get
      {
        return rootNode;
      }
    }
    // Implement the ParentProvider property.
    public override SiteMapProvider ParentProvider
    {
      get
      {
        return parentSiteMapProvider;
      }
      set
      {
        parentSiteMapProvider = value;
      }
    }

    // Implement the RootProvider property.
    public override SiteMapProvider RootProvider
    {
      get
      {
        // If the current instance belongs to a provider hierarchy,
 it
        // cannot be the RootProvider. Rely on the ParentProvider.
        if (this.ParentProvider != null)
        {
          return ParentProvider.RootProvider;
        }
        // If the current instance does not have a ParentProvider, it
 is
        // not a child in a hierarchy, and can be the RootProvider.
        else
        {
          return this;
        }
      }
    }
    // Implement the FindSiteMapNode method.
    public override SiteMapNode FindSiteMapNode(string
 rawUrl)
    {

      // Does the root node match the URL?
      if (RootNode.Url == rawUrl)
      {
        return RootNode;
      }
      else
      {
        SiteMapNode candidate = null;
        // Retrieve the SiteMapNode that matches the URL.
        lock (this)
        {
          candidate = GetNode(siteMapNodes, rawUrl);
        }
        return candidate;
      }
    }
    // Implement the GetChildNodes method.
    public override SiteMapNodeCollection GetChildNodes(SiteMapNode
 node)
    {
      SiteMapNodeCollection children = new SiteMapNodeCollection();
      // Iterate through the ArrayList and find all nodes that have
 the specified node as a parent.
      lock (this)
      {
        for (int i = 0; i < childParentRelationship.Count;
 i++)
        {

          string nodeUrl = ((DictionaryEntry)childParentRelationship[i]).Key
 as string;

          SiteMapNode parent = GetNode(childParentRelationship, nodeUrl);

          if (parent != null && node.Url
 == parent.Url)
          {
            // The SiteMapNode with the Url that corresponds to nodeUrl
            // is a child of the specified node. Get the SiteMapNode
 for
            // the nodeUrl.
            SiteMapNode child = FindSiteMapNode(nodeUrl);
            if (child != null)
            {
              children.Add(child as SiteMapNode);
            }
            else
            {
              throw new Exception("ArrayLists not in
 sync.");
            }
          }
        }
      }
      return children;
    }
    protected override SiteMapNode GetRootNodeCore()
    {
      return RootNode;
    }
    // Implement the GetParentNode method.
    public override SiteMapNode GetParentNode(SiteMapNode node)
    {
      // Check the childParentRelationship table and find the parent
 of the current node.
      // If there is no parent, the current node is the RootNode.
      SiteMapNode parent = null;
      lock (this)
      {
        // Get the Value of the node in childParentRelationship
        parent = GetNode(childParentRelationship, node.Url);
      }
      return parent;
    }

    // Implement the ProviderBase.Initialize property.
    // Initialize is used to initialize the state that the Provider
 holds, but
    // not actually build the site map.
    public override void Initialize(string
 name, NameValueCollection attributes)
    {

      lock (this)
      {

        base.Initialize(name, attributes);

        simpleTextProviderName = name;
        sourceFilename = attributes["siteMapFile"];
        siteMapNodes = new ArrayList();
        childParentRelationship = new ArrayList();

        // Build the site map in memory.
        LoadSiteMapFromStore();
      }
    }
    // Private helper methods

    private SiteMapNode GetNode(ArrayList list, string
 url)
    {
      for (int i = 0; i < list.Count; i++)
      {
        DictionaryEntry item = (DictionaryEntry)list[i];
        if ((string)item.Key == url)
          return item.Value as SiteMapNode;
      }
      return null;
    }

    // Get the URL of the currently displayed page.
    private string FindCurrentUrl()
    {
      try
      {
        // The current HttpContext.
        HttpContext currentContext = HttpContext.Current;
        if (currentContext != null)
        {
          return currentContext.Request.RawUrl;
        }
        else
        {
          throw new Exception("HttpContext.Current is Invalid");
        }
      }
      catch (Exception e)
      {
        throw new NotSupportedException("This provider requires
 a valid context.",e);
      }
    }
    protected virtual void LoadSiteMapFromStore()
    {
      string pathToOpen;

      lock (this)
      {
        // If a root node exists, LoadSiteMapFromStore has already
        // been called, and the method can return.
        if (rootNode != null)
        {
          return;
        }
        else
        {
          pathToOpen = HttpContext.Current.Server.MapPath("~" + "\\"
 + sourceFilename);

          if (File.Exists(pathToOpen))
          {
            // Open the file to read from.
            using (StreamReader sr = File.OpenText(pathToOpen))
            {

              // Clear the state of the collections and rootNode
              rootNode = null;
              siteMapNodes.Clear();
              childParentRelationship.Clear();

              // Parse the file and build the site map
              string s = "";
              string[] nodeValues = null;
              SiteMapNode temp = null;

              while ((s = sr.ReadLine()) != null)
              {

                // Build the various SiteMapNode objects and add
                // them to the ArrayList collections. The format used
                // is: URL,TITLE,DESCRIPTION,PARENTURL

                nodeValues = s.Split(',');

                temp = new SiteMapNode(this
,
                    HttpRuntime.AppDomainAppVirtualPath + "/" + nodeValues[0]
,
                    HttpRuntime.AppDomainAppVirtualPath + "/" + nodeValues[0]
,
                    nodeValues[1],
                    nodeValues[2]);

                // Is this a root node yet?
                if (null == rootNode &&
                    (null == nodeValues[3] || nodeValues[3] ==
 String.Empty))
                {
                  rootNode = temp;
                }

              // If not the root node, add the node to the various collections.
                else
                {
                  siteMapNodes.Add(new DictionaryEntry(temp.Url,
 temp));
                  // The parent node has already been added to the collection.
                  SiteMapNode parentNode =
                           FindSiteMapNode(HttpRuntime.AppDomainAppVirtualPath +
 "/" + nodeValues[3]);
                  if (parentNode != null)
                  {
                    childParentRelationship.Add(new DictionaryEntry(temp.Url,
 parentNode));
                  }
                  else
                  {
                    throw new Exception("Parent node not
 found for current node.");
                  }
                }
              }
            }
          }
          else
          {
            throw new Exception("File not found");
          }
        }
      }
      return;
    }
  }

}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.Configuration.Provider.ProviderBase
    System.Web.SiteMapProvider
       System.Web.StaticSiteMapProvider
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

SiteMapProvider コンストラクタ


SiteMapProvider プロパティ


パブリック プロパティパブリック プロパティ

参照参照

SiteMapProvider メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド FindSiteMapNode オーバーロードされます派生クラスオーバーライドされた場合は、ページを表す SiteMapNode オブジェクト取得します
パブリック メソッド FindSiteMapNodeFromKey 指定したキー基づいて SiteMapNode オブジェクト取得します
パブリック メソッド GetChildNodes 派生クラスオーバーライドされた場合は、特定の SiteMapNode の子ノード取得します
パブリック メソッド GetCurrentNodeAndHintAncestorNodes 現在要求されているページノード検索し現在のページの親および先祖サイト マップ ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetCurrentNodeAndHintNeighborhoodNodes 現在要求されているページノード検索し現在のノード近くサイト マップ ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetParentNode 派生クラスオーバーライドされた場合は、特定の SiteMapNode オブジェクト親ノード取得します
パブリック メソッド GetParentNodeRelativeToCurrentNodeAndHintDownFromParent 現在要求されているページ先祖ノード検索しその先の子ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetParentNodeRelativeToNodeAndHintDownFromParent 指定した SiteMapNode オブジェクト先祖ノード取得してその子ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド HintAncestorNodes サイト マップ プロバイダオーバーライドして、指定した SiteMapNode オブジェクト相対として 1 つ上のレベル親ノード先祖ノード最適化された取得実行できるメソッド提供します
パブリック メソッド HintNeighborhoodNodes サイト マップ プロバイダオーバーライドして、指定したノード近く見つかったノード最適化された取得実行できるメソッド提供します
パブリック メソッド Initialize オーバーライドされます。 SiteMapProvider 実装初期化します。対象には、サイト マップ データ永続ストレージから読み込むために必要なリソースがすべて含まれます。
パブリック メソッド IsAccessibleToUser 指定した SiteMapNode オブジェクト指定したコンテキストユーザー表示できるかどうかを示すブール値を取得します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

SiteMapProvider メンバ

すべてのサイト マップ データ プロバイダに共通基本クラス提供しますまた、SiteMap オブジェクト永続記憶領域として ASP.NET サイト マップ インフラストラクチャ組み合わせて使用できるカスタム サイト マップ データ プロバイダ実装する手段提供します

SiteMapProvider データ型公開されるメンバを以下の表に示します


プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド SiteMapProvider SiteMapProvider クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド FindSiteMapNode オーバーロードされます派生クラスオーバーライドされた場合は、ページを表す SiteMapNode オブジェクト取得します
パブリック メソッド FindSiteMapNodeFromKey 指定したキー基づいて SiteMapNode オブジェクト取得します
パブリック メソッド GetChildNodes 派生クラスオーバーライドされた場合は、特定の SiteMapNode の子ノード取得します
パブリック メソッド GetCurrentNodeAndHintAncestorNodes 現在要求されているページノード検索し現在のページの親および先祖サイト マップ ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetCurrentNodeAndHintNeighborhoodNodes 現在要求されているページノード検索し現在のノード近くサイト マップ ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetParentNode 派生クラスオーバーライドされた場合は、特定の SiteMapNode オブジェクト親ノード取得します
パブリック メソッド GetParentNodeRelativeToCurrentNodeAndHintDownFromParent 現在要求されているページ先祖ノード検索しその先の子ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetParentNodeRelativeToNodeAndHintDownFromParent 指定した SiteMapNode オブジェクト先祖ノード取得してその子ノードフェッチする際に、最適化された検索メソッドサイト マップ プロバイダ提供します
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド HintAncestorNodes サイト マップ プロバイダオーバーライドして、指定した SiteMapNode オブジェクト相対として 1 つ上のレベル親ノード先祖ノード最適化された取得実行できるメソッド提供します
パブリック メソッド HintNeighborhoodNodes サイト マップ プロバイダオーバーライドして、指定したノード近く見つかったノード最適化された取得実行できるメソッド提供します
パブリック メソッド Initialize オーバーライドされます。 SiteMapProvider 実装初期化します。対象には、サイト マップ データ永続ストレージから読み込むために必要なリソースがすべて含まれます。
パブリック メソッド IsAccessibleToUser 指定した SiteMapNode オブジェクト指定したコンテキストユーザー表示できるかどうかを示すブール値を取得します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
パブリック イベントパブリック イベント
  名前 説明
パブリック イベント SiteMapResolve CurrentNode プロパティ呼び出される発生します
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SiteMapProvider」の関連用語

SiteMapProviderのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SiteMapProviderのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS