* avatar, username, city from Google profile
* refactoring
This commit is contained in:
parent
edd160ae75
commit
c7f81699a4
55 changed files with 706 additions and 351 deletions
|
|
@ -1,9 +1,18 @@
|
|||
using System;
|
||||
using Yavsc.Model;
|
||||
using System.Configuration;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace fortune
|
||||
{
|
||||
public class Entry {
|
||||
public string Message{ get; set; }
|
||||
public string Author{ get; set; }
|
||||
public string Body{ get; set; }
|
||||
}
|
||||
|
||||
public class MyClass : IModule
|
||||
{
|
||||
public MyClass ()
|
||||
|
|
@ -11,45 +20,47 @@ namespace fortune
|
|||
}
|
||||
|
||||
#region IModule implementation
|
||||
|
||||
string tblname = "fortune";
|
||||
public void Install (System.Data.IDbConnection cnx)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
using (var cmd = cnx.CreateCommand())
|
||||
{
|
||||
StringBuilder strb = new StringBuilder (string.Format("create table {0} ",tblname));
|
||||
strb.Append ( "( author character varying (1024) not null, \n");
|
||||
strb.Append ( "body character varying (65536) not null," +
|
||||
"CONSTRAINT uniqueid PRIMARY KEY (uniqueid)," +
|
||||
"uniqueid bigserial NOT NULL ) WITH (\n OIDS=FALSE\n);"
|
||||
+string.Format("CREATE INDEX fki_cst{0}ref\n ON wrtags\n USING btree\n (tagid);",
|
||||
tblname));
|
||||
cmd.CommandText = strb.ToString ();
|
||||
cmd.ExecuteNonQuery ();
|
||||
}
|
||||
}
|
||||
|
||||
public void Uninstall (System.Data.IDbConnection cnx, bool removeConfig)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
using (var cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText = string.Format ("drop table {0};", tblname);
|
||||
cmd.ExecuteNonQuery ();
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigurationSection DefaultConfig (string appName, string cnxStr)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Initialize (string name, System.Collections.Specialized.NameValueCollection config)
|
||||
{
|
||||
|
||||
}
|
||||
/*
|
||||
public class Discovery {
|
||||
IServiceProvider[] Provider;
|
||||
ISettingsProviderService[] SettingsBase;
|
||||
}
|
||||
|
||||
public Discovery GetServices() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Active {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public string ApplicationName {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>fortune</RootNamespace>
|
||||
<AssemblyName>fortune</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MyClass.cs" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue