Поделиться через


ReportingService2006.ListExtensions Method

Returns a list of extensions that are configured for a given extension type.

Пространство имен: ReportService2006
Сборка: ReportService2006 (in reportservice2006.dll)

Синтаксис

'Декларация
Public Function ListExtensions ( _
    ExtensionType As ExtensionTypeEnum _
) As Extension()
public Extension[] ListExtensions (
    ExtensionTypeEnum ExtensionType
)
public:
array<Extension^>^ ListExtensions (
    ExtensionTypeEnum ExtensionType
)
public Extension[] ListExtensions (
    ExtensionTypeEnum ExtensionType
)
public function ListExtensions (
    ExtensionType : ExtensionTypeEnum
) : Extension[]

Параметры

  • ExtensionType
    The extension type for which to list the configured extensions. Available values are Delivery, Render, Data, or All. For more information, see ExtensionTypeEnum.

Возвращаемое значение

Returns an array of Extension objects that contain the available extensions.

Пример

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

class Sample
{
    static void Main(string[] args)
    {
        ReportingService2006 rs = new ReportingService2006();
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +
            "ReportService2006.asmx";
        rs.Credentials = 
            System.Net.CredentialCache.DefaultCredentials;

        Extension[] extensions = null;

        // Retrieve a list of all supported 
        // data processing extensions. 
        try
        {
            extensions = rs.ListExtensions(ExtensionTypeEnum.Data);

            if (extensions != null)
            {
                foreach (Extension extension in extensions)
                {
                    Console.WriteLine("Name: {0}", extension.Name);
                }
            }
        }
        catch (SoapException e)
        {
            Console.WriteLine(e.Detail.OuterXml);
        }
    }
}
Imports System
Imports System.IO
Imports System.Text
Imports System.Web.Services
Imports System.Web.Services.Protocols

Class Sample

    Public Shared Sub Main()

        Dim rs As New ReportingService2006()
        rs.Url = "http://<Server Name>/_vti_bin" + _
            "/ReportServer/ReportService2006.asmx"
        rs.Credentials = _
            System.Net.CredentialCache.DefaultCredentials

        Dim extensions As Extension() = Nothing

        ' Retrieve a list of all supported 
        ' data processing extensions. 
        Try
            extensions = rs.ListExtensions(ExtensionTypeEnum.Data)

            If Not (extensions Is Nothing) Then
                Dim extension As Extension
                For Each extension In extensions
                    Console.WriteLine("Name: {0}", extension.Name)
                Next extension
            End If

        Catch e As SoapException
            Console.WriteLine(e.Detail.OuterXml)
        End Try

    End Sub

End Class

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2), Windows 2000 Professional, Windows 2000 Advanced Server, Windows XP Home Edition, Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005., Windows Vista, Windows Mobile 5.0, Windows Mobile 2003 for Pocket PC, Windows CE 5.0

См. также

Справочник

ReportingService2006 Class
ReportingService2006 Members
ReportService2006 Namespace