//=================================================================================================

        public override void ProvideComponentProperties()
        {
            // do the baseclass work first
            base.ProvideComponentProperties();
            RemoveAllInputsOutputsAndCustomProperties();

            ComponentMetaData.Name = "WMI Source";

            // Get the runtime connection collection.
            IDTSRuntimeConnectionCollection100 pIDTSRuntimeConnectionCollection = ComponentMetaData.RuntimeConnectionCollection;

            // See if there	is already a runtime object	called "WmiConnection".
            IDTSRuntimeConnection100 pIDTSRuntimeConnection;

            try
            {
                pIDTSRuntimeConnection = pIDTSRuntimeConnectionCollection[CONNECTION_NAME];
            }
            catch (Exception)
            {
                // must not be there, make one
                pIDTSRuntimeConnection      = pIDTSRuntimeConnectionCollection.New();
                pIDTSRuntimeConnection.Name = CONNECTION_NAME;
            }

            // add an output
            ComponentMetaData.OutputCollection.New();

            // Get the assembly version and set that as our current version.
            SetComponentVersion();

            // Add the command property and make it expressionable.
            IDTSCustomProperty100 propCommand = ComponentMetaData.CustomPropertyCollection.New();

            propCommand.Name           = WQL_QUERY;
            propCommand.UITypeEditor   = "Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Culture=neutral, PublicKeyToken=89845dcd8080cc91";
            propCommand.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;
            propCommand.Value          = string.Empty;


            // name the output
            ComponentMetaData.OutputCollection[0].Name = "Wmi source adapter output";
            ComponentMetaData.OutputCollection[0].ExternalMetadataColumnCollection.IsUsed = true;

            // Set we want to validate external metadata
            ComponentMetaData.ValidateExternalMetadata = true;
        }
Example #2
0
 /// <summary>
 /// Initializes connection used at runtime
 /// </summary>
 private void InitRunTimeConnection(IDTSRuntimeConnectionCollection100 connections)
 {
     try
     {
         IDTSRuntimeConnection100 conMgr = connections[Constants.CONNECTION_MANAGER_NAME_CONFIG];
         _configConnection   = new OleDbConnection(conMgr.ConnectionManager.ConnectionString);
         ConnectionManagerId = conMgr.ConnectionManagerID;
     }
     catch (Exception)
     {
         try
         {
             IDTSRuntimeConnection100 conMgr = connections[Constants.CONNECTION_MANAGER_NAME_CONFIG];
             _configConnection   = (DbConnection)conMgr.ConnectionManager.AcquireConnection(null);
             ConnectionManagerId = conMgr.ConnectionManagerID;
         }
         catch (Exception)
         {
         }
     }
 }
Example #3
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="connections">SSIS connections</param>
 /// <param name="needsStandardConfiguration">Is standard configuration needed?</param>
 public StandardConfiguration(IDTSRuntimeConnectionCollection100 connections, bool needsStandardConfiguration)
 {
     _needsStandardConfiguration = needsStandardConfiguration;
     _connections = null;
     InitRunTimeConnection(connections);
 }
Example #4
0
 private string ReturnConnectionObject(IDTSRuntimeConnectionCollection100 cns, string name, object tns)
 {
     return cns[name].ConnectionManager.AcquireConnection(tns).ToString();
 }
Example #5
0
 internal BipsProxyIDTSRuntimeConnectionCollection100(IDTSRuntimeConnectionCollection100 innerObject)
 {
     _innerObject = innerObject;
 }