public MigrationContext(
     MigrationSettings settings,
     OrmPackage package,
     PortalApplication portal,
     BundleManifest manifest,
     IVSProject vsProject,
     CodeDomProvider codeProvider,
     StrongNameKeyPair keyPair,
     IExtendedLog log,
     IOperationStatus status,
     ICollection<Plugin> plugins)
 {
     _settings = settings;
     _package = package;
     _portal = portal;
     _manifest = manifest;
     _vsProject = vsProject;
     _codeProvider = codeProvider;
     _keyPair = keyPair;
     _log = log;
     _status = status;
     _plugins = plugins;
     _forms = new Dictionary<string, FormInfo>(StringComparer.InvariantCultureIgnoreCase);
     _mainViews = new Dictionary<string, MainViewInfo>(StringComparer.InvariantCultureIgnoreCase);
     _navigation = new List<NavigationInfo>();
     _scripts = new Dictionary<string, ScriptInfo>(StringComparer.InvariantCultureIgnoreCase);
     _tables = new Dictionary<string, TableInfo>(StringComparer.InvariantCultureIgnoreCase);
     _entities = new Dictionary<string, OrmEntity>(StringComparer.InvariantCultureIgnoreCase);
     _relationships = new Dictionary<DataPathJoin, RelationshipInfo>();
     _linkedFiles = new List<LinkedFile>();
     _localizedStrings = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
     _references = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
     _smartParts = new List<SmartPartMapping>();
     _secondaryJoins = new Dictionary<DataPathJoin, DataPathJoin>();
 }
        public BackgroundWorkerStatus(BackgroundWorker worker, IExtendedLog log)
        {
            Guard.ArgumentNotNull(worker, "worker");

            _worker = worker;
            _log = log;
        }
Exemple #3
0
        /// <summary>
        /// Lookup the wrapper objects for the loggers specified
        /// </summary>
        /// <param name="loggers">the loggers to get the wrappers for</param>
        /// <returns>Lookup the wrapper objects for the loggers specified</returns>
        private static IExtendedLog[] WrapLoggers(ILogger[] loggers)
        {
            var results = new IExtendedLog[loggers.Length];

            for (var i = 0; i < loggers.Length; i++)
            {
                results[i] = WrapLogger(loggers[i]);
            }

            return(results);
        }
        private void Initialize()
        {
            using (_status.BeginStep("Initializing...", 11))
            {
                if (string.IsNullOrEmpty(_settings.LegacyProject) && _settings.LegacyPlugins.Count == 0)
                {
                    throw new MigrationException("No plugins specified");
                }

                if (!_status.Advance())
                {
                    return;
                }

                bool isNewPackage;
                OrmPackage package = GetPackage(out isNewPackage);

                if (!_status.Advance())
                {
                    return;
                }

                bool isNewPortal;
                PortalApplication portal = GetPortal(out isNewPortal);

                if (!_status.Advance())
                {
                    return;
                }

                BundleManifest manifest = GetBundle();

                if (!_status.Advance())
                {
                    return;
                }

                IVSProject vsProject = (_settings.ProcessScripts
                                            ? GetVSProject()
                                            : null);

                if (!_status.Advance())
                {
                    return;
                }

                CodeDomProvider codeProvider = GetCodeProvider();

                if (!_status.Advance())
                {
                    return;
                }

                StrongNameKeyPair keyPair = GetKeyPair();

                if (!_status.Advance())
                {
                    return;
                }

                ICollection<Plugin> plugins = GetPlugins();

                if (!_status.Advance())
                {
                    return;
                }

                _report = new MigrationReport();
                _report.Date = DateTime.Now;
                _report.Settings = (MigrationSettings) _settings.Clone();

                if (!_status.Advance())
                {
                    return;
                }

                _log = new ExtendedLog(_outputLog, _report);

                if (!_status.Advance())
                {
                    return;
                }

                if (!string.IsNullOrEmpty(_settings.OutputDirectory) && !Directory.Exists(_settings.OutputDirectory))
                {
                    Directory.CreateDirectory(_settings.OutputDirectory);
                }

                if (!_status.Advance())
                {
                    return;
                }

                _contextHolder.Context = new MigrationContext(
                    _settings,
                    package,
                    portal,
                    manifest,
                    vsProject,
                    codeProvider,
                    keyPair,
                    _log,
                    _status,
                    plugins);
                _contextHolder.Context.IsNewPackage = isNewPackage;
                _contextHolder.Context.IsNewPortal = isNewPortal;
            }
        }
 public IdentifierDiscoverer(IExtendedLog log)
 {
     _log = log;
 }
 public DependencyBuilder(IExtendedLog log, IDictionary<string, ScriptInfo> scripts)
 {
     _log = log;
     _scripts = scripts;
 }