LogProviderInfo Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menyediakan informasi tentang penyedia log yang ditemukan di komputer. Kelas ini tidak dapat diwariskan.
public ref class LogProviderInfo sealed : Microsoft::SqlServer::Dts::Runtime::DtsObject, Microsoft::SqlServer::Dts::Runtime::IDTSName
public sealed class LogProviderInfo : Microsoft.SqlServer.Dts.Runtime.DtsObject, Microsoft.SqlServer.Dts.Runtime.IDTSName
type LogProviderInfo = class
inherit DtsObject
interface IDTSName
Public NotInheritable Class LogProviderInfo
Inherits DtsObject
Implements IDTSName
- Warisan
- Penerapan
Contoh
Contoh kode berikut mengambil dan melakukan iterasi melalui semua properti setiap penyedia log dalam kumpulan penyedia log.
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
Contoh Output:
CreationName DTS.LogProviderTextFile.1
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.1
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.1
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
__________________________
Keterangan
Kelas ini mewarisi dari DtsObject dan IDTSName.
Properti
| CreationName |
Mengembalikan string yang digunakan oleh mesin runtime untuk membuat instans LogProvider objek dan menambahkan objek ke LogProviders koleksi. Properti ini bersifat hanya baca. |
| Description |
Mengembalikan deskripsi untuk penyedia log. Properti ini bersifat hanya baca. |
| FileName |
Mengembalikan nama file penyedia log. Properti ini bersifat hanya baca. |
| FileNameVersionString |
Mengembalikan string versi nama file dari penyedia log. Properti ini bersifat hanya baca. |
| IconFile |
Mengembalikan nama file yang berisi ikon. Properti ini bersifat hanya baca. |
| IconResource |
Mengembalikan pengidentifikasi sumber daya ikon. Properti ini bersifat hanya baca. |
| ID |
Mengembalikan GUID yang secara unik mengidentifikasi penyedia log ini. Properti ini bersifat hanya baca. |
| LogProviderContact |
Mengembalikan informasi kontak untuk penyedia log. Properti ini bersifat hanya baca. |
| LogProviderType |
Mengembalikan jenis penyedia log. Properti ini bersifat hanya baca. |
| Name |
Mendapatkan atau menetapkan nama untuk penyedia log. |
| UITypeName |
Mengembalikan nama UIType untuk antarmuka pengguna penyedia log. |
Metode
| Equals(Object) |
Menentukan apakah dua instans objek sama. (Diperoleh dari DtsObject) |
| GetHashCode() |
Mengembalikan kode hash untuk instans ini. (Diperoleh dari DtsObject) |