StaticSiteMapProvider イベント


関連項目
StaticSiteMapProvider クラスSystem.Web 名前空間
SiteMapProvider クラス
XmlSiteMapProvider
SiteMapNode クラス
SiteMap クラス
その他の技術情報
ASP.NET サイト ナビゲーションの概要ASP.NET サイト マップ
ASP.NET サイト ナビゲーション プロバイダ
StaticSiteMapProvider クラス
アセンブリ: System.Web (system.web.dll 内)


StaticSiteMapProvider は、SiteMapProvider 抽象クラスの部分実装で、AddNode メソッドと RemoveNode メソッドの 2 つの追加メソッド、BuildSiteMap 抽象メソッド、および Clear 保護メソッドを提供します。
StaticSiteMapProvider クラスは、永続ストレージに格納するサイト マップをメモリに格納するサイト マップに変換するサイト マップ プロバイダの作成をサポートします (XmlSiteMapProvider など)。StaticSiteMapProvider クラスは、SiteMapNode オブジェクトの格納と取得に使用する基本実装を提供します。
SiteMapProvider クラスと StaticSiteMapProvider クラスは、サイト マップ プロバイダ階層の概念をサポートします。この概念では、サイト マップ プロバイダは他のサイト マップ プロバイダとの階層関係を持つことができます。このパターンは RootProvider プロパティと ParentProvider プロパティで実装されます。
StaticSiteMapProvider クラスは、その SiteMapNode オブジェクトをハッシュ テーブルに格納し、サイト マップ ノードが表すページの SiteMapNode.Url プロパティを内部的にキーとして使用します (サイト マップ ノードが URL を指定しない場合は、自動生成された一意のキーを使用して追跡されます)。このため、サイト マップ ノードの中で同じ URL を持つサイト マップ ノードを複数回使用することはできません。たとえば、次のコード例に示されているサイト マップ ノードの読み込みに、既定の ASP.NET サイト マップ プロバイダである XmlSiteMapProvider クラスを使用した場合、または StaticSiteMapProvider クラスの派生であるサイト マップ プロバイダを使用した場合は、AboutUs.aspx ページが複数回使用されているため、失敗します。
<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>
StaticSiteMapProvider クラスを拡張する場合、最も重要なメソッドは GetRootNodeCore、Initialize、および BuildSiteMap の 3 つのメソッドです。Clear メソッドと FindSiteMapNode メソッドには、ほとんどのカスタム サイト マップ プロバイダの実装に十分な既定の実装が用意されています。
Initialize メソッドは、呼び出されると、サイト マップ データの読み込みに必要なすべてのリソースも含めて、サイト マップ プロバイダを初期化しますが、メモリ内でのサイト マップ ノードの構築は試みません。派生クラスでサイト マップ データの保存にファイルを使用する場合、ファイルの初期化はすべてこのメソッドで実行できます。サイト マップ ノードがリレーショナル データベースなどの別の種類のデータ ストアを使用する場合、接続の初期化がこのメソッドで実行されます。構成のサイト マップ プロバイダ要素に指定されているファイル名や接続文字列などの追加属性は、ASP.NET 構成システムによって処理され、Initialize メソッドに attributes パラメータを使用して渡されます。
BuildSiteMap メソッドは、StaticSiteMapProvider クラスから派生したすべてのクラスによってオーバーライドされる必要があります。このメソッドは、サイト マップ ノードを永続ストレージから読み込み、それを内部表現に変換するために呼び出されます。BuildSiteMap メソッドは、StaticSiteMapProvider クラスと XmlSiteMapProvider クラスの数多くの既定のメンバ実装で内部的に呼び出されます。独自のサイト マップ プロバイダを実装する場合は、サイト マップ データの処理を 1 度に限定し、サイト マップ情報が読み込み済みの場合は、それ以降に BuildSiteMap メソッドを呼び出しても制御がすぐに戻るようにしてください。ページが同時に複数要求されると、サイト マップ情報の読み込みが間接的に複数呼び出されることになるため、BuildSiteMap メソッドを実装する場合は、スレッド セーフであることを確認してください。サイト マップ インフラストラクチャは、ユーザーのロールに基づいたサイト マップ情報の表示をサポートします。個々の SiteMapNode オブジェクトがサポートする Roles プロパティに応じて、ユーザーごとにナビゲーション構造を変えることができます。StaticSiteMapProvider クラスのサイト マップ ノード取得メンバの既定の実装は、IsAccessibleToUser メソッドを呼び出して、セキュリティ トリミングを自動的に実行します。
AddNode, Clear メソッドと RemoveNode メソッドは、サイト マップ ノードをスレッド セーフな方法で追跡するために使用する内部コレクションを操作します。
継承時の注意 StaticSiteMapProvider クラスから継承する場合は、BuildSiteMap のメンバをオーバーライドする必要があります。
StaticSiteMapProvider クラスを拡張して Microsoft Access をサイト マップ プロバイダとして使用する方法を次のコード例に示します。AccessSiteMapProvider クラスは、深さレベル 1 のシンプルな階層をサポートするサイト マップ プロバイダです。サイト マップ データの格納先テーブルの構造は次のとおりです。
NODEID URL NAME PARENTNODEID --------------------------------------------- 1 default.aspx Default <NULL> 2 catalog.aspx Catalog 1 3 aboutus.aspx Contact Us 1 ...
AccessSiteMapProvider クラスは StaticSiteMapProvider クラスの派生クラスで、SQL クエリ、OleDbCommand オブジェクト、および OleDbDataReader オブジェクトを使用して、Microsoft Access データベースから情報を取得します。
Imports System 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 'New ' 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 'Initialize ' 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 'Clear ' 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 'AccessSiteMapProvider End Namespace
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; } } } }
#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 ); } } };
package Samples.AspNet.JSL; import System.*; import System.Collections.*; import System.Collections.Specialized.*; import System.Data.*; import System.Data.OleDb.*; import System.Web.*; import System.Configuration.*; /// An extremely simple AccessSiteMapProvider that only supports a /// site map node hierarchy 1 level deep. public class AccessSiteMapProvider extends StaticSiteMapProvider { private SiteMapNode rootNode = null; private OleDbConnection accessConnection = null; // This string is case sensitive. public String accessConnectionStringName = "accessSiteMapConnectionString"; // Implement a default constructor. public AccessSiteMapProvider() { } //AccessSiteMapProvider // Some basic state to help track the initialization state of the provider. private boolean initialized = false; /** @property */ public boolean get_IsInitialized() { return initialized; } //get_IsInitized. // Return the root node of the current site map. /** @property */ public SiteMapNode get_RootNode() throws Exception { SiteMapNode temp = null; temp = BuildSiteMap(); return temp; } //get_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 void Initialize(String name, NameValueCollection attributes) throws Exception { if (get_IsInitialized()) { return; } super.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.get_Item( accessConnectionStringName); if (null == connectionString || connectionString.get_Length() == 0) { throw new Exception("The connection string was not found."); } else { accessConnection = new OleDbConnection(connectionString); } initialized = true; } //Initialize /// /// 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 void Clear() { synchronized (this) { rootNode = null; super.Clear(); } } //Clear // Build an in-memory representation from persistent // storage, and return the root node of the site map. public SiteMapNode BuildSiteMap() throws Exception { // Since the SiteMap class is static, make sure that it is // not modified while the site map is built. synchronized (this) { // If there is no initialization, this method is being // called out of order. if (!get_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.get_State().Equals(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.get_HasRows()) { rootNodeReader.Read(); rootNodeId = rootNodeReader.GetInt32(0); // Create a SiteMapNode that references the current // StaticSiteMapProvider. rootNode = new SiteMapNode(this , ((Int32)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.set_Value((Int32)rootNodeId); childNodesCommand.get_Parameters().Add(rootParam); OleDbDataReader childNodesReader = childNodesCommand. ExecuteReader(); if (childNodesReader.get_HasRows()) { SiteMapNode childNode = null; while (childNodesReader.Read()) { childNode = new SiteMapNode(this , 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; } } //BuildSiteMap protected SiteMapNode GetRootNodeCore() { return null; } //GetRootNodeCore } //AccessSiteMapProvider
最後に、AccessSiteMapProvider は、次の 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>


