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

ConsumerConnectionPoint クラス

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

コンシューマとして動作するサーバー コントロールがプロバイダとの接続を構成できるようにする、コネクション ポイント オブジェクトを定義します。

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

Public Class ConsumerConnectionPoint
    Inherits ConnectionPoint
Dim instance As ConsumerConnectionPoint
public class ConsumerConnectionPoint : ConnectionPoint
public ref class ConsumerConnectionPoint :
 public ConnectionPoint
public class ConsumerConnectionPoint extends
 ConnectionPoint
public class ConsumerConnectionPoint extends
 ConnectionPoint
解説解説

2 つのサーバー コントロール間におけるすべての Web パーツ接続で、それぞれのコントロールが関連コネクション ポイント オブジェクトを持っている必要があります。関連コネクション ポイント オブジェクトでは、コントロールがもう一方のコントロールに接続でき、コントロールがその接続に関してプロバイダとコンシューマのどちらとして指定されているかに応じて、データの提供側または使用側のいずれかとして動作できます。通常、ConnectionPoint オブジェクトには、一方のコントロールがもう一方のコントロールに接続する方法および共有できるデータの種類に関する詳細が格納されています。接続でコンシューマとして動作するコントロールの場合、そのコネクション ポイントは ConsumerConnectionPoint オブジェクトである必要があります。Web パーツ接続とコネクション ポイントの詳細については、下の「参照」セクションに示されたトピックを参照してください。

ConsumerConnectionPoint オブジェクトを作成するには、次の手順を実行する必要があります。

  1. インターフェイス インスタンスを参照するためにコンシューマ コントロールを有効にします。WebPart またはその他のサーバー コントロール (WebPartZoneBase ゾーンに追加される任意の種類のサーバー コントロールを使用できます) は、特定のインターフェイス インスタンスからのデータを使用できる必要があります。このコントロールはインターフェイスを実装する必要はありません。実装する必要があるのはプロバイダだけです。コンシューマはプロバイダによって提供されるものとまったく同じインターフェイス型で動作するか、同じでない場合は、WebPartTransformer オブジェクトを使用して、プロバイダのインターフェイス型からコンシューマが認識できる型にデータを変換できます。通常、コンシューマを有効にするには、目的のインターフェイス型への参照を格納するプライベート フィールドを宣言します。

  2. コールバック メソッドを識別します。コンシューマのメソッドは、プロバイダとの接続を確立するためのコールバック メソッドとして識別する必要があります。このメソッドは、プロバイダが実装しているインターフェイスのインスタンスを取得し、これをたとえば最初の手順で作成したプライベート フィールドに割り当てます。Web パーツでコンシューマのコールバック メソッドを識別するには、インターフェイス インスタンスを受け取るメソッドに ConnectionConsumer メタデータ属性 (ConnectionConsumerAttribute クラスで定義) を追加します。この属性を追加すると、必須となるパラメータは、コンシューマ接続ポイントで使用する表示名だけになります。ID などの省略可能なパラメータも追加できます。

  3. インターフェイス インスタンスからのデータを処理して出力します。データの必要に応じて任意の内部処理を実行し、通常は、コンシューマ コントロールでページにデータを表示します。これを実行する一般的な方法として、コントロールの OnPreRender メソッドをオーバーライドする方法が挙げられます。

    メモメモ

    同期要求の間は、PreRender イベントが発生しているときまたはこのイベントが発生した直後に、コンシューマがプロバイダからのデータを直接要求する必要があります。非同期要求の間、表示中のいずれの時点においてもプロバイダのコールバック メソッドが呼び出されない場合、開発者はコンシューマにデータが送信されなかったと推測できます。

コントロールがコンシューマとして動作するように装備されると、そのコントロールは接続に参加できます (プロバイダ コントロールも既に装備され利用可能になっていることが前提です)。Web ページのマークアップで静的な宣言接続を作成するには、開発者は、<asp:webpartconnection> 要素を使用できます。コールバック メソッドを識別するコンシューマ ソース コードの ConnectionConsumer 属性にコネクション ポイントの ID を指定する場合、その値をページの <asp:webpartconnection> 要素の ConsumerConnectionPointID 属性に割り当てる必要があります。開発者がコンシューマ接続ポイントに ID を指定する理由は、コンシューマ コントロールに複数のコネクション ポイントが定義されている場合があるためです。コンシューマ コントロールのコンシューマ接続ポイントに ID が指定されていない場合、DefaultID フィールドから取得した既定値を使用して接続が作成されるため、どのページの ConsumerConnectionPointID 属性にも値を割り当てる必要はありません。

コードで接続を作成するには、 開発者は GetConsumerConnectionPoints メソッドを呼び出して、コンシューマ コントロールの定義された ConsumerConnectionPoint オブジェクトの ID またはインデックスと共に、コンシューマ コントロールの ID を渡し、新しい ConsumerConnectionPoint オブジェクトを作成する必要があります。返された ConsumerConnectionPoint オブジェクトすべてが、コンシューマ コントロールへの参照、プロバイダ コントロールへの参照、および対応する ProviderConnectionPoint オブジェクトと共に ConnectWebParts メソッドに渡され、新しい WebPartConnection オブジェクトが作成されます。

開発者は接続を確立する手順の一部として宣言またはプログラムいずれかの方法でコンシューマ接続ポイントを使用できますが、ユーザーもユーザー インターフェイス (UI) を通じてコンシューマ接続ポイントを操作することにより接続を確立できます。開発者が Web ページで ConnectionsZone コントロールを宣言すると、接続を作成するランタイム UI がユーザーに表示されます。ユーザーがその Connect 動詞をクリックし、接続を確立する際の開始ポイントとしてプロバイダ コントロールを選択すると (コンシューマを選択することもできますが、接続に違いはありません)、プロバイダからのデータの送信先として、利用可能なコンシューマ接続ポイントの表示名が示されたドロップダウン リスト コントロールが UI に表示されます。ユーザーが接続を確立するには、コンシューマ接続ポイントを選択する必要があります。

