LogEntryInfo.CreationName 属性

定义

返回 Integration Services 运行时用来创建对象的实例 LogEntryInfo 并将对象添加到集合的 LogEntryInfos 字符串。 此属性为只读。

public:
 property System::String ^ CreationName { System::String ^ get(); };
public string CreationName { get; }
member this.CreationName : string
Public ReadOnly Property CreationName As String

属性值

一个包含名称的字符串。 它可能是托管程序集的完全限定程序集名称,也可能是 COM DLL 的 PROGID 或 CLSID。

实现

示例

下面的代码示例循环访问 LogEntryInfos 集合,然后打印每个 LogEntryInfo 找到的属性,包括 CreationName

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

namespace LogEntryInfosTest  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            // The package is one of the SSIS Samples.  
            string mySample = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx";  

            Application app = new Application();  
            Package pkg = app.LoadPackage(mySample, null);  
            LogEntryInfos logInfos = pkg.LogEntryInfos;  

            Console.WriteLine("Number of log entries:  {0}", logInfos.Count.ToString());  
            foreach (LogEntryInfo logInfo in logInfos)  
            {  
                Console.WriteLine("CreationName:   {0}", logInfo.CreationName);  
                Console.WriteLine("Description:    {0}", logInfo.Description);  
                Console.WriteLine("FrequencyHint:  {0}", logInfo.FrequencyHint);  
                Console.WriteLine("ID:             {0}", logInfo.ID);  
                Console.WriteLine("Name:           {0}", logInfo.Name);  
            }  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace LogEnTryInfosTest  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            ' The package is one of the SSIS Samples.  
            Dim mySample As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx"   

            Dim app As Application =  New Application()   
            Dim pkg As Package =  app.LoadPackage(mySample,Nothing)   
            Dim logInfos As LogEnTryInfos =  pkg.LogEnTryInfos   

            Console.WriteLine("Number of log entries:  {0}", logInfos.Count.ToString())  
            Dim logInfo As LogEnTryInfo  
            For Each logInfo In logInfos  
                Console.WriteLine("CreationName:   {0}", logInfo.CreationName)  
                Console.WriteLine("Description:    {0}", logInfo.Description)  
                Console.WriteLine("FrequencyHint:  {0}", logInfo.FrequencyHint)  
                Console.WriteLine("ID:             {0}", logInfo.ID)  
                Console.WriteLine("Name:           {0}", logInfo.Name)  
            Next  
        End Sub  
    End Class  
End Namespace  

示例输出:

日志条目数:1

CreationName:

说明:日志包诊断信息,例如最大并发可执行文件

FrequencyHint:一致

ID: {65F44252-EB0C-4CCB-ADE4-BA4AB86B4CF9}

名称:诊断

适用于