Добавьте файлы проекта.
This commit is contained in:
19
SvetoforVKBot/App_Start/RouteConfig.cs
Normal file
19
SvetoforVKBot/App_Start/RouteConfig.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace SvetoforVKBot
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
|
||||
routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{controller}/{action}/{id}",
|
||||
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
28
SvetoforVKBot/App_Start/WebApiConfig.cs
Normal file
28
SvetoforVKBot/App_Start/WebApiConfig.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace SvetoforVKBot.App_Start
|
||||
{
|
||||
public class WebApiConfig
|
||||
{
|
||||
public static void Register(HttpConfiguration config)
|
||||
|
||||
{
|
||||
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
config.Routes.MapHttpRoute(
|
||||
|
||||
name: "DefaultApi",
|
||||
|
||||
routeTemplate: "api/{controller}/{id}",
|
||||
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
76
SvetoforVKBot/App_Start/WebConfiguration.cs
Normal file
76
SvetoforVKBot/App_Start/WebConfiguration.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace SvetoforVKBot.App_Start
|
||||
{
|
||||
public class WebConfiguration: System.Configuration.ConfigurationSection
|
||||
{
|
||||
[ConfigurationProperty("name", IsKey = true, IsRequired = true, DefaultValue = "Debug")]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["name"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["name"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("token", IsRequired = true, DefaultValue = "")]
|
||||
public string Token
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["token"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["token"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("secret", IsRequired = true, DefaultValue = "")]
|
||||
public string SecretKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["secret"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["secret"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("confirmation", IsRequired = true, DefaultValue = "")]
|
||||
public string Confirmation
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["confirmation"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["confirmation"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("groupdialoglink", IsRequired = true, DefaultValue = "")]
|
||||
public string GroupDialogsLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this["groupdialoglink"];
|
||||
}
|
||||
set
|
||||
{
|
||||
this["groupdialoglink"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user