ConsumerConnectionPoint オブジェクトは特定のコンシューマ コントロールと直接関連付けられ、接続に関する詳細を ConnectionPoint 基本クラスから継承したプロパティに格納します。たとえば、継承した InterfaceType プロパティに、コンシューマ接続ポイントが使用するインターフェイスの型を保持します。接続のプロバイダとコンシューマの両方がそのインターフェイス型を認識する場合、双方のコントロールに互換性があり、直接接続を構成できます。プロバイダとコンシューマが同じインターフェイス型で動作できない場合、これらに互換性がないため、WebPartTransformer オブジェクトを使用して、プロバイダ コネクション ポイントの InterfaceType プロパティをコンシューマが動作できる型に変換する必要があります。その他の重要な継承プロパティに DisplayName プロパティがあります。このプロパティは、接続の作成時にユーザーがコンシューマ接続ポイントを選択する際の UI に表示する表示名を提供します。表示名は、開発者がコンシューマ コントロールのコールバック メソッドに ConnectionConsumer 属性を追加するときの必須パラメータです。継承された ID プロパティは、コンシューマが複数のコネクション ポイントを持っている場合にコンシューマ接続ポイントに一意の識別子を提供するため、上に示した例と同様に役立ちます。コンシューマは、複数の ConsumerConnectionPoint オブジェクトを定義できます。この場合、開発者がメソッドに ConnectionConsumer 属性を追加するときに、それぞれのコネクション ポイントを識別するための ID 値を指定する必要があります。もう 1 つの重要な継承プロパティに、AllowsMultipleConnections プロパティがあります。このプロパティは、コンシューマ接続ポイントが同時に複数のプロバイダと接続できるかどうかを示します。既定では、コンシューマ接続ポイントの場合、このプロパティ値は false になります (一方、プロバイダ コネクション ポイントは既定で true になります)。

ConsumerConnectionPoint クラスは、ConnectionPoint クラスから継承したメンバにいくつかの独自のメソッドを追加します。SetObject メソッドは、コンシューマ独自の定義済みのコールバック メソッドを呼び出し、プロバイダからインターフェイス インスタンスを取得します。SupportsConnection メソッドは、関連するコンシューマ コントロールの現在の状態に基づいて、コネクション ポイントが接続を確立できるかどうかを示すブール値を返します。

使用例使用例

宣言、プログラム、または UI それぞれでコンシューマ接続ポイントを使用して接続を作成する簡単な方法のコード例を次に示します。

この例は、4 つの部分で構成されます。

コード例の最初の部分は、Web ページ上の表示モードをユーザーが変更できるようにするユーザー コントロールです。ホストする Web ページの先頭近くにあるこのユーザー コントロール用の Register ディレクティブの Src 属性に割り当てるファイル名を付けて、次のソース コードを .ascx ファイルに保存します。表示モードの詳細、およびこのコントロールのソース コードの説明については、「チュートリアル : Web パーツ ページでの表示モードの変更」を参照してください。

