Share via


PackageInfos Class

Contains a collection of packages found in Microsoft SQL Server or the Integration Services service. This class cannot be inherited.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Dts.Runtime.DTSReadOnlyCollectionBase
    Microsoft.SqlServer.Dts.Runtime.PackageInfos

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

Syntax

'Declaration
Public NotInheritable Class PackageInfos _
    Inherits DTSReadOnlyCollectionBase
'Usage
Dim instance As PackageInfos
public sealed class PackageInfos : DTSReadOnlyCollectionBase
public ref class PackageInfos sealed : public DTSReadOnlyCollectionBase
[<SealedAttribute>]
type PackageInfos =  
    class 
        inherit DTSReadOnlyCollectionBase 
    end
public final class PackageInfos extends DTSReadOnlyCollectionBase

The PackageInfos type exposes the following members.

Properties

  Name Description
Public property Count Gets the number of elements contained in the DTSReadOnlyCollectionBase instance. (Inherited from DTSReadOnlyCollectionBase.)
Public property IsSynchronized Gets a value that indicates whether access to the DTSReadOnlyCollectionBase is synchronized (thread-safe). (Inherited from DTSReadOnlyCollectionBase.)
Public property Item Retrieves the PackageInfo object from the collection.
Public property SyncRoot Gets an object that can be used to synchronize access to the DTSReadOnlyCollectionBase. (Inherited from DTSReadOnlyCollectionBase.)

Top

Methods

  Name Description
Public method Contains Returns a Boolean that indicates whether an object can be retrieved from the collection by using the name, index, GUID, or description parameter.
Public method CopyTo Copies the entire DTSReadOnlyCollectionBase to a compatible one-dimensional array, starting at the specified index of the target array. (Inherited from DTSReadOnlyCollectionBase.)
Public method Equals (Inherited from Object.)
Public method GetEnumerator Returns an enumerator for use in iterating over the PackageInfos collection.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Remarks

This collection enumerates packages. You can retrieve packages that are stored in the Integration Services service and then iterate through them, or you can retrieve packages that are stored in SQL Server. For a sample of how to retrieve Integration Services service packages programmatically, see GetDtsServerPackageInfos. For information about retrieving SQL Server packages programmatically, see GetPackageInfos.

Examples

The following code example instantiates a PackageInfos object from the Application object.

PackageInfos pInfos = app.GetDtsServerPackageInfos(@"File System", "YOURSERVER");

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SqlServer.Dts.Runtime Namespace