Skip to content

Commit

Permalink
Revert "Custom tutor config that can be created from an existing conf…
Browse files Browse the repository at this point in the history
…ig object and override certain fields"

This reverts commit 2d1e412.
  • Loading branch information
IvanRibakov committed Apr 4, 2018
1 parent 2d1e412 commit 06595f5
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 266 deletions.
191 changes: 0 additions & 191 deletions Utils/Its.Utils.Config/CustomTutorConfig.cs

This file was deleted.

125 changes: 51 additions & 74 deletions Utils/Its.Utils.Config/DefaultTutorConfig.cs
Original file line number Diff line number Diff line change
@@ -1,95 +1,72 @@
using System.Collections.Generic;
using System.Configuration;
using System.Configuration;

namespace Its.Utils.Config
{
public class DefaultTutorConfig : ITutorConfig
{
private int _initialColumn;
private int _finalColumn;
private int _initialRow;
private string _ontologyPath;
private string _logsPath;
private string _domainConfigurationPath;
private string _worldConfigurationPath;
private int _timePenalization;
private int _noTutoringNoBlockErrorPenalization;
private int _tutoringBlockErrorPenalization;
private int _tutoringNoBlockErrorPenalization;
private string _assConString;
private string _bddConString;

public int InitialColumn
{
get { return _initialColumn; }
}
public int FinalColumn
{
get { return _finalColumn; }
public int InitialColumn
{
get { return int.Parse(ConfigurationManager.AppSettings["initialColumn"]); }
}
public int InitialRow
{
get { return _initialRow; }

public int FinalColumn
{
get { return int.Parse(ConfigurationManager.AppSettings["finalColumn"]); }
}
public string OntologyPath
{
get { return _ontologyPath; }

public int InitialRow
{
get { return int.Parse(ConfigurationManager.AppSettings["initialRow"]); }
}
public string LogsPath
{
get { return _logsPath; }

public string OntologyPath
{
get { return ConfigurationManager.AppSettings["ontologyPath"]; }
}
public string DomainConfigurationPath
{
get { return _domainConfigurationPath; }

public string LogsPath
{
get { return ConfigurationManager.AppSettings["logsPath"]; }
}
public string WorldConfigurationPath
{
get { return _worldConfigurationPath; }

public string DomainConfigurationPath
{
get { return ConfigurationManager.AppSettings["domainConfigurationPath"]; }
}
public int TimePenalization
{
get { return _timePenalization; }

public string WorldConfigurationPath
{
get { return ConfigurationManager.AppSettings["worldConfigurationPath"]; }
}
public int NoTutoringNoBlockErrorPenalization
{
get { return _noTutoringNoBlockErrorPenalization; }

public int TimePenalization
{
get { return int.Parse(ConfigurationManager.AppSettings["TimePenalization"]); }
}
public int TutoringBlockErrorPenalization
{
get { return _tutoringBlockErrorPenalization; }

public int NoTutoringNoBlockErrorPenalization
{
get { return int.Parse(ConfigurationManager.AppSettings["NoTutoringNoBlockErrorPenalization"]); }
}
public int TutoringNoBlockErrorPenalization
{
get { return _tutoringNoBlockErrorPenalization; }

public int TutoringBlockErrorPenalization
{
get { return int.Parse(ConfigurationManager.AppSettings["TutoringBlockErrorPenalization"]); }
}
public string ASSConString
{
get { return _assConString; }

public int TutoringNoBlockErrorPenalization
{
get { return int.Parse(ConfigurationManager.AppSettings["TutoringNoBlockErrorPenalization"]); }
}
public string BDDConString
{
get { return _bddConString; }

public string ASSConString
{
get { return ConfigurationManager.AppSettings["ASSConString"]; }
}
public DefaultTutorConfig()

public string BDDConString
{
_initialColumn = int.Parse(ConfigurationManager.AppSettings["initialColumn"]);
_finalColumn = int.Parse(ConfigurationManager.AppSettings["finalColumn"]);
_initialRow = int.Parse(ConfigurationManager.AppSettings["initialRow"]);
_ontologyPath = ConfigurationManager.AppSettings["ontologyPath"];
_logsPath = ConfigurationManager.AppSettings["logsPath"];
_domainConfigurationPath = ConfigurationManager.AppSettings["domainConfigurationPath"];
_worldConfigurationPath = ConfigurationManager.AppSettings["worldConfigurationPath"];
_timePenalization = int.Parse(ConfigurationManager.AppSettings["TimePenalization"]);
_noTutoringNoBlockErrorPenalization =
int.Parse(ConfigurationManager.AppSettings["NoTutoringNoBlockErrorPenalization"]);
_tutoringBlockErrorPenalization =
int.Parse(ConfigurationManager.AppSettings["TutoringBlockErrorPenalization"]);
_tutoringNoBlockErrorPenalization =
int.Parse(ConfigurationManager.AppSettings["TutoringNoBlockErrorPenalization"]);
_assConString = ConfigurationManager.AppSettings["ASSConString"];
_bddConString = ConfigurationManager.AppSettings["BDDConString"];
get { return ConfigurationManager.AppSettings["BDDConString"]; }
}
}
}
1 change: 1 addition & 0 deletions Utils/Its.Utils.Config/ITutorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public interface ITutorConfig
string LogsPath { get; }
string DomainConfigurationPath { get; }
string WorldConfigurationPath { get; }

int TimePenalization { get; }
int NoTutoringNoBlockErrorPenalization { get; }
int TutoringBlockErrorPenalization { get; }
Expand Down
1 change: 0 additions & 1 deletion Utils/Its.Utils.Config/Its.Utils.Config.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DefaultTutorConfig.cs" />
<Compile Include="CustomTutorConfig.cs" />
<Compile Include="ITutorConfig.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down

0 comments on commit 06595f5

Please sign in to comment.