LogEntryInfo.FrequencyHint 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示您希望看到特定日志条目的频率。
public:
property Microsoft::SqlServer::Dts::Runtime::DTSLogEntryFrequency FrequencyHint { Microsoft::SqlServer::Dts::Runtime::DTSLogEntryFrequency get(); };
public Microsoft.SqlServer.Dts.Runtime.DTSLogEntryFrequency FrequencyHint { get; }
member this.FrequencyHint : Microsoft.SqlServer.Dts.Runtime.DTSLogEntryFrequency
Public ReadOnly Property FrequencyHint As DTSLogEntryFrequency
属性值
来自 DTSLogEntryFrequency 的值。
示例
下面的代码示例循环访问 LogEntryInfos 集合,然后打印每个 LogEntryInfo 找到的属性,包括 FrequencyHint。
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}
名称:诊断