Exemple #1
0
        private void Dispose(bool disposing)
        {
            if (_isDisposed)
            {
                return;
            }

            lock (this)
            {
                if (_isDisposed)
                {
                    return;
                }

                _isDisposed = true;

                if (disposing)
                {
                    GC.SuppressFinalize(this);
                }

                if (_disposeLogProcessor)
                {
                    LogProcessor.Dispose();
                }

                var logProviders = LogProviders?.GetEnumerator();
                while (logProviders != null && logProviders.MoveNext())
                {
                    (logProviders.Current as IDisposable)?.Dispose();
                }
            }
        }
Exemple #2
0
        private static void GetPackageLogsForPackage(string PackagePath)
        {
            Application dtsapp = new Application();
            Package     p      = dtsapp.LoadPackage(PackagePath, null);

            Console.WriteLine("Executing Package {0}", PackagePath);
            p.Execute();

            Console.WriteLine("Package Execution Complete");
            Console.WriteLine("LogProviders");
            LogProviders logProviders = p.LogProviders;

            Console.WriteLine("LogProviders Count: {0}", logProviders.Count);
            LogProviderEnumerator logProvidersEnum = logProviders.GetEnumerator();

            while (logProvidersEnum.MoveNext())
            {
                LogProvider logProv = logProvidersEnum.Current;
                Console.WriteLine("ConfigString:   {0}", logProv.ConfigString);
                Console.WriteLine("CreationName    {0}", logProv.CreationName);
                Console.WriteLine("DelayValidation {0}", logProv.DelayValidation);
                Console.WriteLine("Description     {0}", logProv.Description);
                Console.WriteLine("HostType        {0}", logProv.HostType);
                Console.WriteLine("ID              {0}", logProv.ID);
                Console.WriteLine("InnerObject     {0}", logProv.InnerObject);
                Console.WriteLine("Name            {0}", logProv.Name);
                Console.WriteLine("-----------------");
            }
            Console.Read();
        }
Exemple #3
0
 protected BaseSmsc()
 {
     _logProviders = new LogProviders();
     _logHandlers = new Dictionary<string, ILogHandler>();
     ReadLogProvidersConfiguration();
     LoadLogProviders();
 }
