
* Web.config: * ListItem.cs: * styles.json: * globalize.js: * event.js: * Auth.aspx: * Book.aspx: * Login.aspx: * jquery-2.1.4.js: * map-load.gif: * Book.aspx: * Circle.cs: * Auth.aspx: * mapstyle.css: * date.js: * Login.aspx: * mdd_help.htm: * BlogHelper.cs: * fit-bounds.png: * unresolved.js: * jquery-2.1.4.min.js: * mapstyle-ie.css: * FreeDate.cs: * BookEdit.cs: * number.js: * BlogManager.cs: * plural.js: * jquery-2.1.4.min.map: * jquery.googlemaps.js: * supplemental.js: * BlogProvider.cs: * mapstyle.min.css: * pin-pink.png: * message.js: * ChooseADate.aspx: * pin-azure.png: * currency.js: * jquery-2.1.4-vsdoc.js: * pin-green.png: * MarkdownDeepLib.min.js: * flag-azure.png: * flag-green.png: * needle-pink.png: * ChooseADate.aspx: * niddle-green.png: * ChooseCalendar.aspx: * current-location.png: * jquery.googlemaps.min.js: * ErrorMessage.aspx: * ChooseCalendar.aspx: * relative-time.js: * GoogleErrorMessage.aspx: * popup-template-marker.html: * popup-template-circle.html: * popup-template-polygon.html: * popup-template-polyline.html: * popup-template-rectangle.html: * Web.csproj: * YavscModel.csproj: * YavscClient.csproj: * fortune.csproj: * WebControls.csproj: * SalesCatalog.csproj: * ITContentProvider.csproj: * NpgsqlMRPProviders.csproj: * NpgsqlBlogProvider.csproj: * NpgsqlContentProvider.csproj: Moves to Mono framework * NpgsqlCircleProvider.cs: Makes Circles private, or not * OAuth2.cs: * CircleController.cs: * AccountController.cs: * NpgsqlContentProvider.cs: Impacts htmldoc * NpgsqlMembershipProvider.cs: Makes possible to change the UserName * NpgsqlRoleProvider.cs: Drops this SQL code, which is actually maintained in Web/instdbws.sql * PeopleApi.cs: * GoogleController.cs: * PaypalController.cs: Refactoring * Global.asax.cs: Dropped an useless url mapping * MarkdownHelper.cs: Package update * App.master: * NoLogin.master: Site's favicon update * Circles.aspx: TO BE FIXED :-D * UserPost.aspx: Comment only when logged in * instdbws.sql: Circle public * packages.config: package update
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using System;
|
|
using System.Configuration;
|
|
using System.Reflection;
|
|
using System.Collections.Specialized;
|
|
|
|
namespace Yavsc.Model.Blogs
|
|
{
|
|
/// <summary>
|
|
/// Blog helper.
|
|
/// </summary>
|
|
public static class BlogHelper
|
|
{
|
|
/// <summary>
|
|
/// Gets the provider.
|
|
/// </summary>
|
|
/// <returns>The provider.</returns>
|
|
public static BlogProvider GetProvider ()
|
|
{
|
|
DataProviderConfigurationSection config = ConfigurationManager.GetSection ("system.web/blog") as DataProviderConfigurationSection;
|
|
if (config == null)
|
|
throw new ConfigurationErrorsException("The configuration bloc for the blog provider was not found");
|
|
ProviderSettings celt =
|
|
config.Providers[config.DefaultProvider];
|
|
if (config == null)
|
|
throw new ConfigurationErrorsException("The default blog provider was not found");
|
|
ConstructorInfo ci = Type.GetType (celt.Type).GetConstructor (Type.EmptyTypes);
|
|
BlogProvider bp = ci.Invoke (Type.EmptyTypes) as BlogProvider;
|
|
bp.Initialize (celt.Name, celt.Parameters);
|
|
return bp;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|