System.Configuration.Provider.ProviderBase
System.Web.SiteMapProvider
System.Web.StaticSiteMapProvider
System.Web.XmlSiteMapProvider


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


StaticSiteMapProvider コンストラクタ
アセンブリ: System.Web (system.web.dll 内)



Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


StaticSiteMapProvider プロパティ

名前 | 説明 | |
---|---|---|
![]() | CurrentNode | 現在要求されているページを表す SiteMapNode オブジェクトを取得します。 ( SiteMapProvider から継承されます。) |
![]() | Description | 管理ツールまたは他のユーザー インターフェイス (UI) での表示に適した、簡単でわかりやすい説明を取得します。 ( ProviderBase から継承されます。) |
![]() | EnableLocalization | SiteMapNode 属性のローカライズされた値が返されるかどうかを示すブール値を取得または設定します。 ( SiteMapProvider から継承されます。) |
![]() | Name | 構成時にプロバイダを参照するために使用される表示名を取得します。 ( ProviderBase から継承されます。) |
![]() | ParentProvider | 現在のプロバイダの親 SiteMapProvider オブジェクトを取得または設定します。 ( SiteMapProvider から継承されます。) |
![]() | ResourceKey | SiteMapNode 属性のローカライズに使用するリソース キーを取得または設定します。 ( SiteMapProvider から継承されます。) |
![]() | RootNode | 現在のプロバイダが表すサイト マップ データのルート SiteMapNode オブジェクトを取得します。 ( SiteMapProvider から継承されます。) |
![]() | RootProvider | 現在のプロバイダ階層のルート SiteMapProvider オブジェクトを取得します。 ( SiteMapProvider から継承されます。) |
![]() | SecurityTrimmingEnabled | サイト マップ プロバイダがユーザーのロールに基づいてサイト マップ ノードをフィルタ処理するかどうかを示すブール値を取得します。 ( SiteMapProvider から継承されます。) |