Exemple #4
0
        public void AddNewProvider()
        {
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.ShowDialog();
            var             fileName = dialog.FileName;
            LogFileProvider provider = new LogFileProvider();

            provider.FilePath = fileName;
            LogProviders.Add(provider);
            SelectProvider(provider);
        }
 public void Dispose()
 {
     LogProviders.ToList().ForEach(lp => lp.Dispose());
 }
        private void InitializeTasks()
        {
            long               a0 = CensusPackage.CertificateContext;
            X509Certificate    a1 = CensusPackage.CertificateObject;
            bool               a2 = CensusPackage.CheckSignatureOnLoad;
            string             a3 = CensusPackage.CheckpointFileName;
            DTSCheckpointUsage a4 = CensusPackage.CheckpointUsage;
            Configurations     a5 = CensusPackage.Configurations;
            DateTime           a6 = CensusPackage.CreationDate;
            string             a7 = CensusPackage.CreatorComputerName;
            string             a8 = CensusPackage.CreatorName;
            Connections        a9 = CensusPackage.Connections;
            IDTSEvents         b0 = CensusPackage.DesignEvents;
            string             b1 = CensusPackage.DesignTimeProperties;
            string             b2 = CensusPackage.DumpDescriptor;
            bool               b3 = CensusPackage.DumpOnAnyError;
            bool               b4 = CensusPackage.EnableConfigurations;
            bool               b5 = CensusPackage.EnableDump;
            bool               b6 = CensusPackage.EncryptCheckpoints;
            DtsErrors          b7 = CensusPackage.Errors;
            Executables        b8 = CensusPackage.Executables;
            ExtendedProperties b9 = CensusPackage.ExtendedProperties;
            bool               c0 = CensusPackage.FailPackageOnFailure;
            bool               c1 = CensusPackage.HasExpressions;
            bool               c2 = CensusPackage.IgnoreConfigurationsOnLoad;
            bool               c3 = CensusPackage.InteractiveMode;
            LogProviders       c4 = CensusPackage.LogProviders;
            int  c5 = CensusPackage.MaxConcurrentExecutables;
            bool c6 = CensusPackage.OfflineMode;

            //var c7 = CensusPackage.PackagePassword;
            DTSPriorityClass      c8 = CensusPackage.PackagePriorityClass;
            DTSPackageType        c9 = CensusPackage.PackageType;
            PackageUpgradeOptions d0 = CensusPackage.PackageUpgradeOptions;
            Parameters            d1 = CensusPackage.Parameters;
            PrecedenceConstraints d2 = CensusPackage.PrecedenceConstraints;
            IDTSProject100        d3 = CensusPackage.Project;
            DtsProperties         d4 = CensusPackage.Properties;
            DTSProtectionLevel    d5 = CensusPackage.ProtectionLevel;
            bool                 d6  = CensusPackage.SafeRecursiveProjectPackageExecution;
            bool                 d7  = CensusPackage.SaveCheckpoints;
            bool                 d8  = CensusPackage.SuppressConfigurationWarnings;
            bool                 d9  = CensusPackage.UpdateObjects;
            int                  e0  = CensusPackage.VersionBuild;
            string               e1  = CensusPackage.VersionComments;
            string               e2  = CensusPackage.VersionGUID;
            int                  e3  = CensusPackage.VersionMajor;
            int                  e4  = CensusPackage.VersionMinor;
            DtsWarnings          e5  = CensusPackage.Warnings;
            string               e6  = CensusPackage.CreationName;
            bool                 e7  = CensusPackage.DebugMode;
            bool                 e8  = CensusPackage.DelayValidation;
            string               e9  = CensusPackage.Description;
            bool                 f0  = CensusPackage.Disable;
            bool                 f1  = CensusPackage.DisableEventHandlers;
            DtsEventHandlers     f2  = CensusPackage.EventHandlers;
            EventInfos           f3  = CensusPackage.EventInfos;
            int                  f4  = CensusPackage.ExecutionDuration;
            DTSExecResult        f5  = CensusPackage.ExecutionResult;
            DTSExecStatus        f6  = CensusPackage.ExecutionStatus;
            bool                 f7  = CensusPackage.FailParentOnFailure;
            bool                 f8  = CensusPackage.FailParentOnFailure;
            Variables            f9  = CensusPackage.Variables;
            VariableDispenser    g0  = CensusPackage.VariableDispenser;
            DTSTransactionOption g1  = CensusPackage.TransactionOption;
            bool                 g2  = CensusPackage.SuspendRequired;
            DateTime             g3  = CensusPackage.StopTime;
            DateTime             g4  = CensusPackage.StartTime;
            ISite                g5  = CensusPackage.Site;
            DtsContainer         g6  = CensusPackage.Parent;
            string               g7  = CensusPackage.Name;
            int                  g8  = CensusPackage.MaximumErrorCount;
            LoggingOptions       g9  = CensusPackage.LoggingOptions;
            DTSLoggingMode       h0  = CensusPackage.LoggingMode;
            LogEntryInfos        h1  = CensusPackage.LogEntryInfos;
            int                  h2  = CensusPackage.LocaleID;
            IsolationLevel       h3  = CensusPackage.IsolationLevel;
            bool                 h4  = CensusPackage.IsDefaultLocaleID;
            string               h5  = CensusPackage.ID;
            object               h6  = CensusPackage.ForcedExecutionValue;
            bool                 h7  = CensusPackage.ForceExecutionValue;
            DTSForcedExecResult  h8  = CensusPackage.ForceExecutionResult;

            Console.WriteLine();
        }
 /// <summary>
 /// Adds a log provider to the listening log providers group.
 /// </summary>
 /// <param name="provider">Log provider object.</param>
 public void AddLogProvider(LogProvider provider)
 {
     LogProviders.Add(provider);
 }