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

IExtenderListService インターフェイス

拡張プロバイダリスト生成できるインターフェイス提供します

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

Public Interface IExtenderListService
Dim instance As IExtenderListService
public interface IExtenderListService
public interface class IExtenderListService
public interface IExtenderListService
public interface IExtenderListService
解説解説
使用例使用例

IExtenderListService使用して、現在アクティブ拡張プロバイダセット取得する例を次に示します

Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Drawing
Imports System.Data
Imports System.Windows.Forms

' This control lists any active extender providers.
Public Class ExtenderListServiceControl
   Inherits System.Windows.Forms.UserControl
   Private extenderListService As IExtenderListService
   Private extenderNames() As String
   
   Public Sub New()
      extenderNames = New String(-1) {}
      Me.Width = 600
    End Sub

    ' Queries the IExtenderListService when the control is sited 
    ' in design mode.
    Public Overrides Property
 Site() As System.ComponentModel.ISite
        Get
            Return MyBase.Site
        End Get
        Set(ByVal Value As
 System.ComponentModel.ISite)
            MyBase.Site = Value
            If Me.DesignMode Then
                extenderListService = CType(Me.GetService(GetType(IExtenderListService)),
 IExtenderListService)
                If Not (extenderListService
 Is Nothing) Then
                    Dim extenders As IExtenderProvider()
 = extenderListService.GetExtenderProviders()
                    extenderNames = New String(extenders.Length)
 {}
                    Dim i As Integer
                    For i = 0 To extenders.Length
 - 1
                        Dim types As Type()
 = Type.GetTypeArray(extenders)
                        extenderNames(i) = "ExtenderProvider #"
 + i.ToString() + ":  " + types(i).FullName
                    Next i
                End If
            Else
                extenderListService = Nothing
                extenderNames = New String(-1)
 {}
            End If
        End Set
    End Property

    ' Draws a list of any active extender providers
    Protected Overrides Sub
 OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        If extenderNames.Length = 0 Then
            e.Graphics.DrawString("No active extender providers",
 New Font("Arial", 9), New
 SolidBrush(Color.Black), 10, 10)
        Else
            e.Graphics.DrawString("List of types of active extender
 providers", New Font("Arial",
 9), New SolidBrush(Color.Black), 10, 10)
        End If
        Dim i As Integer
        For i = 0 To extenderNames.Length -
 1
            e.Graphics.DrawString(extenderNames(i), New Font("Arial",
 8), New SolidBrush(Color.Black), 10, 25 + i * 10)
        Next i
    End Sub

End Class
using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace ExtenderListServiceExample
{
    // This control lists any active extender providers.
    public class ExtenderListServiceControl
 : System.Windows.Forms.UserControl
    {        
        private IExtenderListService extenderListService;
        private string[] extenderNames;

        public ExtenderListServiceControl()
        {            
            extenderNames = new string[0];
            this.Width = 600;
        }

        // Queries the IExtenderListService when the control is sited
 
        // in design mode.
        public override System.ComponentModel.ISite Site
        {
            get
            {
                return base.Site;
            }
            set
            {
                base.Site = value;
                if( this.DesignMode )
                {
                    extenderListService = (IExtenderListService)this.GetService(typeof(IExtenderListService));
                    if( extenderListService != null
 )
                    {
                        IExtenderProvider[] extenders = extenderListService.GetExtenderProviders();
                        extenderNames = new string[extenders.Length];
                        for( int i=0; i<extenders.Length;
 i++ )
                            extenderNames[i] = "ExtenderProvider #"+i.ToString()+":
  "+extenders[i].GetType().FullName;
                    }
                }
                else
                {
                    extenderListService = null;
                    extenderNames = new string[0];
                }
            }
        }

        // Draws a list of any active extender providers
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs
 e)
        {
            if( extenderNames.Length == 0 )
                e.Graphics.DrawString("No active extender providers", new
 Font("Arial", 9), new SolidBrush(Color.Black), 10,
 10);
            else
                e.Graphics.DrawString("List of types of active extender providers",
 new Font("Arial", 9), new SolidBrush(Color.Black),
 10, 10);
            for(int i=0; i<extenderNames.Length;
 i++)
                e.Graphics.DrawString(extenderNames[i], new Font("Arial",
 8), new SolidBrush(Color.Black), 10, 25+(i*10));
        }        
    }
}
#using <system.dll>
#using <system.drawing.dll>
#using <system.windows.forms.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::ComponentModel;
using namespace System::ComponentModel::Design;
using namespace System::Windows::Forms;

