Beispiel #1
0
        public void LoadSettings(VisualStudio.IProjectSettings settings)
        {
            // TODO - Right now this class inherits from the view scaffolder model, so we need to call into the
            // base class to read those settings as well. We want to remove this inheritance at some point
            // and this method will have to change when we do.
            Contract.Assert(settings != null);

            string stringValue;

            if (settings.TryGetString(SavedSettingsKeys.DbContextTypeFullNameKey, out stringValue))
            {
                DataContextType = DataContextTypes.Where(t => String.Equals(t.TypeName, stringValue, StringComparison.Ordinal)).FirstOrDefault();
            }

            if (settings.TryGetString(SavedSettingsKeys.ConfigTypeFullNameKey, out stringValue))
            {
                ConfigType = ConfigTypes.Where(t => String.Equals(t.TypeName, stringValue, StringComparison.Ordinal)).FirstOrDefault();
            }
        }