Skip to content

Commit bc007f4

Browse files
author
Leonid
committed
Added Platform target for base plugin
1 parent 1a9f33b commit bc007f4

File tree

2 files changed

+5
-97
lines changed

2 files changed

+5
-97
lines changed

eFormAPI/Plugins/eFormBase/EformBase.Pn/EformBase.Pn.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<DefineConstants>TRACE</DefineConstants>
2929
<ErrorReport>prompt</ErrorReport>
3030
<WarningLevel>4</WarningLevel>
31+
<PlatformTarget>x64</PlatformTarget>
3132
</PropertyGroup>
3233
<ItemGroup>
3334
<Reference Include="AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL">

eFormAPI/Plugins/eFormBase/EformBase.Pn/Infrastructure/EFormCoreHelper.cs

Lines changed: 4 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,10 @@ public Core GetCore()
3737
}
3838

3939

40-
string connectionStr = lines.First();
40+
var connectionStr = lines.First();
4141

4242
_core = new Core();
43-
bool running = false;
44-
_core.HandleCaseCreated += EventCaseCreated;
45-
_core.HandleCaseRetrived += EventCaseRetrived;
46-
_core.HandleCaseCompleted += EventCaseCompleted;
47-
_core.HandleCaseDeleted += EventCaseDeleted;
48-
_core.HandleFileDownloaded += EventFileDownloaded;
49-
_core.HandleSiteActivated += EventSiteActivated;
50-
//_core.HandleEventLog += EventLog;
51-
//_core.HandleEventMessage += EventMessage;
52-
//_core.HandleEventWarning += EventWarning;
43+
var running = false;
5344
_core.HandleEventException += EventException;
5445

5546
try
@@ -68,100 +59,16 @@ public Core GetCore()
6859
{
6960
container = new WindsorContainer();
7061
container.Register(Component.For<Core>().Instance(_core));
71-
container.Install(
72-
new RebusHandlerInstaller()
73-
, new RebusInstaller(System.Configuration.ConfigurationManager.ConnectionStrings["eFormMainConnection"].ConnectionString)
74-
);
62+
container.Install(new RebusHandlerInstaller(), new RebusInstaller(System.Configuration.ConfigurationManager.ConnectionStrings["eFormMainConnection"].ConnectionString));
7563
this.bus = container.Resolve<IBus>();
7664
return _core;
7765
}
7866
Logger.Error("Core is not running");
7967
throw new Exception("Core is not running");
80-
//return null;
8168
}
8269

8370
#region events
8471

85-
public void EventCaseCreated(object sender, EventArgs args)
86-
{
87-
// Does nothing for web implementation
88-
}
89-
90-
public void EventCaseRetrived(object sender, EventArgs args)
91-
{
92-
// Does nothing for web implementation
93-
}
94-
95-
public void EventCaseCompleted(object sender, EventArgs args)
96-
{
97-
// Does nothing for web implementation
98-
}
99-
100-
public void EventCaseDeleted(object sender, EventArgs args)
101-
{
102-
// Does nothing for web implementation
103-
}
104-
105-
public void EventFileDownloaded(object sender, EventArgs args)
106-
{
107-
// Does nothing for web implementation
108-
}
109-
110-
public void EventSiteActivated(object sender, EventArgs args)
111-
{
112-
// Does nothing for web implementation
113-
}
114-
115-
public void EventLog(object sender, EventArgs args)
116-
{
117-
try
118-
{
119-
Logger.Trace(sender + Environment.NewLine);
120-
}
121-
catch (Exception ex)
122-
{
123-
if (ex.Message.Contains("bin") && ex.Message.Contains("log.txt"))
124-
{
125-
System.IO.Directory.CreateDirectory(System.Web.Hosting.HostingEnvironment.MapPath("~/bin/log"));
126-
}
127-
EventException(ex, EventArgs.Empty);
128-
}
129-
}
130-
131-
public void EventMessage(object sender, EventArgs args)
132-
{
133-
try
134-
{
135-
Logger.Trace(sender + Environment.NewLine);
136-
}
137-
catch (Exception ex)
138-
{
139-
if (ex.Message.Contains("bin") && ex.Message.Contains("log.txt"))
140-
{
141-
System.IO.Directory.CreateDirectory(
142-
System.Web.Hosting.HostingEnvironment.MapPath("~/bin/log/log.txt"));
143-
}
144-
EventException(ex, EventArgs.Empty);
145-
}
146-
}
147-
148-
public void EventWarning(object sender, EventArgs args)
149-
{
150-
try
151-
{
152-
Logger.Trace("## WARNING ## " + sender + " ## WARNING ## " + Environment.NewLine);
153-
}
154-
catch (Exception ex)
155-
{
156-
if (ex.Message.Contains("bin") && ex.Message.Contains("log.txt"))
157-
{
158-
System.IO.Directory.CreateDirectory(
159-
System.Web.Hosting.HostingEnvironment.MapPath("~/bin/log/log.txt"));
160-
}
161-
EventException(ex, EventArgs.Empty);
162-
}
163-
}
164-
16572
public void EventException(object sender, EventArgs args)
16673
{
16774
try
@@ -181,4 +88,4 @@ public void EventException(object sender, EventArgs args)
18188

18289
#endregion
18390
}
184-
}
91+
}

0 commit comments

Comments
 (0)