IDTSPropertiesProvider.Properties Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene una collezione che contiene DtsProperty oggetti con proprietà e metodi da utilizzare con il contenitore.
public:
property Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ Properties { Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ get(); };
public Microsoft.SqlServer.Dts.Runtime.DtsProperties Properties { get; }
member this.Properties : Microsoft.SqlServer.Dts.Runtime.DtsProperties
Public ReadOnly Property Properties As DtsProperties
Valore della proprietà
Una DtsProperties collezione che contiene DtsProperty oggetti associati al contenitore.
Esempio
Una delle classi che implementa l'interfaccia IDTSPropertiesProvider è la Package classe. Il seguente esempio di codice mostra come la Package classe restituisce una DtsProperties collezione dal Properties metodo. L'esempio di codice poi è iterato tra le proprietà, mostrando diversi valori.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.SSIS.Samples
{
class Program
{
static void Main(string[] args)
{
Application app = new Application();
Package p1 = new Package();
// Retrieve the information from the Properties collection.
// Each item in the collection represents a property on the
// object. This example reviews the properties of the
// Package object.
DtsProperties props = p1.Properties;
String name;
String path;
TypeCode propType;
foreach (DtsProperty prop in props)
{
propType = prop.Type;
name = prop.Name;
path = prop.GetPackagePath(p1);
Console.WriteLine("Name {0}, Type {1}, Package path{2}", name, propType, path);
}
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Namespace Microsoft.SqlServer.SSIS.Samples
Class Program
Shared Sub Main(ByVal args() As String)
Dim app As Application = New Application()
Dim p1 As Package = New Package()
' Retrieve the information from the Properties collection.
' Each item in the collection represents a property on the
' object. This example reviews the properties of the
' Package object.
Dim props As DtsProperties = p1.Properties
Dim name As String
Dim path As String
Dim propType As TypeCode
Dim prop As DtsProperty
For Each prop In props
propType = prop.Type
name = prop.Name
path = prop.GetPackagePath(p1)
Console.WriteLine("Name {0}, Type {1}, Package path{2}", name, propType, path)
Next
End Sub
End Class
End Namespace
Output di esempio:
Nome CertificateContest, Tipo int64, Package path\Package.CertificateContext
Nome CertificateObject, Type Object, Package path\Package.CertificateObject
Nome CheckpointNomefile, Stringa di Tipo, Path del Package\Package.CheckpointFileName
Nome CheckpointUsage, Type Object, Package path\Package.CheckpointUsage
Name CheckSignatureOnLoad, Tipo Boolean, Path del Package\Package.CheckSignatureOnLoad
Nomi Configurazioni, Oggetto Tipo, Percorso del Pacchetto\Package.Configurazioni
Nome Connessioni, Oggetto Tipo, Path del Package\Package.Connessioni
Nome CreationData, Tipare DateTime, Path Package\Package.CreationDate
Nome CreationName, Stringa di Tipo, Path del Package\Package.NomeCreazione
Nome CreatoreNomeComputer, Stringa di Tipo, Path del Pacchetto\Package.CreatorComputerName
Nome CreatorName, Type String, Package path\Package.CreatorName