refactoring
parent
8cec6d44e2
commit
7fc21f1056
@ -0,0 +1,14 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<Yavsc.Model.Circles.CircleInfoCollection>" %>
|
||||
<asp:Content ID="initContent" ContentPlaceHolderID="init" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<% foreach (CircleInfo ci in model) { %>
|
||||
<%= ci.Title %>
|
||||
<%= ci.Id %>
|
||||
<br/>
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
|
||||
</asp:Content>
|
@ -1,62 +0,0 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Yavsc.Model.Blogs.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Blog provider configuration element.
|
||||
/// </summary>
|
||||
public class BlogProviderConfigurationElement : ConfigurationElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
[ConfigurationProperty("name", IsRequired = true, IsKey=true)]
|
||||
public string Name {
|
||||
get { return (string)this ["name"]; }
|
||||
set { this ["name"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
/// </summary>
|
||||
/// <value>The type.</value>
|
||||
[ConfigurationProperty("type", IsRequired = true, IsKey=false)]
|
||||
public string Type {
|
||||
get { return (string)this ["type"]; }
|
||||
set { this ["type"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the connection string.
|
||||
/// </summary>
|
||||
/// <value>The name of the connection string.</value>
|
||||
[ConfigurationProperty("connectionStringName")]
|
||||
public string ConnectionStringName {
|
||||
get { return (string)this ["connectionStringName"]; }
|
||||
set { this ["connectionStringName"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
[ConfigurationProperty("description")]
|
||||
public string Description {
|
||||
get { return (string)this ["description"]; }
|
||||
set { this ["description"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the application.
|
||||
/// </summary>
|
||||
/// <value>The name of the application.</value>
|
||||
[ConfigurationProperty("applicationName")]
|
||||
public string ApplicationName {
|
||||
get { return (string)this ["applicationName"]; }
|
||||
set { this ["applicationName"] = value; }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Yavsc.Model.Blogs.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Blog providers configuration collection.
|
||||
/// </summary>
|
||||
public class BlogProvidersConfigurationCollection : ConfigurationElementCollection
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates the new element.
|
||||
/// </summary>
|
||||
/// <returns>The new element.</returns>
|
||||
protected override ConfigurationElement CreateNewElement ()
|
||||
{
|
||||
return new BlogProviderConfigurationElement();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the element key.
|
||||
/// </summary>
|
||||
/// <returns>The element key.</returns>
|
||||
/// <param name="element">Element.</param>
|
||||
protected override object GetElementKey (ConfigurationElement element)
|
||||
{
|
||||
return ((BlogProviderConfigurationElement) element).Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the element.
|
||||
/// </summary>
|
||||
/// <returns>The element.</returns>
|
||||
/// <param name="name">Name.</param>
|
||||
public BlogProviderConfigurationElement GetElement (string name)
|
||||
{
|
||||
return this.BaseGet(name) as BlogProviderConfigurationElement;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Yavsc.Model.Blogs.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Blog providers configuration section.
|
||||
/// </summary>
|
||||
public class BlogProvidersConfigurationSection : ConfigurationSection
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the default provider.
|
||||
/// </summary>
|
||||
/// <value>The default provider.</value>
|
||||
[ConfigurationProperty("defaultProvider")]
|
||||
public string DefaultProvider {
|
||||
get { return (string) this ["defaultProvider"]; }
|
||||
set { this["defaultProvider"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the providers.
|
||||
/// </summary>
|
||||
/// <value>The providers.</value>
|
||||
[ConfigurationProperty("providers")]
|
||||
[ConfigurationCollection(typeof(BlogProvidersConfigurationCollection),
|
||||
AddItemName = "add",
|
||||
ClearItemsName = "clear",
|
||||
RemoveItemName = "remove")]
|
||||
public BlogProvidersConfigurationCollection Providers{
|
||||
get { return (BlogProvidersConfigurationCollection) this["providers"]; }
|
||||
set { this["providers"] = value; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue