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


ReportingService2006.GetExtensionSettings Method

Returns a list of settings for a given extension.

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

Синтаксис

'Декларация
Public Function GetExtensionSettings ( _
    Extension As String _
) As ExtensionParameter()
public ExtensionParameter[] GetExtensionSettings (
    string Extension
)
public:
array<ExtensionParameter^>^ GetExtensionSettings (
    String^ Extension
)
public ExtensionParameter[] GetExtensionSettings (
    String Extension
)
public function GetExtensionSettings (
    Extension : String
) : ExtensionParameter[]

Параметры

  • Extension
    The name of the extension as it appears in the report server configuration file. Valid values are Report Server Email, Report Server DocumentLibrary and Report Server FileShare.

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

An array of ExtensionParameter objects that represent the list of known settings for a given extension.

Замечания

If the extension does not support any extension parameters, an empty list is returned.

Bb283192.note(ru-ru,SQL.90).gifПримечание.
Currently, the GetExtensionSettings method supports delivery extensions. Other extensions are not yet supported by this method.

Пример

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;

        ExtensionParameter[] extensionParams = null;

        try
        {
            extensionParams = 
                rs.GetExtensionSettings(
                    "Report Server DocumentLibrary");

            Console.WriteLine("Settings retrieved.");

            if (extensionParams != null)
            {
                foreach (ExtensionParameter extensionParam 
                    in extensionParams)
                {
                    Console.WriteLine("Value: {0}", 
                        extensionParam.Value);
                    Console.WriteLine("Name: {0}", 
                        extensionParam.Name);
                    Console.WriteLine("ReadOnly: {0}", 
                        extensionParam.ReadOnly);
                    Console.WriteLine("Required: {0}", 
                        extensionParam.Required);
                }
            }
        }

        catch (SoapException e)
        {
            Console.WriteLine(e.Detail.InnerXml.ToString());
        }
    }
}
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 extensionParams As ExtensionParameter() = Nothing

        Try
            extensionParams = _
                rs.GetExtensionSettings("Report Server " + _
                    "DocumentLibrary")

            Console.WriteLine("Settings retrieved.")

            If Not (extensionParams Is Nothing) Then
                Dim extensionParam As ExtensionParameter
                For Each extensionParam In extensionParams
                    Console.WriteLine("Value: {0}", _
                        extensionParam.Value)
                    Console.WriteLine("Name: {0}", _
                        extensionParam.Name)
                    Console.WriteLine("ReadOnly: {0}", _
                        extensionParam.ReadOnly)
                    Console.WriteLine("Required: {0}", _
                        extensionParam.Required)
                Next extensionParam
            End If

        Catch e As SoapException
            Console.WriteLine(e.Detail.InnerXml.ToString())
        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