LogProviderInfo 类

Provides information about the log providers found on the computer. This class cannot be inherited.

继承层次结构

System. . :: . .Object
  Microsoft.SqlServer.Dts.Runtime. . :: . .DtsObject
    Microsoft.SqlServer.Dts.Runtime..::..LogProviderInfo

命名空间:  Microsoft.SqlServer.Dts.Runtime
程序集:  Microsoft.SqlServer.ManagedDTS(在 Microsoft.SqlServer.ManagedDTS.dll 中)

语法

声明
Public NotInheritable Class LogProviderInfo _
    Inherits DtsObject _
    Implements IDTSName
用法
Dim instance As LogProviderInfo
public sealed class LogProviderInfo : DtsObject, 
    IDTSName
public ref class LogProviderInfo sealed : public DtsObject, 
    IDTSName
[<SealedAttribute>]
type LogProviderInfo =  
    class
        inherit DtsObject
        interface IDTSName
    end
public final class LogProviderInfo extends DtsObject implements IDTSName

LogProviderInfo 类型公开以下成员。

属性

  名称 说明
公共属性 CreationName Returns the string used by the runtime engine to create an instance of the LogProvider object and to add the object to the LogProviders collection. This property is read-only.
公共属性 Description Returns the description for the log provider. This property is read-only.
公共属性 FileName Returns the name of the log provider file. This property is read-only.
公共属性 FileNameVersionString Returns the file name version string of the log provider. This property is read-only.
公共属性 IconFile Returns the name of the file that contains the icon. This property is read-only.
公共属性 IconResource Returns the resource identifier of the icon. This property is read-only.
公共属性 ID Returns the GUID that uniquely identifies this log provider. This property is read-only.
公共属性 LogProviderContact Returns the contact information for the log provider. This property is read-only.
公共属性 LogProviderType Returns the type of the log provider. This property is read-only.
公共属性 Name Gets or sets a name for the log provider.
公共属性 UITypeName Returns the UIType name for the log provider user interface.

页首

方法

  名称 说明
公共方法 Equals Determines whether two object instances are equal. (从 DtsObject 继承。)
受保护方法 Finalize (从 Object 继承。)
公共方法 GetHashCode Returns the hash code for this instance. (从 DtsObject 继承。)
公共方法 GetType (从 Object 继承。)
受保护方法 MemberwiseClone (从 Object 继承。)
公共方法 ToString (从 Object 继承。)

页首

注释

This class inherits from DtsObject and IDTSName.

示例

The following code example retrieves and iterates through all the properties of each log provider in the log provider collection.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;

namespace LogProvInfoProperties
{
    class Program
    {
        static void Main(string[] args)
        {
        Application app = new Application();
        LogProviderInfos infos = app.LogProviderInfos;
 
        foreach(LogProviderInfo info in infos)
          {
            Console.WriteLine("CreationName           {0}", info.CreationName);
            Console.WriteLine("Description            {0}", info.Description);
            Console.WriteLine("FileName:              {0}", info.FileName);
            //Console.WriteLine("FileNameVersionString: {0}", info.FileNameVersionString);
            Console.WriteLine("IconFile:              {0}", info.IconFile);
            Console.WriteLine("IconResource:          {0}", info.IconResource);
            Console.WriteLine("ID:                    {0}", info.ID);
            Console.WriteLine("LogProviderContact     {0}", info.LogProviderContact);
            Console.WriteLine("LogProviderType        {0}", info.LogProviderType);
            Console.WriteLine("Name:                  {0}", info.Name);
            Console.WriteLine("UITypeName             {0}", info.UITypeName); 
            Console.WriteLine("__________________________");
           
          }
        }
    }
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
 
Namespace LogProvInfoProperties
    Class Program
        Shared  Sub Main(ByVal args() As String)
        Dim app As Application =  New Application() 
        Dim infos As LogProviderInfos =  app.LogProviderInfos 
 
        Dim info As LogProviderInfo
        For Each info In infos
            Console.WriteLine("CreationName           {0}", info.CreationName)
            Console.WriteLine("Description            {0}", info.Description)
            Console.WriteLine("FileName:              {0}", info.FileName)
            'Console.WriteLine("FileNameVersionString: {0}", info.FileNameVersionString)
            Console.WriteLine("IconFile:              {0}", info.IconFile)
            Console.WriteLine("IconResource:          {0}", info.IconResource)
            Console.WriteLine("ID:                    {0}", info.ID)
            Console.WriteLine("LogProviderContact     {0}", info.LogProviderContact)
            Console.WriteLine("LogProviderType        {0}", info.LogProviderType)
            Console.WriteLine("Name:                  {0}", info.Name)
            Console.WriteLine("UITypeName             {0}", info.UITypeName) 
            Console.WriteLine("__________________________")
 
        Next
        End Sub
    End Class
End Namespace

Sample Output:

CreationName DTS.LogProviderTextFile.2

Description Writes log entries for events to a CSV file

FileName: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTSLog.dll

IconFile: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTSLog.dll

IconResource: 0

ID: {59B2C6A5-663F-4C20-8863-C83F9B72E2EB}

LogProviderContact

LogProviderType DTS10

Name: SSIS log provider for Text files

UITypeName Microsoft.DataTransformationServices.Design.FileConnectionsLogProviderUI, Microsoft.DataTransformationServices.Design, Version=10.0.000.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91


CreationName DTS.LogProviderSQLProfiler.2

Description Generates SQL traces that may be captured in SQL Server Profiler

FileName: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTSLog.dll

IconFile: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTSLog.dll

IconResource: 0

ID: {5C0B8D21-E9AA-462E-BA34-30FF5F7A42A1}

LogProviderContact

LogProviderType DTS10

Name: SSIS log provider for SQL Server Profiler

UITypeName Microsoft.DataTransformationServices.Design.FileConnectionsLogProviderUI, Microsoft.DataTransformationServices.Design, Version=10.0.000.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91


CreationName DTS.LogProviderSQLServer.2

Description Writes log entries for events to a SQL Server database

FileName: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTSLog.dll

IconFile: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTSLog.dll

IconResource: 0

ID: {6AA833A1-E4B2-4431-831B-DE695049DC61}

LogProviderContact

LogProviderType DTS10

Name: SSIS log provider for SQL Server

UITypeName Microsoft.DataTransformationServices.Design.OleDbConnectionsLogProviderUI, Microsoft.DataTransformationServices.Design, Version=10.0.000.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91


线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。