private void InstallProvider(IContainer container, Provider provider) { if (provider != null) { //Get the provider type Type type = BuildManager.GetType(provider.Type, false, true); if (type == null) { Exceptions.LogException(new ConfigurationErrorsException(string.Format("Could not load provider {0}", provider.Type))); } else { //Register the component container.RegisterComponent(provider.Name, _ProviderInterface, type, _ComponentLifeStyle); //Load the settings into a dictionary var settingsDict = new Dictionary<string, string>(); settingsDict.Add("providerName", provider.Name); foreach (string key in provider.Attributes.Keys) { settingsDict.Add(key, provider.Attributes.Get(key)); } //Register the settings as dependencies container.RegisterComponentSettings(type.FullName, settingsDict); } } }
public UrlRewiterSettings(DotNetNuke.Framework.Providers.Provider objProvider) { if (objProvider.Attributes["fileExtension"] != null) { _fileExtension = objProvider.Attributes["fileExtension"]; } else { _fileExtension = ".aspx"; } }