namespace ExtenderListServiceExample
{
   // This control lists any active extender providers.
   public ref class ExtenderListServiceControl:
 public UserControl
   {
   private:
      IExtenderListService^ extenderListService;
      array<String^>^extenderNames;

   public:
      ExtenderListServiceControl()
      {
         this->Width = 600;
      }

      property ISite^ Site 
      {
         // Queries the IExtenderListService when the control is sited
         // in design mode.
         virtual ISite^ get() override
         {
            return __super::Site;
         }

         virtual void set( ISite^ value ) override
         {
            __super::Site = value;
            if ( this->DesignMode )
            {
               extenderListService = dynamic_cast<IExtenderListService^>(this->GetService(
 IExtenderListService::typeid ));
               if ( extenderListService != nullptr )
               {
                  array<IExtenderProvider^>^extenders = extenderListService->GetExtenderProviders();
                  extenderNames = gcnew array<String^>(extenders->Length);
                  for ( int i = 0; i < extenders->Length;
 i++ )
                     extenderNames[ i ] = String::Concat( "ExtenderProvider
 #", i.ToString(), ":  ", extenders[ i ]->GetType()->FullName
 );
               }
            }
            else
            {
               extenderListService = nullptr;
            }
         }
      }

   protected:

      // Draws a list of any active extender providers
      virtual void OnPaint( PaintEventArgs^ e ) override
      {
         if ( extenderNames->Length == 0 )
                  e->Graphics->DrawString( "No active extender providers",
 gcnew System::Drawing::Font( "Arial",9 ), gcnew SolidBrush( Color::Black
 ), 10, 10 );
         else
                  e->Graphics->DrawString( "List of types of active extender
 providers", gcnew System::Drawing::Font( "Arial",9 ), gcnew SolidBrush(
 Color::Black ), 10, 10 );

         for ( int i = 0; i < extenderNames->Length;
 i++ )
            e->Graphics->DrawString( extenderNames[ i ], gcnew System::Drawing::Font(
 "Arial",8 ), gcnew SolidBrush( Color::Black ), 10, 25 + (i * 10) );
      }
   };
}
package ExtenderListServiceExample;
import System.*;
import System.Collections.*;
import System.ComponentModel.*;
import System.ComponentModel.Design.*;
import System.Drawing.*;
import System.Data.*;
import System.Windows.Forms.*;

// This control lists any active extender providers.
public class ExtenderListServiceControl extends
 System.Windows.Forms.UserControl
{
    private IExtenderListService extenderListService;
    private String extenderNames[];

    public ExtenderListServiceControl()
    {
        extenderNames = new String[0];
        this.set_Width(600);
    } //ExtenderListServiceControl

    // Queries the IExtenderListService when the control is sited 
    // in design mode.
    /** @property 
     */
    public System.ComponentModel.ISite get_Site()
    {
        return super.get_Site();
    }//get_Site

    /** @property 
     */
    public void set_Site(System.ComponentModel.ISite
 value)
    {
        super.set_Site(value);
        if (this.get_DesignMode()) {
            extenderListService = (IExtenderListService)this.GetService(
                IExtenderListService.class.ToType());
            if (extenderListService != null)
 {
                IExtenderProvider extenders[] = extenderListService.
                    GetExtenderProviders();
                extenderNames = new String[extenders.length];
                for (int i = 0; i < extenders.length;
 i++) {
                    extenderNames.set_Item(i, "ExtenderProvider #" + i
 + ":  " 
                        + extenders.get_Item(i).GetType().get_FullName());
                }
            }
        }
        else {
            extenderListService = null;
            extenderNames = new String[0];
        }
    } //set_Site

    // Draws a list of any active extender providers
    protected void OnPaint(System.Windows.Forms.PaintEventArgs
 e)
    {
        if (extenderNames.length == 0) {
            e.get_Graphics().DrawString("No active extender providers",
 
                new Font("Arial", 9), new
 SolidBrush(Color.get_Black()),
                10, 10);
        }
        else {
            e.get_Graphics().DrawString("List of types of active extender "
 
                + " providers", new Font("Arial",
 9), 
                new SolidBrush(Color.get_Black()), 10, 10);
        }
        for (int i = 0; i < extenderNames.length;
 i++) {
            e.get_Graphics().DrawString(extenderNames.get_Item(i) + ""
,
                new Font("Arial", 8), new
 SolidBrush(Color.get_Black()), 10f,
                (float)(25 + (i * 10)));
        }
    } //OnPaint
} //ExtenderListServiceControl
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IExtenderListService メンバ
System.ComponentModel.Design 名前空間
IExtenderProvider インターフェイス

IExtenderListService メソッド


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

参照参照

関連項目

IExtenderListService インターフェイス
System.ComponentModel.Design 名前空間
IExtenderProvider インターフェイス

IExtenderListService メンバ



このページでは「.NET Framework クラス ライブラリ リファレンス」からIExtenderListServiceを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIExtenderListServiceを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIExtenderListService を検索

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

辞書ショートカット

すべての辞書の索引

「IExtenderListService」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS