init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
74
Kreta.KretaServer/ServerUtil/KretaConfiguration.cs
Normal file
74
Kreta.KretaServer/ServerUtil/KretaConfiguration.cs
Normal file
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using Kreta.Framework;
|
||||
|
||||
namespace Kreta.KretaServer
|
||||
{
|
||||
public class KretaConfiguration : Configuration
|
||||
{
|
||||
public KretaConfiguration(XmlNode confignode) : base(confignode)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void ReadConfig(XmlNode confignode)
|
||||
{
|
||||
string xpath = "";
|
||||
|
||||
try
|
||||
{
|
||||
base.ReadConfig(confignode);
|
||||
|
||||
if (!DBConnection.EndsWith(";", StringComparison.Ordinal))
|
||||
{
|
||||
DBConnection += ";";
|
||||
}
|
||||
//if (DBConnection.IndexOf("Max Pool Size", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
// DBConnection += "Max Pool Size=" + (SessionLimit < 100 ? 100 : SessionLimit) + ";";
|
||||
|
||||
XmlNode current = null;
|
||||
xpath = "/config/server/intezmenyconnectionstringfile";
|
||||
if ((current = confignode.SelectSingleNode(xpath)) != null)
|
||||
{
|
||||
intezmenyConnectionStringFile = current.InnerText;
|
||||
if (intezmenyConnectionStringFile.Contains("~") && (HttpContext.Current != null))
|
||||
{
|
||||
intezmenyConnectionStringFile = HttpContext.Current.Server.MapPath(intezmenyConnectionStringFile);
|
||||
}
|
||||
}
|
||||
|
||||
xpath = "/config/server/tesztintezmenyazonosito";
|
||||
if ((current = confignode.SelectSingleNode(xpath)) != null)
|
||||
{
|
||||
tesztIntezmenyAzonosito = current.InnerText;
|
||||
}
|
||||
xpath = "/config/server/mkbbankszamlaigenylesconnectionstringfile";
|
||||
if ((current = confignode.SelectSingleNode(xpath)) != null)
|
||||
{
|
||||
bankszamlaIgenylesConnectionStringFile = current.InnerText;
|
||||
if (bankszamlaIgenylesConnectionStringFile.Contains("~") && (HttpContext.Current != null))
|
||||
{
|
||||
bankszamlaIgenylesConnectionStringFile = HttpContext.Current.Server.MapPath(bankszamlaIgenylesConnectionStringFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (InvalidConfigurationException)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw new InvalidConfigurationException("Invalid configuration entry: " + xpath + ".", exception);
|
||||
}
|
||||
}
|
||||
|
||||
private string intezmenyConnectionStringFile;
|
||||
private string tesztIntezmenyAzonosito;
|
||||
private string bankszamlaIgenylesConnectionStringFile;
|
||||
|
||||
public string IntezmenyConnectionStringFile { get { return intezmenyConnectionStringFile; } }
|
||||
public string BankszamlaIgenylesConnectionStringFile { get { return bankszamlaIgenylesConnectionStringFile; } }
|
||||
|
||||
public string TesztIntezmenyAzonosito { get { return tesztIntezmenyAzonosito; } }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue