Export (0) Print
Expand All

LogProvider.Properties Property

Returns a DtsProperties collection, which contains a collection of DtsProperty objects.

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

public DtsProperties Properties { get; }

Implements

IDTSPropertiesProvider.Properties

The following example retrieves the Properties of the log provider in the package. The samples package was modified in the designer before loading to log to the SSIS log provider for Text files.

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

namespace LogProvider_Properties_Test
{
    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";

            // Create the Application, and load the sample.
            Application app = new Application();
            Package pkg = app.LoadPackage(mySample, null);

            // Get the LogProviders collection.
            LogProviders logProvs = pkg.LogProviders;

            // Get the "SSIS log provider for Text files"
            // provider from the collection.
            LogProvider textLogProv = logProvs["SSIS log provider for Text files"];

            // Get the Properties collection from the Text provider,
            // and iterate through the Text provider properties,  
            // printing the property names of the Text provider.
            DtsProperties logProperties = textLogProv.Properties;

            foreach (DtsProperty logProp in logProperties)
                Console.WriteLine(logProp.Name);
                
        }
    }
}

Sample Output:

ConfigString

CreationName

Description

Enabled

Community Additions

ADD
Show:
© 2014 Microsoft