関連項目
StaticSiteMapProvider クラスSystem.Web 名前空間
SiteMapProvider クラス
XmlSiteMapProvider
SiteMapNode クラス
SiteMap クラス
その他の技術情報
ASP.NET サイト ナビゲーションの概要ASP.NET サイト マップ
ASP.NET サイト ナビゲーション プロバイダ
StaticSiteMapProvider メソッド

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

名前 | 説明 | |
---|---|---|
![]() | AddNode | オーバーロードされます。 サイト マップ ノードを、現在の StaticSiteMapProvider オブジェクトが管理するコレクションに追加します。 |
![]() | Clear | StaticSiteMapProvider が状態の一部として追跡する子および親サイト マップ ノードのコレクションに含まれているすべての要素を削除します。 |
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | GetRootNodeCore | 派生クラスでオーバーライドされた場合は、現在のプロバイダによって現在管理されている全ノードのルート ノードを取得します。 ( SiteMapProvider から継承されます。) |
![]() | GetRootNodeCoreFromProvider | 指定したサイト マップ プロバイダによって現在管理されている全ノードのルート ノードを取得します。 ( SiteMapProvider から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
![]() | RemoveNode | オーバーライドされます。 指定された SiteMapNode オブジェクトを、サイト マップ プロバイダによる追跡対象のすべてのサイト マップ ノード コレクションから削除します。 |
![]() | ResolveSiteMapNode | SiteMapResolve イベントを発生させます。 ( SiteMapProvider から継承されます。) |

関連項目
StaticSiteMapProvider クラスSystem.Web 名前空間
SiteMapProvider クラス
XmlSiteMapProvider
SiteMapNode クラス
SiteMap クラス
その他の技術情報
ASP.NET サイト ナビゲーションの概要ASP.NET サイト マップ
ASP.NET サイト ナビゲーション プロバイダ
StaticSiteMapProvider メンバ
SiteMapProvider 抽象クラスの部分実装として機能します。また、ASP.NET の既定のサイト マップ プロバイダである XmlSiteMapProvider クラスの基本クラスとして機能します。
StaticSiteMapProvider データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | CurrentNode | 現在要求されているページを表す SiteMapNode オブジェクトを取得します。(SiteMapProvider から継承されます。) |
![]() | Description | 管理ツールまたは他のユーザー インターフェイス (UI) での表示に適した、簡単でわかりやすい説明を取得します。(ProviderBase から継承されます。) |
![]() | EnableLocalization | SiteMapNode 属性のローカライズされた値が返されるかどうかを示すブール値を取得または設定します。(SiteMapProvider から継承されます。) |
![]() | Name | 構成時にプロバイダを参照するために使用される表示名を取得します。(ProviderBase から継承されます。) |
![]() | ParentProvider | 現在のプロバイダの親 SiteMapProvider オブジェクトを取得または設定します。(SiteMapProvider から継承されます。) |
![]() | ResourceKey | SiteMapNode 属性のローカライズに使用するリソース キーを取得または設定します。 (SiteMapProvider から継承されます。) |
![]() | RootNode | 現在のプロバイダが表すサイト マップ データのルート SiteMapNode オブジェクトを取得します。(SiteMapProvider から継承されます。) |
![]() | RootProvider | 現在のプロバイダ階層のルート SiteMapProvider オブジェクトを取得します。(SiteMapProvider から継承されます。) |
![]() | SecurityTrimmingEnabled | サイト マップ プロバイダがユーザーのロールに基づいてサイト マップ ノードをフィルタ処理するかどうかを示すブール値を取得します。(SiteMapProvider から継承されます。) |

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

名前 | 説明 | |
---|---|---|
![]() | AddNode | オーバーロードされます。 サイト マップ ノードを、現在の StaticSiteMapProvider オブジェクトが管理するコレクションに追加します。 |
![]() | Clear | StaticSiteMapProvider が状態の一部として追跡する子および親サイト マップ ノードのコレクションに含まれているすべての要素を削除します。 |
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | GetRootNodeCore | 派生クラスでオーバーライドされた場合は、現在のプロバイダによって現在管理されている全ノードのルート ノードを取得します。 (SiteMapProvider から継承されます。) |
![]() | GetRootNodeCoreFromProvider | 指定したサイト マップ プロバイダによって現在管理されている全ノードのルート ノードを取得します。 (SiteMapProvider から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
![]() | RemoveNode | オーバーライドされます。 指定された SiteMapNode オブジェクトを、サイト マップ プロバイダによる追跡対象のすべてのサイト マップ ノード コレクションから削除します。 |
![]() | ResolveSiteMapNode | SiteMapResolve イベントを発生させます。 (SiteMapProvider から継承されます。) |


関連項目
StaticSiteMapProvider クラスSystem.Web 名前空間
SiteMapProvider クラス
XmlSiteMapProvider
SiteMapNode クラス
SiteMap クラス
その他の技術情報
ASP.NET サイト ナビゲーションの概要ASP.NET サイト マップ
ASP.NET サイト ナビゲーション プロバイダ
Weblioに収録されているすべての辞書からStaticSiteMapProviderを検索する場合は、下記のリンクをクリックしてください。

- StaticSiteMapProviderのページへのリンク