LogProviderInfos.Contains(Object) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬렉션 내 항목이 예외를 던지지 않고 인덱싱을 통해 접근할 수 있는지 나타내는 불리언을 반환합니다.
public:
bool Contains(System::Object ^ index);
public bool Contains(object index);
member this.Contains : obj -> bool
Public Function Contains (index As Object) As Boolean
매개 변수
- index
- Object
컬렉션에서 찾을 객체의 LogProviderInfo 이름, 식별자, ID 또는 인덱스.
반품
이름, 신원, ID 또는 인덱스로 컬렉션에 접근할 수 있는지 나타내는 불리언입니다. true가 참인 경우, LogProviderInfos[index] 구문을 사용하여 컬렉션에 접근할 수 있음을 나타냅니다. false 값은 인덱싱을 사용해 컬렉션에서 LogProviderInfos 항목을 가져올 수 없음을 나타냅니다; 이 속성을 사용하면 예외가 발생합니다.
예제
다음 코드 샘플에서는 "텍스트 파일을 위한 SSIS 로그 제공자"라는 이름의 로그 제공자가 컬렉션에 있는지 확인하는 방법을 사용합니다 Contains . 이 메서드는 .Boolean
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;
//See if the collection contains a log provider
// with the name "SSIS log provider for Text files".
Boolean logText = infos.Contains("SSIS log provider for Text files");
Console.WriteLine("Contains Text log provider? {0}", logText);
}
}
}
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
'See if the collection contains a log provider
' with the name "SSIS log provider for Text files".
Dim logText As Boolean = infos.Contains("SSIS log provider for Text files")
Console.WriteLine("Contains Text log provider? {0}", logText)
End Sub
End Class
End Namespace
샘플 출력:
텍스트 로그 제공자를 포함하나요? True