<%@ control language="vb" classname="DisplayModeMenuVB"%>
<script runat="server">
  ' Use a field to reference the current WebPartManager.
  Dim _manager As WebPartManager

  Sub Page_Init(ByVal sender As
 Object, ByVal e As EventArgs)
    AddHandler Page.InitComplete, AddressOf
 InitComplete
  End Sub

  Sub InitComplete(ByVal sender As
 Object, ByVal e As System.EventArgs)
    _manager = WebPartManager.GetCurrentWebPartManager(Page)
      
    Dim browseModeName As String
 = WebPartManager.BrowseDisplayMode.Name
      
    ' Fill the dropdown with the names of supported display modes.
    Dim mode As WebPartDisplayMode
    For Each mode In _manager.SupportedDisplayModes
      Dim modeName As String
 = mode.Name
      ' Make sure a mode is enabled before adding it.
      If mode.IsEnabled(_manager) Then
        Dim item As New
 ListItem(modeName, modeName)
        DisplayModeDropdown.Items.Add(item)
      End If
    Next mode
      
    ' If shared scope is allowed for this user, display the scope-switching
    ' UI and select the appropriate radio button for the current user
 scope.
    If _manager.Personalization.CanEnterSharedScope Then
      Panel2.Visible = True
      If _manager.Personalization.Scope = PersonalizationScope.User
 Then
        RadioButton1.Checked = True
      Else
        RadioButton2.Checked = True
      End If
    End If
   
  End Sub

  ' Change the page to the selected display mode.
  Sub DisplayModeDropdown_SelectedIndexChanged(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    Dim selectedMode As String
 = DisplayModeDropdown.SelectedValue   
    Dim mode As WebPartDisplayMode = _
      _manager.SupportedDisplayModes(selectedMode)
    If Not (mode Is Nothing)
 Then
      _manager.DisplayMode = mode
    End If

  End Sub
   
  ' Set the selected item equal to the current display mode.
  Sub Page_PreRender(ByVal sender As
 Object, ByVal e As EventArgs)
    Dim items As ListItemCollection = DisplayModeDropdown.Items
    Dim selectedIndex As Integer
 = _
      items.IndexOf(items.FindByText(_manager.DisplayMode.Name))
    DisplayModeDropdown.SelectedIndex = selectedIndex

  End Sub

  ' Reset all of a user's personalization data for the page.
  Protected Sub LinkButton1_Click(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    _manager.Personalization.ResetPersonalizationState()
    
  End Sub

  ' If not in User personalization scope, toggle into it.
  Protected Sub RadioButton1_CheckedChanged(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    If _manager.Personalization.Scope = PersonalizationScope.Shared
 Then
      _manager.Personalization.ToggleScope()
    End If

  End Sub
   
  ' If not in Shared scope, and if user is allowed, toggle the scope.
  Protected Sub RadioButton2_CheckedChanged(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    If _manager.Personalization.CanEnterSharedScope AndAlso
 _
      _manager.Personalization.Scope = PersonalizationScope.User Then
      _manager.Personalization.ToggleScope()
    End If

  End Sub

</script>
<div>
  <asp:Panel ID="Panel1" runat="server"
 
    Borderwidth="1" 
    Width="230" 
    BackColor="lightgray"
    Font-Names="Verdana, Arial, Sans Serif" >
    <asp:Label ID="Label1" runat="server"
 
      Text="&nbsp;Display Mode" 
      Font-Bold="true"
      Font-Size="8"
      Width="120" />
    <asp:DropDownList ID="DisplayModeDropdown"
 runat="server"  
      AutoPostBack="true" 
      Width="120"
      OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged"
 />
    <asp:LinkButton ID="LinkButton1" runat="server"
      Text="Reset User State" 
      ToolTip="Reset the current user's personalization data for
 the page."
      Font-Size="8" 
      OnClick="LinkButton1_Click" />
    <asp:Panel ID="Panel2" runat="server"
 
      GroupingText="Personalization Scope"
      Font-Bold="true"
      Font-Size="8" 
      Visible="false" >
      <asp:RadioButton ID="RadioButton1" runat="server"
 
        Text="User" 
        AutoPostBack="true"
        GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged"
 />
      <asp:RadioButton ID="RadioButton2" runat="server"
 
        Text="Shared" 
        AutoPostBack="true"
        GroupName="Scope" 
        OnCheckedChanged="RadioButton2_CheckedChanged"
 />
    </asp:Panel>
  </asp:Panel>
</div>
<%@ control language="C#" classname="DisplayModeMenuCS"%>
<script runat="server">
  
 // Use a field to reference the current WebPartManager.
  WebPartManager _manager;

  void Page_Init(object sender, EventArgs e)
  {
    Page.InitComplete += new EventHandler(InitComplete);
  }  

  void InitComplete(object sender, System.EventArgs e)
  {
    _manager = WebPartManager.GetCurrentWebPartManager(Page);

    String browseModeName = WebPartManager.BrowseDisplayMode.Name;

    // Fill the dropdown with the names of supported display modes.
    foreach (WebPartDisplayMode mode in _manager.SupportedDisplayModes)
    {
      String modeName = mode.Name;
      // Make sure a mode is enabled before adding it.
      if (mode.IsEnabled(_manager))
      {
        ListItem item = new ListItem(modeName, modeName);
        DisplayModeDropdown.Items.Add(item);
      }
    }

    // If shared scope is allowed for this user, display the scope-switching
    // UI and select the appropriate radio button for the current user
 scope.
    if (_manager.Personalization.CanEnterSharedScope)
    {
      Panel2.Visible = true;
      if (_manager.Personalization.Scope == PersonalizationScope.User)
        RadioButton1.Checked = true;
      else
        RadioButton2.Checked = true;
    }
    
  }
 
  // Change the page to the selected display mode.
  void DisplayModeDropdown_SelectedIndexChanged(object sender,
 EventArgs e)
  {
    String selectedMode = DisplayModeDropdown.SelectedValue;

    WebPartDisplayMode mode = _manager.SupportedDisplayModes[selectedMode];
    if (mode != null)
      _manager.DisplayMode = mode;
  }

  // Set the selected item equal to the current display mode.
  void Page_PreRender(object sender, EventArgs e)
  {
    ListItemCollection items = DisplayModeDropdown.Items;
    int selectedIndex = 
      items.IndexOf(items.FindByText(_manager.DisplayMode.Name));
    DisplayModeDropdown.SelectedIndex = selectedIndex;
  }

  // Reset all of a user's personalization data for the page.
  protected void LinkButton1_Click(object sender,
 EventArgs e)
  {
    _manager.Personalization.ResetPersonalizationState();
  }

  // If not in User personalization scope, toggle into it.
  protected void RadioButton1_CheckedChanged(object
 sender, EventArgs e)
  {
    if (_manager.Personalization.Scope == PersonalizationScope.Shared)
      _manager.Personalization.ToggleScope();
  }

  // If not in Shared scope, and if user is allowed, toggle the scope.
  protected void RadioButton2_CheckedChanged(object
 sender, EventArgs e)
  {
    if (_manager.Personalization.CanEnterSharedScope &&
 
        _manager.Personalization.Scope == PersonalizationScope.User)
      _manager.Personalization.ToggleScope();
  }
</script>
<div>
  <asp:Panel ID="Panel1" runat="server" 
    Borderwidth="1" 
    Width="230" 
    BackColor="lightgray"
    Font-Names="Verdana, Arial, Sans Serif" >
    <asp:Label ID="Label1" runat="server" 
      Text="&nbsp;Display Mode" 
      Font-Bold="true"
      Font-Size="8"
      Width="120" />
    <asp:DropDownList ID="DisplayModeDropdown" runat="server"
  
      AutoPostBack="true" 
      Width="120"
      OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged"
 />
    <asp:LinkButton ID="LinkButton1" runat="server"
      Text="Reset User State" 
      ToolTip="Reset the current user's personalization data for
 the page."
      Font-Size="8" 
      OnClick="LinkButton1_Click" />
    <asp:Panel ID="Panel2" runat="server" 
      GroupingText="Personalization Scope"
      Font-Bold="true"
      Font-Size="8" 
      Visible="false" >
      <asp:RadioButton ID="RadioButton1" runat="server" 
        Text="User" 
        AutoPostBack="true"
        GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged"
 />
      <asp:RadioButton ID="RadioButton2" runat="server" 
        Text="Shared" 
        AutoPostBack="true"
        GroupName="Scope" 
        OnCheckedChanged="RadioButton2_CheckedChanged" />
    </asp:Panel>
  </asp:Panel>
</div>

コード例の 2 番目の部分は、インターフェイスとコントロールのソース コードです。ソース ファイルには、IZipCode という名前の簡単なインターフェイスが含まれています。また、インターフェイスを実装してプロバイダ コントロールとして動作する、ZipCodeWebPart という名前の WebPart クラスも含まれています。もう一方の WebPart クラスには WeatherWebPart という名前が付けられ、接続のコンシューマとして動作します。このクラスは、プロバイダ コントロールから IZipCode インターフェイスのインスタンスを取得する、GetZipCode という名前のメソッドを持っています。このメソッドは、メタデータの ConnectionConsumer 属性で、コンシューマのコネクション ポイント メソッドとしてマークされています。これは、コンシューマ コントロールのコネクション ポイント メソッドを識別するためのしくみです。

コード例を実行するためには、このソース コードをコンパイルする必要があります。それを明示的にコンパイルし、コンパイル済みのアセンブリを Web サイトの Bin フォルダまたはグローバル アセンブリ キャッシュに配置できます。サイトの App_Code フォルダにソース コードを配置し、実行時に動的にコンパイルすることもできます。このコード例は、動的コンパイルを使用します。コンパイル方法を示すチュートリアルについては、「チュートリアル : カスタム サーバー コントロールの開発と使用」を参照してください。

Imports System
Imports System.Web
Imports System.Web.Security
Imports System.Security.Permissions
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts

Namespace Samples.AspNet.VB.Controls

  <AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  <AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  Public Interface IZipCode

    Property ZipCode() As String

  End Interface

  <AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  <AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  Public Class ZipCodeWebPart
    Inherits WebPart
    Implements IZipCode
    Private zipCodeText As String
 = String.Empty
    Private input As TextBox
    Private send As Button

    Public Sub New()
    End Sub

    ' Make the implemented property personalizable to save 
    ' the Zip Code between browser sessions.
    <Personalizable()> _
    Public Property ZipCode() As
 String _
      Implements IZipCode.ZipCode

      Get
        Return zipCodeText
      End Get
      Set(ByVal value As
 String)
        zipCodeText = value
      End Set
    End Property

    ' This is the callback method that returns the provider.
    <ConnectionProvider("Zip Code Provider", "ZipCodeProvider")>
 _
    Public Function ProvideIZipCode() As
 IZipCode
      Return Me
    End Function


    Protected Overrides Sub
 CreateChildControls()
      Controls.Clear()
      input = New TextBox()
      Me.Controls.Add(input)
      send = New Button()
      send.Text = "Enter 5-digit Zip Code"
      AddHandler send.Click, AddressOf Me.submit_Click
      Me.Controls.Add(send)

    End Sub


    Private Sub submit_Click(ByVal
 sender As Object, _
      ByVal e As EventArgs)

      If input.Text <> String.Empty Then
        zipCodeText = Page.Server.HtmlEncode(input.Text)
        input.Text = String.Empty
      End If

    End Sub

  End Class

  <AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  <AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  Public Class WeatherWebPart
    Inherits WebPart
    Private _provider As IZipCode
    Private _zipSearch As String
    Private DisplayContent As Label

    ' This method is identified by the ConnectionConsumer 
    ' attribute, and is the mechanism for connecting with 
    ' the provider. 
    <ConnectionConsumer("Zip Code Consumer", "ZipCodeConsumer")>
 _
    Public Sub GetIZipCode(ByVal
 Provider As IZipCode)
      _provider = Provider
    End Sub


    Protected Overrides Sub
 OnPreRender(ByVal e As EventArgs)
      EnsureChildControls()

      If Not (Me._provider
 Is Nothing) Then
        _zipSearch = _provider.ZipCode.Trim()
                DisplayContent.Text = "My Zip Code is:  "
 + _zipSearch
      End If

    End Sub 'OnPreRender

    Protected Overrides Sub
 CreateChildControls()
      Controls.Clear()
      DisplayContent = New Label()
      Me.Controls.Add(DisplayContent)

    End Sub

  End Class

End Namespace
namespace Samples.AspNet.CS.Controls
{
  using System;
  using System.Web;
  using System.Web.Security;
  using System.Security.Permissions;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public interface IZipCode
  {
    string ZipCode { get; set;}
  }

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class ZipCodeWebPart : WebPart, IZipCode
  {
    string zipCodeText = String.Empty;
    TextBox input;
    Button send;

    public ZipCodeWebPart()
    {
    }

    // Make the implemented property personalizable to save 
    // the Zip Code between browser sessions.
    [Personalizable()]
    public virtual string ZipCode
    {
      get { return zipCodeText; }
      set { zipCodeText = value; }
    }

    // This is the callback method that returns the provider.
    [ConnectionProvider("Zip Code Provider", "ZipCodeProvider")]
    public IZipCode ProvideIZipCode()
    {
      return this;
    }

    protected override void CreateChildControls()
    {
      Controls.Clear();
      input = new TextBox();
      this.Controls.Add(input);
      send = new Button();
      send.Text = "Enter 5-digit Zip Code";
      send.Click += new EventHandler(this.submit_Click);
      this.Controls.Add(send);
    }

    private void submit_Click(object sender,
 EventArgs e)
    {
      if (input.Text != String.Empty)
      {
        zipCodeText = Page.Server.HtmlEncode(input.Text);
        input.Text = String.Empty;
      }
    }

  }

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class WeatherWebPart : WebPart
  {
    private IZipCode _provider;
    string _zipSearch;
    Label DisplayContent;

    // This method is identified by the ConnectionConsumer 
    // attribute, and is the mechanism for connecting with 
    // the provider. 
    [ConnectionConsumer("Zip Code Consumer", "ZipCodeConsumer")]
    public void GetIZipCode(IZipCode Provider)
    {
      _provider = Provider;
    }
    
    protected override void OnPreRender(EventArgs
 e)
    {
      EnsureChildControls();

      if (this._provider != null)
      {
        _zipSearch = _provider.ZipCode.Trim();
        DisplayContent.Text = "My Zip Code is:  " + _zipSearch;
      }
    }

    protected override void CreateChildControls()
    {
      Controls.Clear();
      DisplayContent = new Label();
      this.Controls.Add(DisplayContent);
    }

  }
}

コード例の 3 番目の部分は Web ページです。先頭近くには、接続を構成するカスタム コントロールを登録する Register ディレクティブ、およびユーザーがページの表示モードを変更できるユーザー コントロールがあります。接続は、ページの <staticconnections> 要素内で宣言して作成されます。これは、<asp:webpartconnection> 要素の ConsumerConnectionPointID 属性で接続を作成する 1 つの方法を示しています。プログラムで接続を作成することもできます。作成するコードは Button1_Click メソッド内に組み込みます。この場合、ConsumerConnectionPoint オブジェクトを作成し、実際の接続を作成するメソッドに渡します。宣言またはプログラムのいずれかで接続を作成する場合、コネクション ポイントはプロバイダとコンシューマの両方に対して指定する必要があります。Button2_Click メソッドはプロバイダとコンシューマ両方の ConnectionPoint オブジェクトにアクセスし、そのプロパティ値の一部をページのラベルに書き込みます。

<%@ Page Language="VB" %>
<%@ register tagprefix="uc1" 
    tagname="DisplayModeMenuVB"
    src="~/displaymodemenuvb.ascx" %>
<%@ Register TagPrefix="aspSample" 
    Namespace="Samples.AspNet.VB.Controls"
 %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  Protected Sub Button1_Click(ByVal
 sender As Object, _
    ByVal e As System.EventArgs)

    Dim provPoint As ProviderConnectionPoint
 = _
      mgr.GetProviderConnectionPoints(zip1)("ZipCodeProvider")
    Dim connPoint As ConsumerConnectionPoint
 = _
      mgr.GetConsumerConnectionPoints(weather1)("ZipCodeConsumer")

    If mgr.CanConnectWebParts(zip1, provPoint, weather1, connPoint)
 Then
      mgr.ConnectWebParts(zip1, provPoint, weather1, connPoint)
    End If
    
  End Sub
  
  Protected Sub Button2_Click(ByVal
 sender As Object, _
    ByVal e As System.EventArgs)
    
    Dim conn As WebPartConnection = mgr.Connections(0)

    lblConn.Text = "<h2>Connection Point Details</h2>"
 & _
      "<h3>Provider Connection Point</h3>"
 & _
      "  Display name: " & conn.ProviderConnectionPoint.DisplayName
 & _
      "<br />" & _
      "  ID: " & conn.ProviderConnectionPoint.ID
 & _
      "<br />" & _
      "  Interface type: " & conn.ProviderConnectionPoint.InterfaceType.ToString()
 & _
      "<br />" & _
      "  Control type: " & conn.ProviderConnectionPoint.ControlType.ToString()
 & _
      "<br />" & _
      "  Allows multiple connections: " & _
        conn.ProviderConnectionPoint.AllowsMultipleConnections.ToString() & _
      "<br />" & _
      "  Enabled: " & conn.ProviderConnectionPoint.GetEnabled(zip1).ToString()
 & _
      "<hr />" & _
      "<h3>Consumer Connection Point</h3>"
 & _
      "  Display name: " & conn.ConsumerConnectionPoint.DisplayName
 & _
      "<br />" & _
      "  ID: " & conn.ConsumerConnectionPoint.ID
 & _
      "<br />" & _
      "  Interface type: " & conn.ConsumerConnectionPoint.InterfaceType.ToString()
 & _
      "<br />" & _
      "  Control type: " & conn.ConsumerConnectionPoint.ControlType.ToString()
 & _
      "<br />" & _
      "  Allows multiple connections: " & _
        conn.ConsumerConnectionPoint.AllowsMultipleConnections.ToString() & _
      "<br />" & _
      "  Enabled: " & conn.ConsumerConnectionPoint.GetEnabled(zip1).ToString()
          
  End Sub

  Protected Sub Page_Load(ByVal
 sender As Object, _
    ByVal e As System.EventArgs)
    lblConn.Text = String.Empty
  End Sub
  
</script>

<html  >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:WebPartManager ID="mgr" runat="server"
 >
        <StaticConnections>
          <asp:WebPartConnection ID="conn1"
            ConsumerConnectionPointID="ZipCodeConsumer"
            ConsumerID="weather1" 
            ProviderConnectionPointID="ZipCodeProvider"
 
            ProviderID="zip1" />
        </StaticConnections>      
      </asp:WebPartManager>
      <uc1:displaymodemenuvb id="menu1" runat="server"
 />
      <asp:WebPartZone ID="WebPartZone1" runat="server">
        <ZoneTemplate>
          <aspSample:ZipCodeWebPart ID="zip1" runat="server"
            Title="Zip Code Provider"  />
          <aspSample:WeatherWebPart ID="weather1"
 runat="server" 
            Title="Zip Code Consumer" />
        </ZoneTemplate>
      </asp:WebPartZone>
      <asp:ConnectionsZone ID="ConnectionsZone1"
 runat="server">
      </asp:ConnectionsZone>
      <asp:Button ID="Button1" runat="server"
 
        Text="Dynamic Connection" 
        OnClick="Button1_Click" />      
      <br />
      <asp:Button ID="Button2" runat="server"
 
        Text="Connection Point Details" 
        OnClick="Button2_Click" />
      <br />
      <asp:Label ID="lblConn" runat="server"
 />
    </div>
    </form>
</body>
</html>
<%@ Page Language="C#" %>
<%@ register tagprefix="uc1" 
    tagname="DisplayModeMenuCS"
    src="~/displaymodemenucs.ascx" %>
<%@ Register TagPrefix="aspSample" 
    Namespace="Samples.AspNet.CS.Controls" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  protected void Button1_Click(object sender,
 EventArgs e)
  {
    ProviderConnectionPoint provPoint =
      mgr.GetProviderConnectionPoints(zip1)["ZipCodeProvider"];
    ConsumerConnectionPoint connPoint =
      mgr.GetConsumerConnectionPoints(weather1)["ZipCodeConsumer"];
      
    if(mgr.CanConnectWebParts(zip1, provPoint, weather1, connPoint))
      mgr.ConnectWebParts(zip1, provPoint, weather1, connPoint);
  
  }  
  protected void Button2_Click(object sender,
 EventArgs e)
  {
    WebPartConnection conn = mgr.Connections[0];
    
    lblConn.Text = "<h2>Connection Point Details</h2>" + 
       "<h3>Provider Connection Point</h3>" + 
       "  Display name: " + conn.ProviderConnectionPoint.DisplayName +
 
       "<br />" + 
       "  ID: " + conn.ProviderConnectionPoint.ID + 
       "<br />" + 
       "  Interface type: " + 
        conn.ProviderConnectionPoint.InterfaceType.ToString() + 
       "<br />" + 
       "  Control type: " + conn.ProviderConnectionPoint.ControlType.ToString()
 + 
       "<br />" + 
       "  Allows multiple connections: " + 
          conn.ProviderConnectionPoint.AllowsMultipleConnections.ToString() + 
       "<br />" + 
       "  Enabled: " + conn.ProviderConnectionPoint.GetEnabled(zip1).ToString()
 + 
       "<hr />" + 
       "<h3>Consumer Connection Point</h3>" + 
       "  Display name: " + conn.ConsumerConnectionPoint.DisplayName +
 
       "<br />" + 
       "  ID: " + conn.ConsumerConnectionPoint.ID + 
       "<br />" + 
       "  Interface type: " + conn.ConsumerConnectionPoint.InterfaceType.ToString()
 + 
       "<br />" + 
       "  Control type: " + conn.ConsumerConnectionPoint.ControlType.ToString()
 + 
       "<br />" + 
       "  Allows multiple connections: " + 
          conn.ConsumerConnectionPoint.AllowsMultipleConnections.ToString() + 
       "<br />" + 
       "  Enabled: " + conn.ConsumerConnectionPoint.GetEnabled(zip1).ToString();
  }

  protected void Page_Load(object sender, EventArgs
 e)
  {
    lblConn.Text = String.Empty;
  }
</script>

<html  >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:WebPartManager ID="mgr" runat="server" >
        <StaticConnections>
          <asp:WebPartConnection ID="conn1"
            ConsumerConnectionPointID="ZipCodeConsumer"
            ConsumerID="weather1" 
            ProviderConnectionPointID="ZipCodeProvider" 
            ProviderID="zip1" />
        </StaticConnections>      
      </asp:WebPartManager>
      <uc1:displaymodemenucs id="menu1" runat="server" />
      <asp:WebPartZone ID="WebPartZone1" runat="server">
        <ZoneTemplate>
          <aspSample:ZipCodeWebPart ID="zip1" runat="server"
            Title="Zip Code Provider"  />
          <aspSample:WeatherWebPart ID="weather1" runat="server"
 
            Title="Zip Code Consumer" />
        </ZoneTemplate>
      </asp:WebPartZone>
      <asp:ConnectionsZone ID="ConnectionsZone1" runat="server">
      </asp:ConnectionsZone>
      <asp:Button ID="Button1" runat="server" 
        Text="Dynamic Connection" 
        OnClick="Button1_Click" />      
      <br />
      <asp:Button ID="Button2" runat="server" 
        Text="Connection Point Details" 
        OnClick="Button2_Click" />
      <br />
      <asp:Label ID="lblConn" runat="server" />
    </div>
    </form>
</body>
</html>

ブラウザにページを読み込んだ後、[Connection Point Details] ボタンをクリックします。宣言によって接続が確立されたプロバイダ コネクション ポイントとコンシューマ接続ポイントに関する情報が表示されます。次に、[Display Mode] ドロップダウン コントロールを使用して、ページを接続モードに切り替えます。[ZIP Code Provider]WebPart コントロール (タイトル バーに下向きの矢印で表示) の動詞メニューで、Connect 動詞をクリックします。接続 UI が表示され、ページに宣言された <asp:connectionszone> コントロールによって自動的に作成されます。これは、前に説明した宣言およびプログラムによる方法と共に、UI を使用して接続を作成するもう 1 つの方法です。[切断] ボタンをクリックし、既存の静的接続を終了します。[コンシューマへの接続の作成] リンクをクリックします。UI に、コンシューマ接続ポイントの表示名が示されたドロップダウン コントロールが表示されます。ドロップダウン リストのコネクション ポイントを選択し、[接続] をクリックして接続を確立します。次に、もう一度 [切断] をクリックします。[Dynamic Connection] ボタンをクリックし、プログラムで接続を作成します。[Display Mode] コントロールを使用して、ページをブラウズ モードに戻します。もう一度 [Connection Point Details] ボタンをクリックし、コンシューマ接続ポイント オブジェクトに関する詳細を表示します。

この例では、Web ページのマークアップで宣言した静的接続、ConsumerConnectionPoint オブジェクトを使用するコードで作成した接続、および接続 UI を通じてユーザーが作成した接続の 3 つの方法で、接続を確立してコンシューマ接続ポイントを使用する方法を示しました。

.NET Framework のセキュリティ.NET Framework のセキュリティ
継承階層継承階層
System.Object
   System.Web.UI.WebControls.WebParts.ConnectionPoint
    System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ConsumerConnectionPoint メンバ
System.Web.UI.WebControls.WebParts 名前空間
WebPartConnection
ProviderConnectionPoint
その他の技術情報
ASP.NET Web パーツ ページ
Web パーツ接続の概要

ConsumerConnectionPoint コンストラクタ

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

ConsumerConnectionPoint クラスの新しいインスタンスを初期化します。

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

Public Sub New ( _
    callbackMethod As MethodInfo, _
    interfaceType As Type, _
    controlType As Type, _
    displayName As String, _
    id As String, _
    allowsMultipleConnections As Boolean _
)
Dim callbackMethod As MethodInfo
Dim interfaceType As Type
Dim controlType As Type
Dim displayName As String
Dim id As String
Dim allowsMultipleConnections As Boolean

Dim instance As New ConsumerConnectionPoint(callbackMethod,
 interfaceType, controlType, displayName, id, allowsMultipleConnections)
public ConsumerConnectionPoint (
    MethodInfo callbackMethod,
    Type interfaceType,
    Type controlType,
    string displayName,
    string id,
    bool allowsMultipleConnections
)
public:
ConsumerConnectionPoint (
    MethodInfo^ callbackMethod, 
    Type^ interfaceType, 
    Type^ controlType, 
    String^ displayName, 
    String^ id, 
    bool allowsMultipleConnections
)
public ConsumerConnectionPoint (
    MethodInfo callbackMethod, 
    Type interfaceType, 
    Type controlType, 
    String displayName, 
    String id, 
    boolean allowsMultipleConnections
)
public function ConsumerConnectionPoint (
    callbackMethod : MethodInfo, 
    interfaceType : Type, 
    controlType : Type, 
    displayName : String, 
    id : String, 
    allowsMultipleConnections : boolean
)

パラメータ

callbackMethod

接続を確立するためのインターフェイス インスタンスをコンシューマに返す、コンシューマ コントロールのメソッド。

interfaceType

コンシューマがプロバイダから受け取るインターフェイスの Type。

controlType

コンシューマ接続ポイントが関連付けられたコンシューマ コントロールの Type。

displayName

接続ユーザー インターフェイス (UI) でユーザーに対して表示される、コンシューマ接続ポイントの表示名。

id

コンシューマ接続ポイントの一意な識別子。

allowsMultipleConnections

コンシューマ接続ポイントが、プロバイダとの間で同時に複数の接続を持つことができるかどうかを示すブール値。

例外例外
例外の種類条件

ArgumentNullException

callbackMethod が null 参照 (Visual Basic では Nothing) です。

または

interfaceType が null 参照 (Visual Basic では Nothing) です。

または

controlType が null 参照 (Visual Basic では Nothing) です。

または

displayName が null 参照 (Visual Basic では Nothing) または空の文字列 ("") です。

ArgumentException

controlType が、コンシューマ コントロール (またはそれから派生した有効なクラス) と同じ型ではありません。

解説解説
使用例使用例

ConsumerConnectionPoint クラスの派生としてカスタム プロバイダ コネクション ポイントを作成する方法を次のコード例に示します。

コード例は、次の 3 つの部分から成ります。

コード例の最初の部分は、プロバイダとコンシューマの WebPart コントロール、カスタム ConsumerConnectionPoint クラス、指定された TableConsumerConnectionPoint のソースです。TableConsumerConnectionPoint クラスのコンストラクタが基本コンストラクタを呼び出し、それに「パラメータ」セクションで示した必須パラメータを渡します。また、TableConsumer クラスでは、接続のコールバック メソッドとして SetConnectionInterface メソッドを指定し、ConnectionConsumer 属性でパラメータとしてカスタム TableConsumerConnectionPoint を宣言します。これは、カスタム コンシューマ接続ポイントを作成し、それをコンシューマ コントロールに関連付ける方法を示しています。この例ではソース コードを動的にコンパイルすることを想定しているため、Web アプリケーションの App_Code サブフォルダにソース コード ファイルを配置する必要があります。

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Reflection;
using System.Web;
using System.Web.UI;
using System.Security.Permissions;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

//This sample code creates a Web Parts control that acts as a provider
 of table data.
namespace Samples.AspNet.CS.Controls
{
  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
    public sealed class TableProviderWebPart
 : WebPart, IWebPartTable
    {
        DataTable _table;

        public TableProviderWebPart()
        {
            _table = new DataTable();

            DataColumn col = new DataColumn();
            col.DataType = typeof(string);
            col.ColumnName = "Name";
            _table.Columns.Add(col);

            col = new DataColumn();
            col.DataType = typeof(string);
            col.ColumnName = "Address";
            _table.Columns.Add(col);

            col = new DataColumn();
            col.DataType = typeof(int);
            col.ColumnName = "ZIP Code";
            _table.Columns.Add(col);

            DataRow row = _table.NewRow();
            row["Name"] = "John Q. Public";
            row["Address"] = "123 Main Street";
            row["ZIP Code"] = 98000;
            _table.Rows.Add(row);
        }

        public PropertyDescriptorCollection Schema
        {
            get
            {
                return TypeDescriptor.GetProperties(_table.DefaultView[0]);
            }
        }
        public void GetTableData(TableCallback
 callback)
        {
                callback(_table.Rows);
        }

        public bool ConnectionPointEnabled
        {
            get
            {
                object o = ViewState["ConnectionPointEnabled"];
                return (o != null) ? (bool)o
 : true;
            }
            set
            {
                ViewState["ConnectionPointEnabled"] = value;
            }
        }

        [ConnectionProvider("Table", typeof(TableProviderConnectionPoint),
 AllowsMultipleConnections = true)]
        public IWebPartTable GetConnectionInterface()
        {
            return new TableProviderWebPart();
        }

        public class TableProviderConnectionPoint
 : ProviderConnectionPoint
        {
            public TableProviderConnectionPoint(MethodInfo callbackMethod,
 Type interfaceType, Type controlType,
            string name, string id, bool
 allowsMultipleConnections) : base(
                callbackMethod, interfaceType, controlType,
                name, id, allowsMultipleConnections)
            {
            }
            public override bool GetEnabled(Control
 control)
            {
                return ((TableProviderWebPart)control).ConnectionPointEnabled;
            }
        }
    }
    
    // This code sample demonstrates a custom WebPart controls that
 acts as 
    // a consumer in a Web Parts connection.
  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class TableConsumer : WebPart
  {
    private IWebPartTable _provider;
    private ICollection _tableData;

    private void GetTableData(object tableData)
    {
      _tableData = (ICollection)tableData;
    }

    protected override void OnPreRender(EventArgs
 e)
    {
      if (_provider != null)
      {
        _provider.GetTableData(new TableCallback(GetTableData));
      }
    }


    protected override void RenderContents(HtmlTextWriter
 writer)
    {
      if (_provider != null)
      {
        PropertyDescriptorCollection props = _provider.Schema;
        int count = 0;
        if (props != null && props.Count
 > 0 && _tableData != null)
        {
          foreach (PropertyDescriptor prop in
 props)
          {
            foreach (DataRow o in _tableData)
            {
              writer.Write(prop.DisplayName + ": " + o[count]);
            }
            writer.WriteBreak();
            writer.WriteLine();
            count = count + 1;
          }
        }
        else
        {
          writer.Write("No data");
        }
      }
      else
      {
        writer.Write("Not connected");
      }
    }
    [ConnectionConsumer("Table")]
    public void SetConnectionInterface(IWebPartTable
 provider)
    {
      _provider = provider;
    }

    public class TableConsumerConnectionPoint
 : ConsumerConnectionPoint
    {
      public TableConsumerConnectionPoint(MethodInfo callbackMethod,
 Type interfaceType, Type controlType,
      string name, string id, bool
 allowsMultipleConnections)
        : base(
        callbackMethod, interfaceType, controlType,
        name, id, allowsMultipleConnections)
      {
      }
    }
  }
}

コード例の 2 番目の部分は、静的な Web パーツ接続のカスタム コントロールをホストする Web ページです。ページの先頭に Register ディレクティブがあり、カスタム コントロールのプレフィックスと名前空間を宣言します。接続は <asp:webpartconnection> 要素を使用して宣言され、プロバイダ コントロールとコンシューマ コントロールは <asp:webpartzone> 要素内に宣言されます。

<%@ page language="C#" %>
<%@ register tagprefix="aspSample" 
    namespace="Samples.AspNet.CS.Controls" %>

<html>
<head runat="server">
    <title>IField Test Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:webpartmanager id="WebPartManager1" runat="server">
            <StaticConnections>
                <asp:WebPartConnection id=wp1 ProviderID=provider1 ConsumerID=consumer1>
                </asp:WebPartConnection>
            </StaticConnections>
        </asp:webpartmanager>
        <asp:webpartzone id="WebPartZone1" runat="server">
          <zoneTemplate>
            <aspSample:TableProviderWebPart ID=provider1 runat=Server 
              title="Web Parts Table Provider Control" />
            <aspSample:TableConsumer ID=consumer1 runat=Server 
              title="Web Parts Table Consumer Control"/>
          </zoneTemplate>
        </asp:webpartzone>
    </div>
    </form>
</body>
</html>

ブラウザにページを読み込みます。これらのコントロール間の接続は既に存在し、接続はページに静的接続として宣言されているため、プロバイダからのデータがコンシューマに表示されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ConsumerConnectionPoint クラス
ConsumerConnectionPoint メンバ
System.Web.UI.WebControls.WebParts 名前空間
GetConsumerConnectionPoints
その他の技術情報
ASP.NET Web パーツ ページ

ConsumerConnectionPoint プロパティ


ConsumerConnectionPoint メソッド


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

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ConsumerConnectionPoint クラス
System.Web.UI.WebControls.WebParts 名前空間
WebPartConnection
ProviderConnectionPoint

その他の技術情報

ASP.NET Web パーツ ページ
Web パーツ接続の概要

ConsumerConnectionPoint メンバ

コンシューマとして動作するサーバー コントロールがプロバイダとの接続を構成できるようにする、コネクション ポイント オブジェクトを定義します。

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ConsumerConnectionPoint ConsumerConnectionPoint クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ConsumerConnectionPoint クラス
System.Web.UI.WebControls.WebParts 名前空間
WebPartConnection
ProviderConnectionPoint

その他の技術情報

ASP.NET Web パーツ ページ
Web パーツ接続の概要



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「ConsumerConnectionPoint」の関連用語

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

   

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



ConsumerConnectionPointのページの著作権

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

©2026 GRAS Group, Inc.RSS