개정판 77cdac33
벽산 수정 후 백업
Change-Id: I8e3eb48f615478a49efa0ab4014a8ef17d273d0a
ConvertService/ServiceBase/ConvertResultBSENG/ConvertResultBSENG.csproj | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProjectGuid>{3EFF0189-6366-4432-B388-6E56CC55B7F8}</ProjectGuid> |
|
8 |
<OutputType>Library</OutputType> |
|
9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
10 |
<RootNamespace>ConvertResultBSENG</RootNamespace> |
|
11 |
<AssemblyName>ConvertResultBSENG</AssemblyName> |
|
12 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
|
13 |
<FileAlignment>512</FileAlignment> |
|
14 |
<Deterministic>true</Deterministic> |
|
15 |
<TargetFrameworkProfile /> |
|
16 |
</PropertyGroup> |
|
17 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
18 |
<DebugSymbols>true</DebugSymbols> |
|
19 |
<DebugType>full</DebugType> |
|
20 |
<Optimize>false</Optimize> |
|
21 |
<OutputPath>..\publish\Plugin\</OutputPath> |
|
22 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
23 |
<ErrorReport>prompt</ErrorReport> |
|
24 |
<WarningLevel>4</WarningLevel> |
|
25 |
</PropertyGroup> |
|
26 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
27 |
<DebugType>pdbonly</DebugType> |
|
28 |
<Optimize>true</Optimize> |
|
29 |
<OutputPath>bin\Release\</OutputPath> |
|
30 |
<DefineConstants>TRACE</DefineConstants> |
|
31 |
<ErrorReport>prompt</ErrorReport> |
|
32 |
<WarningLevel>4</WarningLevel> |
|
33 |
</PropertyGroup> |
|
34 |
<PropertyGroup> |
|
35 |
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|
36 |
</PropertyGroup> |
|
37 |
<ItemGroup> |
|
38 |
<Reference Include="Markus.EntityModel"> |
|
39 |
<HintPath>..\packages\MarkusDatabase.1.8.0\lib\net45\Markus.EntityModel.dll</HintPath> |
|
40 |
</Reference> |
|
41 |
<Reference Include="System" /> |
|
42 |
<Reference Include="System.ComponentModel.DataAnnotations" /> |
|
43 |
<Reference Include="System.Core" /> |
|
44 |
<Reference Include="System.Xml.Linq" /> |
|
45 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
46 |
<Reference Include="Microsoft.CSharp" /> |
|
47 |
<Reference Include="System.Data" /> |
|
48 |
<Reference Include="System.Net.Http" /> |
|
49 |
<Reference Include="System.Xml" /> |
|
50 |
</ItemGroup> |
|
51 |
<ItemGroup> |
|
52 |
<Compile Include="ResultProcess.cs" /> |
|
53 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
54 |
</ItemGroup> |
|
55 |
<ItemGroup> |
|
56 |
<ProjectReference Include="..\Markus.Service.Convert.IPlugin\Markus.Service.Convert.IPlugin.csproj"> |
|
57 |
<Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project> |
|
58 |
<Name>Markus.Service.Convert.IPlugin</Name> |
|
59 |
</ProjectReference> |
|
60 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
|
61 |
<Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project> |
|
62 |
<Name>Markus.Service.Extensions</Name> |
|
63 |
</ProjectReference> |
|
64 |
</ItemGroup> |
|
65 |
<ItemGroup> |
|
66 |
<PackageReference Include="EntityFramework"> |
|
67 |
<Version>6.2.0</Version> |
|
68 |
</PackageReference> |
|
69 |
<PackageReference Include="EntityFramework.ko"> |
|
70 |
<Version>6.2.0</Version> |
|
71 |
</PackageReference> |
|
72 |
<PackageReference Include="MarkusDatabase"> |
|
73 |
<Version>1.8.0</Version> |
|
74 |
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
|
75 |
<PrivateAssets>all</PrivateAssets> |
|
76 |
</PackageReference> |
|
77 |
<PackageReference Include="RestSharp"> |
|
78 |
<Version>106.12.0</Version> |
|
79 |
</PackageReference> |
|
80 |
</ItemGroup> |
|
81 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
82 |
</Project> |
ConvertService/ServiceBase/ConvertResultBSENG/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이러한 특성 값을 변경하세요. |
|
8 |
[assembly: AssemblyTitle("ConvertResultBSENG")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("ConvertResultBSENG")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2021")] |
|
14 |
[assembly: AssemblyTrademark("")] |
|
15 |
[assembly: AssemblyCulture("")] |
|
16 |
|
|
17 |
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 |
|
18 |
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 |
|
19 |
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. |
|
20 |
[assembly: ComVisible(false)] |
|
21 |
|
|
22 |
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. |
|
23 |
[assembly: Guid("3eff0189-6366-4432-b388-6e56cc55b7f8")] |
|
24 |
|
|
25 |
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. |
|
26 |
// |
|
27 |
// 주 버전 |
|
28 |
// 부 버전 |
|
29 |
// 빌드 번호 |
|
30 |
// 수정 버전 |
|
31 |
// |
|
32 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 |
|
33 |
// 기본값으로 할 수 있습니다. |
|
34 |
// [assembly: AssemblyVersion("1.0.*")] |
|
35 |
[assembly: AssemblyVersion("1.0.0.0")] |
|
36 |
[assembly: AssemblyFileVersion("1.0.0.0")] |
ConvertService/ServiceBase/ConvertResultBSENG/ResultProcess.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
using RestSharp; |
|
7 |
|
|
8 |
namespace ConvertResultBSENG |
|
9 |
{ |
|
10 |
public class ResultProcess : Markus.Service.Convert.Plugin.IPlugin |
|
11 |
{ |
|
12 |
public string Name => nameof(ConvertResultBSENG); |
|
13 |
|
|
14 |
public string Exception { get; set; } |
|
15 |
|
|
16 |
private const string UPLOAD_API_KEY = "UPLOAD_API"; |
|
17 |
|
|
18 |
private const string MARKUS_ConnectionString_KEY = "MARKUS_ConnectionString"; |
|
19 |
private string connectioString; |
|
20 |
|
|
21 |
public bool Do(string ConvertID, Dictionary<string, object> Parameters) |
|
22 |
{ |
|
23 |
bool result = false; |
|
24 |
Exception = ""; |
|
25 |
|
|
26 |
try |
|
27 |
{ |
|
28 |
if (Parameters.Keys.Count(x => x == MARKUS_ConnectionString_KEY) > 0) |
|
29 |
{ |
|
30 |
connectioString = Markus.Service.Extensions.Encrypt.AESEncrypter.Decrypt(Parameters[MARKUS_ConnectionString_KEY].ToString()); |
|
31 |
string uploadUrl = Parameters[UPLOAD_API_KEY].ToString(); |
|
32 |
|
|
33 |
using (var entities = new Markus.EntityModel.MarkusModel(connectioString)) |
|
34 |
{ |
|
35 |
|
|
36 |
var convertItems = entities.CONVERTER_DOC.Where(x => x.ID == ConvertID); |
|
37 |
|
|
38 |
if (convertItems.Count() > 0) |
|
39 |
{ |
|
40 |
var convertItem = convertItems.First(); |
|
41 |
|
|
42 |
string documentId = convertItem.DOCUMENT_ID; |
|
43 |
|
|
44 |
var docitems = entities.DOCUMENT_ITEM.Where(x => x.DOCUMENT_ID == documentId); |
|
45 |
|
|
46 |
string uri = null; |
|
47 |
|
|
48 |
if (docitems.Count() > 0) |
|
49 |
{ |
|
50 |
var docitem = docitems.First(); |
|
51 |
|
|
52 |
//http://210.94.128.124/markus/markusRes.do?prj_No={prj_No}&document_Id={document_Id}&document_No={document_No}&document_Name=(document_Name)&group_No={group_No}&rev_No={rev_No} |
|
53 |
|
|
54 |
uri = $"http://{uploadUrl}/markus/markusRes.do?" |
|
55 |
+ $"prj_No={docitem.PROJECT_NO}&document_Id={docitem.ID}&document_No={docitem.DOCUMENT_NO}" |
|
56 |
+ $"&document_Name={docitem.DOCUMENT_NAME}&group_No={docitem.GROUP_NO}&rev_No={docitem.REVISION}"; |
|
57 |
|
|
58 |
var value = SendData(uri); |
|
59 |
|
|
60 |
if (string.IsNullOrEmpty(value) || Convert.ToBoolean(value)) |
|
61 |
{ |
|
62 |
result = true; |
|
63 |
} |
|
64 |
else |
|
65 |
{ |
|
66 |
this.Exception = uri; |
|
67 |
result = false; |
|
68 |
} |
|
69 |
|
|
70 |
} |
|
71 |
else |
|
72 |
{ |
|
73 |
this.Exception = "document Item Not Found " + uri; |
|
74 |
} |
|
75 |
} |
|
76 |
else |
|
77 |
{ |
|
78 |
this.Exception = "Convert_Doc Not Found"; |
|
79 |
} |
|
80 |
} |
|
81 |
} |
|
82 |
} |
|
83 |
catch (Exception ex) |
|
84 |
{ |
|
85 |
this.Exception = this.Exception + ex.ToString() + ex.InnerException?.ToString(); |
|
86 |
result = false; |
|
87 |
} |
|
88 |
|
|
89 |
return result; |
|
90 |
} |
|
91 |
|
|
92 |
|
|
93 |
private string SendData(string uri) |
|
94 |
{ |
|
95 |
var client = new RestClient(uri); |
|
96 |
client.Timeout = -1; |
|
97 |
var request = new RestRequest(Method.GET); |
|
98 |
var result = client.Get<string>(request); |
|
99 |
|
|
100 |
return result.Content; |
|
101 |
} |
|
102 |
} |
|
103 |
} |
ConvertService/ServiceBase/ConvertResultBSENG_test/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8" ?> |
|
2 |
<configuration> |
|
3 |
<startup> |
|
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> |
|
5 |
</startup> |
|
6 |
</configuration> |
ConvertService/ServiceBase/ConvertResultBSENG_test/ConvertResultBSENG_test.csproj | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProjectGuid>{1C3F505F-A23F-4D64-95DB-D421536C51CC}</ProjectGuid> |
|
8 |
<OutputType>Exe</OutputType> |
|
9 |
<RootNamespace>ConvertResultBSENG_test</RootNamespace> |
|
10 |
<AssemblyName>ConvertResultBSENG_test</AssemblyName> |
|
11 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
|
12 |
<FileAlignment>512</FileAlignment> |
|
13 |
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects> |
|
14 |
<Deterministic>true</Deterministic> |
|
15 |
</PropertyGroup> |
|
16 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
17 |
<PlatformTarget>x64</PlatformTarget> |
|
18 |
<DebugSymbols>true</DebugSymbols> |
|
19 |
<DebugType>full</DebugType> |
|
20 |
<Optimize>false</Optimize> |
|
21 |
<OutputPath>bin\Debug\</OutputPath> |
|
22 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
23 |
<ErrorReport>prompt</ErrorReport> |
|
24 |
<WarningLevel>4</WarningLevel> |
|
25 |
<Prefer32Bit>false</Prefer32Bit> |
|
26 |
</PropertyGroup> |
|
27 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
28 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
29 |
<DebugType>pdbonly</DebugType> |
|
30 |
<Optimize>true</Optimize> |
|
31 |
<OutputPath>bin\Release\</OutputPath> |
|
32 |
<DefineConstants>TRACE</DefineConstants> |
|
33 |
<ErrorReport>prompt</ErrorReport> |
|
34 |
<WarningLevel>4</WarningLevel> |
|
35 |
</PropertyGroup> |
|
36 |
<ItemGroup> |
|
37 |
<Reference Include="System" /> |
|
38 |
<Reference Include="System.Core" /> |
|
39 |
<Reference Include="System.Xml.Linq" /> |
|
40 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
41 |
<Reference Include="Microsoft.CSharp" /> |
|
42 |
<Reference Include="System.Data" /> |
|
43 |
<Reference Include="System.Net.Http" /> |
|
44 |
<Reference Include="System.Xml" /> |
|
45 |
</ItemGroup> |
|
46 |
<ItemGroup> |
|
47 |
<Compile Include="..\Markus.Service.Convert\Plugin.cs"> |
|
48 |
<Link>Plugin.cs</Link> |
|
49 |
</Compile> |
|
50 |
<Compile Include="Program.cs" /> |
|
51 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
52 |
</ItemGroup> |
|
53 |
<ItemGroup> |
|
54 |
<None Include="App.config" /> |
|
55 |
<None Include="Plugin.ini"> |
|
56 |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
57 |
</None> |
|
58 |
</ItemGroup> |
|
59 |
<ItemGroup> |
|
60 |
<ProjectReference Include="..\Markus.Service.Convert.IPlugin\Markus.Service.Convert.IPlugin.csproj"> |
|
61 |
<Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project> |
|
62 |
<Name>Markus.Service.Convert.IPlugin</Name> |
|
63 |
</ProjectReference> |
|
64 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
|
65 |
<Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project> |
|
66 |
<Name>Markus.Service.Extensions</Name> |
|
67 |
</ProjectReference> |
|
68 |
</ItemGroup> |
|
69 |
<ItemGroup> |
|
70 |
<PackageReference Include="log4net"> |
|
71 |
<Version>2.0.8</Version> |
|
72 |
</PackageReference> |
|
73 |
<PackageReference Include="Salaros.ConfigParser"> |
|
74 |
<Version>0.3.4</Version> |
|
75 |
</PackageReference> |
|
76 |
</ItemGroup> |
|
77 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
78 |
<PropertyGroup> |
|
79 |
<PreBuildEvent>xcopy /y /d /I "$(ProjectDir)..\publish\Plugin\*.*" "$(ProjectDir)$(OutDir)Plugin"</PreBuildEvent> |
|
80 |
</PropertyGroup> |
|
81 |
</Project> |
ConvertService/ServiceBase/ConvertResultBSENG_test/Plugin.ini | ||
---|---|---|
1 |
[ConvertResultBSENG] |
|
2 |
MARKUS_ConnectionString = w0RfRwPwWVzkhKYSFkzqaa8lJLoRPhqW8MwzibLyHg6IFuzb/atpGwaVxOFW+7fsyq5GulmdBGIz3oArumCHWKjeA6FmoRsSK6s64cv023EAnGJoxZirFt6Eje6jy/4YjgrJ1vDsrtdeiH8/zqetZOCkbY9lLAwHHInXb4Y9RMGuSE5LBVNAPsc4YGoa/9+i |
|
3 |
UPLOAD_API = 210.94.128.124 |
|
4 |
|
ConvertService/ServiceBase/ConvertResultBSENG_test/Program.cs | ||
---|---|---|
1 |
using Markus.Service; |
|
2 |
using System; |
|
3 |
using System.Collections.Generic; |
|
4 |
using System.Linq; |
|
5 |
using System.Text; |
|
6 |
using System.Threading.Tasks; |
|
7 |
|
|
8 |
namespace ConvertResultBSENG_test |
|
9 |
{ |
|
10 |
class Program |
|
11 |
{ |
|
12 |
static void Main(string[] args) |
|
13 |
{ |
|
14 |
Console.WriteLine("input ConvertID : "); |
|
15 |
|
|
16 |
var id = Console.ReadLine(); |
|
17 |
|
|
18 |
try |
|
19 |
{ |
|
20 |
PluginService.Run(id); |
|
21 |
} |
|
22 |
catch (Exception ex) |
|
23 |
{ |
|
24 |
Console.WriteLine(ex.ToString() + ex.InnerException?.ToString()); |
|
25 |
} |
|
26 |
|
|
27 |
|
|
28 |
Console.ReadKey(); |
|
29 |
|
|
30 |
} |
|
31 |
} |
|
32 |
} |
ConvertService/ServiceBase/ConvertResultBSENG_test/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이러한 특성 값을 변경하세요. |
|
8 |
[assembly: AssemblyTitle("ConvertResultBSENG_test")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("ConvertResultBSENG_test")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2021")] |
|
14 |
[assembly: AssemblyTrademark("")] |
|
15 |
[assembly: AssemblyCulture("")] |
|
16 |
|
|
17 |
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 |
|
18 |
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 |
|
19 |
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. |
|
20 |
[assembly: ComVisible(false)] |
|
21 |
|
|
22 |
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. |
|
23 |
[assembly: Guid("1c3f505f-a23f-4d64-95db-d421536c51cc")] |
|
24 |
|
|
25 |
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. |
|
26 |
// |
|
27 |
// 주 버전 |
|
28 |
// 부 버전 |
|
29 |
// 빌드 번호 |
|
30 |
// 수정 버전 |
|
31 |
// |
|
32 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 |
|
33 |
// 지정되도록 할 수 있습니다. |
|
34 |
// [assembly: AssemblyVersion("1.0.*")] |
|
35 |
[assembly: AssemblyVersion("1.0.0.0")] |
|
36 |
[assembly: AssemblyFileVersion("1.0.0.0")] |
ConvertService/ServiceBase/DownloadLinkTest/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<configuration> |
|
3 |
<startup> |
|
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> |
|
5 |
</startup> |
|
6 |
</configuration> |
ConvertService/ServiceBase/DownloadLinkTest/DownloadLinkTest.csproj | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProjectGuid>{913A6502-50E9-4FC8-87E9-CBE692BD28BF}</ProjectGuid> |
|
8 |
<OutputType>Exe</OutputType> |
|
9 |
<RootNamespace>DownloadLinkTest</RootNamespace> |
|
10 |
<AssemblyName>DownloadLinkTest</AssemblyName> |
|
11 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
|
12 |
<FileAlignment>512</FileAlignment> |
|
13 |
<Deterministic>true</Deterministic> |
|
14 |
<TargetFrameworkProfile /> |
|
15 |
</PropertyGroup> |
|
16 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
17 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
18 |
<DebugSymbols>true</DebugSymbols> |
|
19 |
<DebugType>full</DebugType> |
|
20 |
<Optimize>false</Optimize> |
|
21 |
<OutputPath>bin\Debug\</OutputPath> |
|
22 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
23 |
<ErrorReport>prompt</ErrorReport> |
|
24 |
<WarningLevel>4</WarningLevel> |
|
25 |
</PropertyGroup> |
|
26 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
27 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
28 |
<DebugType>pdbonly</DebugType> |
|
29 |
<Optimize>true</Optimize> |
|
30 |
<OutputPath>bin\Release\</OutputPath> |
|
31 |
<DefineConstants>TRACE</DefineConstants> |
|
32 |
<ErrorReport>prompt</ErrorReport> |
|
33 |
<WarningLevel>4</WarningLevel> |
|
34 |
</PropertyGroup> |
|
35 |
<ItemGroup> |
|
36 |
<Reference Include="System" /> |
|
37 |
<Reference Include="System.Core" /> |
|
38 |
<Reference Include="System.Web" /> |
|
39 |
<Reference Include="System.Xml.Linq" /> |
|
40 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
41 |
<Reference Include="Microsoft.CSharp" /> |
|
42 |
<Reference Include="System.Data" /> |
|
43 |
<Reference Include="System.Net.Http" /> |
|
44 |
<Reference Include="System.Xml" /> |
|
45 |
</ItemGroup> |
|
46 |
<ItemGroup> |
|
47 |
<Compile Include="..\Markus.Service.Extensions\Helper\GetDownloadFileName.cs"> |
|
48 |
<Link>GetDownloadFileName.cs</Link> |
|
49 |
</Compile> |
|
50 |
<Compile Include="Program.cs" /> |
|
51 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
52 |
</ItemGroup> |
|
53 |
<ItemGroup> |
|
54 |
<None Include="App.config" /> |
|
55 |
</ItemGroup> |
|
56 |
<ItemGroup> |
|
57 |
<PackageReference Include="RestSharp"> |
|
58 |
<Version>106.12.0</Version> |
|
59 |
</PackageReference> |
|
60 |
</ItemGroup> |
|
61 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
62 |
</Project> |
ConvertService/ServiceBase/DownloadLinkTest/Program.cs | ||
---|---|---|
1 |
//using RestSharp; |
|
2 |
using Markus.Service.Helper; |
|
3 |
using RestSharp; |
|
4 |
using System; |
|
5 |
using System.Collections.Generic; |
|
6 |
using System.IO; |
|
7 |
using System.Linq; |
|
8 |
using System.Net; |
|
9 |
using System.Net.Http; |
|
10 |
using System.Net.Http.Headers; |
|
11 |
using System.Text; |
|
12 |
using System.Threading.Tasks; |
|
13 |
using System.Web; |
|
14 |
|
|
15 |
namespace DownloadLinkTest |
|
16 |
{ |
|
17 |
class Program |
|
18 |
{ |
|
19 |
static void Main(string[] args) |
|
20 |
{ |
|
21 |
|
|
22 |
try |
|
23 |
{ |
|
24 |
Download("http://210.94.128.124/service/common-download.dft?key=CA8069433B4D5EEEE0500A0A79000EF6"); |
|
25 |
} |
|
26 |
catch (Exception ex) |
|
27 |
{ |
|
28 |
|
|
29 |
Console.WriteLine(ex.ToString()); |
|
30 |
} |
|
31 |
|
|
32 |
Console.ReadKey(); |
|
33 |
} |
|
34 |
|
|
35 |
private static void Download(string uri) |
|
36 |
{ |
|
37 |
//var FileName = DownloadUri.GetFileName(uri); |
|
38 |
|
|
39 |
var client = new RestClient(uri); |
|
40 |
client.Timeout = -1; |
|
41 |
var request = new RestRequest(Method.GET); |
|
42 |
IRestResponse response = client.Execute(request); |
|
43 |
|
|
44 |
var fileName = DownloadUri.GetFileNameInDisposition(new System.Net.Mime.ContentDisposition(response.Headers.Where(x => x.Name == "Content-Disposition").First().Value.ToString())); |
|
45 |
|
|
46 |
var fileInfo = new FileInfo("test.pdf"); |
|
47 |
|
|
48 |
using (var fileStream = fileInfo.OpenWrite()) |
|
49 |
{ |
|
50 |
fileStream.Write(response.RawBytes, 0, response.RawBytes.Length); |
|
51 |
} |
|
52 |
|
|
53 |
//StreamWriter sw = new StreamWriter(fs); |
|
54 |
//sw.Write(str); |
|
55 |
//sw.Close(); |
|
56 |
//using (var stream = response.Content.ReadAsStringAsync().Result) |
|
57 |
//{ |
|
58 |
// var fileInfo = new FileInfo("test.pdf"); |
|
59 |
// using (var fileStream = fileInfo.OpenWrite()) |
|
60 |
// { |
|
61 |
// stream.CopyTo(fileStream); |
|
62 |
// } |
|
63 |
//} |
|
64 |
} |
|
65 |
|
|
66 |
|
|
67 |
public static string callWebRequest(string uri) |
|
68 |
{ |
|
69 |
string responseFromServer = string.Empty; |
|
70 |
|
|
71 |
try |
|
72 |
{ |
|
73 |
|
|
74 |
WebRequest request = WebRequest.Create(uri); |
|
75 |
//request.Method = "GET"; |
|
76 |
//request.ContentType = "application/octet-stream"; |
|
77 |
|
|
78 |
using (WebResponse response = request.GetResponse()) |
|
79 |
using (Stream dataStream = response.GetResponseStream()) |
|
80 |
using (StreamReader reader = new StreamReader(dataStream)) |
|
81 |
{ |
|
82 |
responseFromServer = reader.ReadToEnd(); |
|
83 |
} |
|
84 |
|
|
85 |
} |
|
86 |
catch (Exception e) |
|
87 |
{ |
|
88 |
Console.WriteLine(e.ToString()); |
|
89 |
} |
|
90 |
|
|
91 |
return responseFromServer; |
|
92 |
} |
|
93 |
} |
|
94 |
} |
ConvertService/ServiceBase/DownloadLinkTest/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이러한 특성 값을 변경하세요. |
|
8 |
[assembly: AssemblyTitle("DownloadLinkTest")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("DownloadLinkTest")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2021")] |
|
14 |
[assembly: AssemblyTrademark("")] |
|
15 |
[assembly: AssemblyCulture("")] |
|
16 |
|
|
17 |
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 |
|
18 |
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 |
|
19 |
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. |
|
20 |
[assembly: ComVisible(false)] |
|
21 |
|
|
22 |
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. |
|
23 |
[assembly: Guid("913a6502-50e9-4fc8-87e9-cbe692bd28bf")] |
|
24 |
|
|
25 |
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. |
|
26 |
// |
|
27 |
// 주 버전 |
|
28 |
// 부 버전 |
|
29 |
// 빌드 번호 |
|
30 |
// 수정 버전 |
|
31 |
// |
|
32 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 |
|
33 |
// 지정되도록 할 수 있습니다. |
|
34 |
// [assembly: AssemblyVersion("1.0.*")] |
|
35 |
[assembly: AssemblyVersion("1.0.0.0")] |
|
36 |
[assembly: AssemblyFileVersion("1.0.0.0")] |
ConvertService/ServiceBase/Markus.Service.Convert/ConvertService.cs | ||
---|---|---|
14 | 14 |
|
15 | 15 |
using System.Threading.Tasks; |
16 | 16 |
using System.Web; |
17 |
using RestSharp; |
|
17 | 18 |
|
18 | 19 |
namespace Markus.Service.Convert |
19 | 20 |
{ |
... | ... | |
379 | 380 |
{ |
380 | 381 |
try |
381 | 382 |
{ |
383 |
|
|
384 |
downloadFilePath = await RestDownloadAsync(pdfFileUri, saveItem.SavePath); |
|
385 |
/*bseng |
|
386 |
*/ |
|
387 |
/* 벽산으로 임시 주석 |
|
388 |
|
|
382 | 389 |
FileName = DownloadUri.GetFileName(saveItem.PdfFilePath); |
383 | 390 |
downloadFilePath = System.IO.Path.Combine(saveItem.SavePath, FileName); |
384 | 391 |
|
385 |
using (System.Net.WebClient webClient = new System.Net.WebClient()) |
|
386 |
{ |
|
387 |
webClient.UseDefaultCredentials = true;//.Headers.Add("Authorization: BASIC SGVsbG8="); //가상의 인증 |
|
388 |
webClient.Proxy = null; |
|
389 |
//if (!System.IO.Directory.Exists(ConvertProcessContext.TempDirectory)) |
|
390 |
//{ |
|
391 |
// System.IO.Directory.CreateDirectory(ConvertProcessContext.TempDirectory); |
|
392 |
//} |
|
393 |
|
|
394 |
webClient.DownloadFile(pdfFileUri, downloadFilePath); |
|
395 |
webClient.Dispose(); |
|
396 |
} |
|
397 |
|
|
392 |
using (System.Net.WebClient webClient = new System.Net.WebClient()) |
|
393 |
{ |
|
394 |
webClient.UseDefaultCredentials = true;//.Headers.Add("Authorization: BASIC SGVsbG8="); //가상의 인증 |
|
395 |
webClient.Proxy = null; |
|
396 |
if (!System.IO.Directory.Exists(ConvertProcessContext.TempDirectory)) |
|
397 |
{ |
|
398 |
System.IO.Directory.CreateDirectory(ConvertProcessContext.TempDirectory); |
|
399 |
} |
|
400 |
|
|
401 |
webClient.DownloadFile(pdfFileUri, downloadFilePath); |
|
402 |
|
|
403 |
webClient.Dispose(); |
|
404 |
} |
|
405 |
* */ |
|
398 | 406 |
await Task.Delay(300); |
399 | 407 |
} |
400 | 408 |
catch (Exception ex) |
401 | 409 |
{ |
402 | 410 |
logger.Error(ex); |
403 |
throw new Exception("File Download Error. Please, check the file path.");
|
|
411 |
throw new Exception($"File Download Error. Please, check the file path. {pdfFileUri}");
|
|
404 | 412 |
} |
405 | 413 |
} |
406 | 414 |
else |
... | ... | |
442 | 450 |
return result; |
443 | 451 |
} |
444 | 452 |
|
453 |
private async Task<string> RestDownloadAsync(Uri uri,string savePath) |
|
454 |
{ |
|
455 |
string downloadFilePath = ""; |
|
456 |
|
|
457 |
var client = new RestClient(uri); |
|
458 |
client.Timeout = -1; |
|
459 |
var request = new RestRequest(Method.GET); |
|
460 |
IRestResponse response = await client.ExecuteAsync(request); |
|
461 |
|
|
462 |
if (response.StatusCode == System.Net.HttpStatusCode.OK) |
|
463 |
{ |
|
464 |
var fileName = DownloadUri.GetFileNameInDisposition(new System.Net.Mime.ContentDisposition(response.Headers.Where(x => x.Name == "Content-Disposition").First().Value.ToString())); |
|
465 |
|
|
466 |
downloadFilePath = System.IO.Path.Combine(savePath, fileName); |
|
467 |
|
|
468 |
var fs = File.Create(downloadFilePath); |
|
469 |
|
|
470 |
await fs.WriteAsync(response.RawBytes, 0, response.RawBytes.Length); |
|
471 |
fs.Close(); |
|
472 |
} |
|
473 |
|
|
474 |
//var fileInfo = new FileInfo(downloadFilePath); |
|
475 |
|
|
476 |
//using (var fileStream = fileInfo.OpenWrite()) |
|
477 |
//{ |
|
478 |
// await fileStream.WriteAsync(response.RawBytes, 0, response.RawBytes.Length); |
|
479 |
// fileStream.Close(); |
|
480 |
// //int position = 0; |
|
481 |
// //int step = 300000; |
|
482 |
// //int length = 300000; |
|
483 |
|
|
484 |
// //while (position < response.RawBytes.Length) |
|
485 |
// //{ |
|
486 |
// // if (position + step < response.RawBytes.Length) |
|
487 |
// // { |
|
488 |
// // length = position + step; |
|
489 |
// // } |
|
490 |
// // else |
|
491 |
// // { |
|
492 |
// // length = response.RawBytes.Length - position; |
|
493 |
// // } |
|
494 |
|
|
495 |
// // await fileStream.WriteAsync(response.RawBytes, position, length); |
|
496 |
|
|
497 |
// // position = position + step; |
|
498 |
// //} |
|
499 |
//} |
|
500 |
|
|
501 |
return downloadFilePath; |
|
502 |
} |
|
503 |
|
|
445 | 504 |
/// <summary> |
446 | 505 |
/// 큰파일 변환 |
447 | 506 |
/// </summary> |
ConvertService/ServiceBase/Markus.Service.Convert/Markus.Service.Convert.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>Markus.Service</RootNamespace> |
11 | 11 |
<AssemblyName>Markus.Service.Convert</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
12 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<NuGetPackageImportStamp> |
16 | 16 |
</NuGetPackageImportStamp> |
17 |
<TargetFrameworkProfile /> |
|
17 | 18 |
</PropertyGroup> |
18 | 19 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
19 | 20 |
<DebugSymbols>true</DebugSymbols> |
... | ... | |
72 | 73 |
<Reference Include="MarkusPDF, Version=1.0.7178.16502, Culture=neutral, processorArchitecture=AMD64"> |
73 | 74 |
<HintPath>..\packages\MarkusPDF.1.7.0\lib\net45\MarkusPDF.dll</HintPath> |
74 | 75 |
</Reference> |
76 |
<Reference Include="RestSharp, Version=106.12.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL"> |
|
77 |
<HintPath>..\packages\RestSharp.106.12.0\lib\net452\RestSharp.dll</HintPath> |
|
78 |
</Reference> |
|
75 | 79 |
<Reference Include="System" /> |
76 | 80 |
<Reference Include="System.ComponentModel.DataAnnotations" /> |
77 | 81 |
<Reference Include="System.Core" /> |
ConvertService/ServiceBase/Markus.Service.Convert/app.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
6 | 6 |
</configSections> |
7 | 7 |
<system.serviceModel> |
8 |
<bindings />
|
|
9 |
<client />
|
|
8 |
<bindings/> |
|
9 |
<client/> |
|
10 | 10 |
</system.serviceModel> |
11 | 11 |
<entityFramework> |
12 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
|
12 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/> |
|
13 | 13 |
<providers> |
14 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
14 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
15 | 15 |
</providers> |
16 | 16 |
</entityFramework> |
17 |
</configuration> |
|
17 |
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration> |
ConvertService/ServiceBase/Markus.Service.Convert/packages.config | ||
---|---|---|
6 | 6 |
<package id="MarkusDatabase" version="1.8.0" targetFramework="net45" developmentDependency="true" /> |
7 | 7 |
<package id="MarkusPDF" version="1.7.0" targetFramework="net45" /> |
8 | 8 |
<package id="Microsoft.CSharp" version="4.5.0" targetFramework="net45" /> |
9 |
<package id="RestSharp" version="106.12.0" targetFramework="net452" /> |
|
9 | 10 |
<package id="Salaros.ConfigParser" version="0.3.4" targetFramework="net45" /> |
10 | 11 |
</packages> |
ConvertService/ServiceBase/Markus.Service.ConvertProcess/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
6 | 6 |
</configSections> |
7 | 7 |
<startup> |
8 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
|
8 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
|
9 | 9 |
</startup> |
10 | 10 |
<entityFramework> |
11 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
|
11 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/> |
|
12 | 12 |
<providers> |
13 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
13 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
14 | 14 |
</providers> |
15 | 15 |
</entityFramework> |
16 | 16 |
<system.serviceModel> |
17 |
<bindings />
|
|
18 |
<client />
|
|
17 |
<bindings/> |
|
18 |
<client/> |
|
19 | 19 |
</system.serviceModel> |
20 |
</configuration> |
|
20 |
</configuration> |
ConvertService/ServiceBase/Markus.Service.ConvertProcess/Markus.Service.ConvertProcess.csproj | ||
---|---|---|
9 | 9 |
<OutputType>Exe</OutputType> |
10 | 10 |
<RootNamespace>Markus.Service.ConvertProcess</RootNamespace> |
11 | 11 |
<AssemblyName>Markus.Service.ConvertProcess</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
12 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<NuGetPackageImportStamp> |
16 | 16 |
</NuGetPackageImportStamp> |
17 |
<TargetFrameworkProfile /> |
|
17 | 18 |
</PropertyGroup> |
18 | 19 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
19 | 20 |
<PlatformTarget>AnyCPU</PlatformTarget> |
ConvertService/ServiceBase/Markus.Service.Extensions/Helper/GetDownloadFileName.cs | ||
---|---|---|
64 | 64 |
return fileName; |
65 | 65 |
} |
66 | 66 |
|
67 |
private static string GetFileNameInDisposition(System.Net.Mime.ContentDisposition contentDisposition)
|
|
67 |
public static string GetFileNameInDisposition(System.Net.Mime.ContentDisposition contentDisposition)
|
|
68 | 68 |
{ |
69 | 69 |
if (contentDisposition.FileName != null) |
70 | 70 |
{ |
ConvertService/ServiceBase/Markus.Service.Station/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
6 |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
|
|
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
6 |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> |
|
7 | 7 |
</configSections> |
8 | 8 |
<log4net> |
9 | 9 |
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender"> |
10 | 10 |
<applicationName value="ServiceStation"/> |
11 | 11 |
<layout type="log4net.Layout.PatternLayout"> |
12 |
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
|
|
12 |
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/> |
|
13 | 13 |
</layout> |
14 | 14 |
</appender> |
15 | 15 |
<root> |
16 |
<level value="All" />
|
|
17 |
<appender-ref ref="EventLogAppender" />
|
|
16 |
<level value="All"/> |
|
17 |
<appender-ref ref="EventLogAppender"/> |
|
18 | 18 |
</root> |
19 | 19 |
</log4net> |
20 | 20 |
<startup> |
21 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
|
21 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
|
22 | 22 |
</startup> |
23 | 23 |
<entityFramework> |
24 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
|
24 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/> |
|
25 | 25 |
<providers> |
26 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
26 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
27 | 27 |
</providers> |
28 | 28 |
</entityFramework> |
29 | 29 |
<system.serviceModel> |
30 |
<bindings />
|
|
31 |
<client />
|
|
30 |
<bindings/> |
|
31 |
<client/> |
|
32 | 32 |
</system.serviceModel> |
33 |
</configuration> |
|
33 |
</configuration> |
ConvertService/ServiceBase/Markus.Service.Station/Markus.Service.Station.csproj | ||
---|---|---|
9 | 9 |
<OutputType>WinExe</OutputType> |
10 | 10 |
<RootNamespace>Markus.Service</RootNamespace> |
11 | 11 |
<AssemblyName>Markus.Service.Station</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
12 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
... | ... | |
29 | 29 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
30 | 30 |
<UseApplicationTrust>false</UseApplicationTrust> |
31 | 31 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
32 |
<TargetFrameworkProfile /> |
|
32 | 33 |
</PropertyGroup> |
33 | 34 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
34 | 35 |
<PlatformTarget>AnyCPU</PlatformTarget> |
ConvertService/ServiceBase/Markus.Service.Station/Plugin.ini | ||
---|---|---|
9 | 9 |
MARKUS_ConnectionString = ScTg8MgTdbARVQXhb1K9YI3/6emjnMuODvTWZ+UnUZQ8z/Gv4TksSLRn84HTZiC5q/RkHKkgbsc6TL5EdTsnSwK0ngDgXD0P0yPKObgtPfk0MX0wmEG95SDQzGzbT6sH73Lkzde0AeChQWveAWZGvACoQISpdUwNj96c2AQuTqaUHwSkCwSI84HZCYugjlg3gAF1FpPggKCIeu4r/qFi0w== |
10 | 10 |
|
11 | 11 |
#효성 |
12 |
#MARKUS_ConnectionString = w0RfRwPwWVzkhKYSFkzqaccCbanjnTfSeig1IFc1IQ2MDThANWCNLmZqA6e2emQZqdM0l2Hsk1Ns/1Bfk6Vy+23gcbZlEDSBfSz7+eQaliiW9b2Wes1FDJ/C1Ho+35kTHGBbQk0tlIA0SWQHbR0KFo8TH5AbCyrLkjI87W6iXJVBpfI1QmTK0guIlTPnEEtCzXnXtgY9e8IHVnRIqT1PDs4tqaDsOZxfDGNNdvIpagA= |
|
12 |
#MARKUS_ConnectionString = w0RfRwPwWVzkhKYSFkzqaccCbanjnTfSeig1IFc1IQ2MDThANWCNLmZqA6e2emQZqdM0l2Hsk1Ns/1Bfk6Vy+23gcbZlEDSBfSz7+eQaliiW9b2Wes1FDJ/C1Ho+35kTHGBbQk0tlIA0SWQHbR0KFo8TH5AbCyrLkjI87W6iXJVBpfI1QmTK0guIlTPnEEtCzXnXtgY9e8IHVnRIqT1PDs4tqaDsOZxfDGNNdvIpagA= |
|
13 |
|
ConvertService/ServiceBase/PemssDocumentInfo/PemssDocumentInfo.csproj | ||
---|---|---|
32 | 32 |
<WarningLevel>4</WarningLevel> |
33 | 33 |
</PropertyGroup> |
34 | 34 |
<ItemGroup> |
35 |
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
|
36 |
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> |
|
37 |
</Reference> |
|
38 |
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
|
39 |
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> |
|
40 |
</Reference> |
|
41 | 35 |
<Reference Include="Markus.EntityModel, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
42 | 36 |
<HintPath>..\packages\MarkusDatabase.1.8.0\lib\net45\Markus.EntityModel.dll</HintPath> |
43 | 37 |
</Reference> |
ConvertService/ServiceBase/ServiceBase.sln | ||
---|---|---|
120 | 120 |
EndProject |
121 | 121 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ErrorNotice", "ErrorNotice\ErrorNotice.csproj", "{77D97EC3-F93E-445A-A585-FFC40ACBCF3D}" |
122 | 122 |
EndProject |
123 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadLinkTest", "DownloadLinkTest\DownloadLinkTest.csproj", "{913A6502-50E9-4FC8-87E9-CBE692BD28BF}" |
|
124 |
EndProject |
|
125 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConvertResultBSENG", "ConvertResultBSENG\ConvertResultBSENG.csproj", "{3EFF0189-6366-4432-B388-6E56CC55B7F8}" |
|
126 |
EndProject |
|
127 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConvertResultBSENG_test", "ConvertResultBSENG_test\ConvertResultBSENG_test.csproj", "{1C3F505F-A23F-4D64-95DB-D421536C51CC}" |
|
128 |
EndProject |
|
123 | 129 |
Global |
124 | 130 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
125 | 131 |
Debug|Any CPU = Debug|Any CPU |
... | ... | |
436 | 442 |
{77D97EC3-F93E-445A-A585-FFC40ACBCF3D}.Release|x64.Build.0 = Release|Any CPU |
437 | 443 |
{77D97EC3-F93E-445A-A585-FFC40ACBCF3D}.Release|x86.ActiveCfg = Release|Any CPU |
438 | 444 |
{77D97EC3-F93E-445A-A585-FFC40ACBCF3D}.Release|x86.Build.0 = Release|Any CPU |
445 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
446 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
447 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Debug|x64.ActiveCfg = Debug|Any CPU |
|
448 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Debug|x64.Build.0 = Debug|Any CPU |
|
449 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Debug|x86.ActiveCfg = Debug|Any CPU |
|
450 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Debug|x86.Build.0 = Debug|Any CPU |
|
451 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
452 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Release|Any CPU.Build.0 = Release|Any CPU |
|
453 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Release|x64.ActiveCfg = Release|Any CPU |
|
454 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Release|x64.Build.0 = Release|Any CPU |
|
455 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Release|x86.ActiveCfg = Release|Any CPU |
|
456 |
{913A6502-50E9-4FC8-87E9-CBE692BD28BF}.Release|x86.Build.0 = Release|Any CPU |
|
457 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
458 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
459 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Debug|x64.ActiveCfg = Debug|Any CPU |
|
460 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Debug|x64.Build.0 = Debug|Any CPU |
|
461 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Debug|x86.ActiveCfg = Debug|Any CPU |
|
462 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Debug|x86.Build.0 = Debug|Any CPU |
|
463 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
464 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Release|Any CPU.Build.0 = Release|Any CPU |
|
465 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Release|x64.ActiveCfg = Release|Any CPU |
|
466 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Release|x64.Build.0 = Release|Any CPU |
|
467 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Release|x86.ActiveCfg = Release|Any CPU |
|
468 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8}.Release|x86.Build.0 = Release|Any CPU |
|
469 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
470 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
471 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Debug|x64.ActiveCfg = Debug|Any CPU |
|
472 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Debug|x64.Build.0 = Debug|Any CPU |
|
473 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Debug|x86.ActiveCfg = Debug|Any CPU |
|
474 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Debug|x86.Build.0 = Debug|Any CPU |
|
475 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
476 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Release|Any CPU.Build.0 = Release|Any CPU |
|
477 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Release|x64.ActiveCfg = Release|Any CPU |
|
478 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Release|x64.Build.0 = Release|Any CPU |
|
479 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Release|x86.ActiveCfg = Release|Any CPU |
|
480 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC}.Release|x86.Build.0 = Release|Any CPU |
|
439 | 481 |
EndGlobalSection |
440 | 482 |
GlobalSection(SolutionProperties) = preSolution |
441 | 483 |
HideSolutionNode = FALSE |
... | ... | |
448 | 490 |
{2F7115C0-6414-46DB-B2E5-C941099B7737} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
449 | 491 |
{44A14CE4-40B2-4EA4-9F49-9666D05EF08D} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
450 | 492 |
{77D97EC3-F93E-445A-A585-FFC40ACBCF3D} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
493 |
{3EFF0189-6366-4432-B388-6E56CC55B7F8} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
|
494 |
{1C3F505F-A23F-4D64-95DB-D421536C51CC} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
|
451 | 495 |
EndGlobalSection |
452 | 496 |
GlobalSection(ExtensibilityGlobals) = postSolution |
453 | 497 |
SolutionGuid = {CA1BB1E8-1969-4435-A889-37F359B6EAAE} |
ConvertService/ServiceBase/ServiceTestApp/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
6 | 6 |
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections> |
7 | 7 |
<connectionStrings> |
8 |
<add name="MarkusEntities" connectionString="metadata=res://*/markusModel.csdl|res://*/markusModel.ssdl|res://*/markusModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;initial catalog=Markus;persist security info=True;user id=ConvertService;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
|
8 |
<add name="MarkusEntities" connectionString="metadata=res://*/markusModel.csdl|res://*/markusModel.ssdl|res://*/markusModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;initial catalog=Markus;persist security info=True;user id=ConvertService;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/> |
|
9 | 9 |
</connectionStrings> |
10 | 10 |
<entityFramework> |
11 | 11 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> |
12 | 12 |
<parameters> |
13 |
<parameter value="mssqllocaldb" />
|
|
13 |
<parameter value="mssqllocaldb"/> |
|
14 | 14 |
</parameters> |
15 | 15 |
</defaultConnectionFactory> |
16 | 16 |
<providers> |
17 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
17 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
18 | 18 |
</providers> |
19 | 19 |
</entityFramework> |
20 | 20 |
<startup> |
21 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
|
21 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
|
22 | 22 |
</startup> |
23 | 23 |
<!--<system.serviceModel> |
24 | 24 |
<bindings> |
... | ... | |
35 | 35 |
<system.serviceModel> |
36 | 36 |
<bindings> |
37 | 37 |
<basicHttpBinding> |
38 |
<binding name="BasicHttpBinding_IConvertService" />
|
|
39 |
<binding name="BasicHttpBinding_IStationService" />
|
|
40 |
<binding name="ConversionSoap" />
|
|
38 |
<binding name="BasicHttpBinding_IConvertService"/> |
|
39 |
<binding name="BasicHttpBinding_IStationService"/> |
|
40 |
<binding name="ConversionSoap"/> |
|
41 | 41 |
</basicHttpBinding> |
42 | 42 |
</bindings> |
43 | 43 |
<client> |
44 |
<endpoint address="http://localhost:9112/ConvertService" binding="basicHttpBinding" |
|
45 |
bindingConfiguration="BasicHttpBinding_IConvertService" contract="ConvertService.IConvertService" |
|
46 |
name="BasicHttpBinding_IConvertService" /> |
|
47 |
<endpoint address="http://localhost:9111/StationService" binding="basicHttpBinding" |
|
48 |
bindingConfiguration="BasicHttpBinding_IStationService" contract="StationService.IStationService" |
|
49 |
name="BasicHttpBinding_IStationService" /> |
|
50 |
<endpoint address="http://localhost:5295/Conversion.asmx" binding="basicHttpBinding" |
|
51 |
bindingConfiguration="ConversionSoap" contract="ConvertWebService.ConversionSoap" |
|
52 |
name="ConversionSoap" /> |
|
44 |
<endpoint address="http://localhost:9112/ConvertService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IConvertService" contract="ConvertService.IConvertService" name="BasicHttpBinding_IConvertService"/> |
|
45 |
<endpoint address="http://localhost:9111/StationService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IStationService" contract="StationService.IStationService" name="BasicHttpBinding_IStationService"/> |
|
46 |
<endpoint address="http://localhost:5295/Conversion.asmx" binding="basicHttpBinding" bindingConfiguration="ConversionSoap" contract="ConvertWebService.ConversionSoap" name="ConversionSoap"/> |
|
53 | 47 |
</client> |
54 | 48 |
</system.serviceModel> |
55 | 49 |
<system.net> |
56 |
<defaultProxy enabled = "true">
|
|
57 |
<proxy bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" />
|
|
50 |
<defaultProxy enabled="true">
|
|
51 |
<proxy bypassonlocal="false" proxyaddress="http://127.0.0.1:8888"/> |
|
58 | 52 |
</defaultProxy> |
59 | 53 |
</system.net> |
60 |
</configuration> |
|
54 |
</configuration> |
ConvertService/ServiceBase/ServiceTestApp/Properties/Resources.Designer.cs | ||
---|---|---|
8 | 8 |
// </auto-generated> |
9 | 9 |
//------------------------------------------------------------------------------ |
10 | 10 |
|
11 |
namespace ServiceTestApp.Properties |
|
12 |
{
|
|
13 |
|
|
14 |
|
|
11 |
namespace ServiceTestApp.Properties {
|
|
12 |
using System;
|
|
13 |
|
|
14 |
|
|
15 | 15 |
/// <summary> |
16 | 16 |
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. |
17 | 17 |
/// </summary> |
18 | 18 |
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder |
19 | 19 |
// 클래스에서 자동으로 생성되었습니다. |
20 |
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 |
|
21 |
// ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
|
|
22 |
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
|
20 |
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
|
|
21 |
// 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. |
|
22 |
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
|
23 | 23 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
24 | 24 |
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
25 |
internal class Resources |
|
26 |
{ |
|
27 |
|
|
25 |
internal class Resources { |
|
26 |
|
|
28 | 27 |
private static global::System.Resources.ResourceManager resourceMan; |
29 |
|
|
28 |
|
|
30 | 29 |
private static global::System.Globalization.CultureInfo resourceCulture; |
31 |
|
|
30 |
|
|
32 | 31 |
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
33 |
internal Resources() |
|
34 |
{ |
|
32 |
internal Resources() { |
|
35 | 33 |
} |
36 |
|
|
34 |
|
|
37 | 35 |
/// <summary> |
38 | 36 |
/// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. |
39 | 37 |
/// </summary> |
40 | 38 |
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
41 |
internal static global::System.Resources.ResourceManager ResourceManager |
|
42 |
{ |
|
43 |
get |
|
44 |
{ |
|
45 |
if ((resourceMan == null)) |
|
46 |
{ |
|
39 |
internal static global::System.Resources.ResourceManager ResourceManager { |
|
40 |
get { |
|
41 |
if (object.ReferenceEquals(resourceMan, null)) { |
|
47 | 42 |
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ServiceTestApp.Properties.Resources", typeof(Resources).Assembly); |
48 | 43 |
resourceMan = temp; |
49 | 44 |
} |
50 | 45 |
return resourceMan; |
51 | 46 |
} |
52 | 47 |
} |
53 |
|
|
48 |
|
|
54 | 49 |
/// <summary> |
55 | 50 |
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 |
56 | 51 |
/// 재정의합니다. |
57 | 52 |
/// </summary> |
58 | 53 |
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
59 |
internal static global::System.Globalization.CultureInfo Culture |
|
60 |
{ |
|
61 |
get |
|
62 |
{ |
|
54 |
internal static global::System.Globalization.CultureInfo Culture { |
|
55 |
get { |
|
63 | 56 |
return resourceCulture; |
64 | 57 |
} |
65 |
set |
|
66 |
{ |
|
58 |
set { |
|
67 | 59 |
resourceCulture = value; |
68 | 60 |
} |
69 | 61 |
} |
ConvertService/ServiceBase/ServiceTestApp/Properties/Settings.Designer.cs | ||
---|---|---|
1 | 1 |
//------------------------------------------------------------------------------ |
2 | 2 |
// <auto-generated> |
3 |
// This code was generated by a tool.
|
|
4 |
// Runtime Version:4.0.30319.42000
|
|
3 |
// 이 코드는 도구를 사용하여 생성되었습니다.
|
|
4 |
// 런타임 버전:4.0.30319.42000
|
|
5 | 5 |
// |
6 |
// Changes to this file may cause incorrect behavior and will be lost if
|
|
7 |
// the code is regenerated.
|
|
6 |
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
|
7 |
// 이러한 변경 내용이 손실됩니다.
|
|
8 | 8 |
// </auto-generated> |
9 | 9 |
//------------------------------------------------------------------------------ |
10 | 10 |
|
11 |
namespace ServiceTestApp.Properties |
|
12 |
{ |
|
13 |
|
|
14 |
|
|
11 |
namespace ServiceTestApp.Properties { |
|
12 |
|
|
13 |
|
|
15 | 14 |
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
16 |
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] |
|
17 |
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|
18 |
{ |
|
19 |
|
|
15 |
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] |
|
16 |
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { |
|
17 |
|
|
20 | 18 |
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
21 |
|
|
22 |
public static Settings Default |
|
23 |
{ |
|
24 |
get |
|
25 |
{ |
|
19 |
|
|
20 |
public static Settings Default { |
|
21 |
get { |
|
26 | 22 |
return defaultInstance; |
27 | 23 |
} |
28 | 24 |
} |
ConvertService/ServiceBase/ServiceTestApp/ServiceTestApp.csproj | ||
---|---|---|
8 | 8 |
<OutputType>WinExe</OutputType> |
9 | 9 |
<RootNamespace>ServiceTestApp</RootNamespace> |
10 | 10 |
<AssemblyName>ServiceTestApp</AssemblyName> |
11 |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
11 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
12 | 12 |
<FileAlignment>512</FileAlignment> |
13 | 13 |
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
14 | 14 |
<WarningLevel>4</WarningLevel> |
... | ... | |
28 | 28 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
29 | 29 |
<UseApplicationTrust>false</UseApplicationTrust> |
30 | 30 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
31 |
<TargetFrameworkProfile /> |
|
31 | 32 |
</PropertyGroup> |
32 | 33 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
33 | 34 |
<PlatformTarget>AnyCPU</PlatformTarget> |
DownloadManager/DownloadManager.csproj | ||
---|---|---|
40 | 40 |
<Reference Include="log4net, Version=2.0.9.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> |
41 | 41 |
<HintPath>..\packages\log4net.2.0.9\lib\net45\log4net.dll</HintPath> |
42 | 42 |
</Reference> |
43 |
<Reference Include="RestSharp, Version=106.13.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL"> |
|
44 |
<HintPath>..\packages\RestSharp.106.13.0\lib\net452\RestSharp.dll</HintPath> |
|
45 |
</Reference> |
|
43 | 46 |
<Reference Include="System" /> |
44 | 47 |
<Reference Include="System.Core" /> |
45 | 48 |
<Reference Include="System.IO.Compression" /> |
... | ... | |
80 | 83 |
</ItemGroup> |
81 | 84 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
82 | 85 |
<PropertyGroup> |
83 |
<PostBuildEvent>call $(SolutionDir)obfuscarBuild.Bat $(SolutionDir) $(TargetDir) $(ProjectDir)obfuscar.xml |
|
86 |
<PostBuildEvent>rem call $(SolutionDir)obfuscarBuild.Bat $(SolutionDir) $(TargetDir) $(ProjectDir)obfuscar.xml
|
|
84 | 87 |
|
85 |
xcopy /s "$(TargetDir)Obfuscator_Output" "$(TargetDir)" /Y /F</PostBuildEvent> |
|
88 |
rem xcopy /s "$(TargetDir)Obfuscator_Output" "$(TargetDir)" /Y /F</PostBuildEvent>
|
|
86 | 89 |
</PropertyGroup> |
87 | 90 |
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
88 | 91 |
<PropertyGroup> |
DownloadManager/Log.config | ||
---|---|---|
4 | 4 |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> |
5 | 5 |
</configSections> |
6 | 6 |
<log4net> |
7 |
<!--<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender"> |
|
8 |
<applicationName value="ServiceStation"/> |
|
7 |
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> |
|
8 |
<file type="log4net.Util.PatternString" value="${ALLUSERSPROFILE}\markus\Downloader\Log\.log"/> |
|
9 |
<appendToFile value="true" /> |
|
10 |
<rollingStyle value="Composite" /> |
|
11 |
<datePattern value="yyyyMMdd" /> |
|
12 |
<maxSizeRollBackups value="6" /> |
|
13 |
<preserveLogFileNameExtension value="true"/> |
|
14 |
<staticLogFileName value="false" /> |
|
15 |
<maximumFileSize value="5MB" /> |
|
9 | 16 |
<layout type="log4net.Layout.PatternLayout"> |
10 |
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
|
|
17 |
<conversionpattern value="%d [%t] %-5p - %m%n"/>
|
|
11 | 18 |
</layout> |
12 |
</appender>--> |
|
13 |
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> |
|
14 |
<file value="${programdata}\MARKUS\Downloader\Log\{0}.log"/> |
|
15 |
<appendtofile value="true"/> |
|
16 |
<maxSizeRollBackups value="10" /> |
|
17 |
<maximumFileSize value="10485760" /> |
|
18 |
<rollingStyle value="Size" /> |
|
19 |
<staticlogfilename value="true"/> |
|
20 |
<layout type="log4net.Layout.PatternLayout"> |
|
21 |
<header value="[Header]"/> |
|
22 |
<footer value="[Footer] "/> |
|
23 |
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" /> |
|
24 |
</layout> |
|
25 | 19 |
</appender> |
26 | 20 |
<root> |
27 | 21 |
<level value="All" /> |
DownloadManager/PageStorage.cs | ||
---|---|---|
230 | 230 |
using (System.Net.WebClient client = new System.Net.WebClient()) |
231 | 231 |
{ |
232 | 232 |
client.UseDefaultCredentials = true; |
233 |
//client.Headers.Add("user-agent", "Your User-Agent"); |
|
233 | 234 |
System.Net.IWebProxy webProxy = client.Proxy; |
234 | 235 |
|
235 | 236 |
if (webProxy != null) |
DownloadManager/Program.cs | ||
---|---|---|
1 | 1 |
|
2 | 2 |
using log4net; |
3 |
using RestSharp; |
|
3 | 4 |
using System; |
4 | 5 |
using System.Diagnostics; |
6 |
using System.IO; |
|
5 | 7 |
using System.Linq; |
8 |
using System.Net.Http; |
|
9 |
using System.Net.Http.Headers; |
|
10 |
using System.Threading.Tasks; |
|
6 | 11 |
|
7 | 12 |
namespace DownloadManager |
8 | 13 |
{ |
... | ... | |
154 | 159 |
client.DownloadFileAsync(new Uri(System.Web.HttpUtility.UrlDecode(args[3])), args[4]); |
155 | 160 |
} |
156 | 161 |
} |
162 |
else if (args[0] == IIpc.ProcessTypeDefine.DEFINE_REST_FILE) |
|
163 |
{ |
|
164 |
var result = RestDownloadAsync(System.Web.HttpUtility.UrlDecode(args[3]), args[4]).GetAwaiter().GetResult(); |
|
165 |
|
|
166 |
if (!IsDebug) |
|
167 |
wcfClient.SendFileDownloadReceived(100, true); |
|
168 |
|
|
169 |
ConsoleWrite($"Download stream {args[4]} Completed"); |
|
170 |
IsDownload = result; |
|
171 |
|
|
172 |
//var client = new RestClient(System.Web.HttpUtility.UrlDecode(args[3])); |
|
173 |
//client.Timeout = -1; |
|
174 |
//var request = new RestRequest(Method.GET); |
|
175 |
//IRestResponse response = client.Execute(request); |
|
176 |
|
|
177 |
//var fileInfo = new FileInfo(args[4]); |
|
178 |
|
|
179 |
//using (var fileStream = fileInfo.OpenWrite()) |
|
180 |
//{ |
|
181 |
// int position = 0; |
|
182 |
// int step = 300000; |
|
183 |
// int length = 300000; |
|
184 |
|
|
185 |
// while (position < response.RawBytes.Length) |
|
186 |
// { |
|
187 |
// if (position + step < response.RawBytes.Length) |
|
188 |
// { |
|
189 |
// length = position + step; |
|
190 |
// } |
|
191 |
// else |
|
192 |
// { |
|
193 |
// length = response.RawBytes.Length - position; |
|
194 |
// } |
|
195 |
|
|
196 |
// fileStream.Write(response.RawBytes, position, length); |
|
197 |
|
|
198 |
// position = position + step; |
|
199 |
// } |
|
200 |
|
|
201 |
// if (!IsDebug) |
|
202 |
// wcfClient.SendFileDownloadReceived(100, true); |
|
203 |
|
|
204 |
// ConsoleWrite($"Download stream {args[4]} Completed"); |
|
205 |
// IsDownload = true; |
|
206 |
//} |
|
207 |
} |
|
157 | 208 |
|
158 | 209 |
while (!IsDownload) |
159 | 210 |
{ |
... | ... | |
175 | 226 |
} |
176 | 227 |
} |
177 | 228 |
|
229 |
private static async Task<bool> RestDownloadAsync(string uri, string savePath) |
|
230 |
{ |
|
231 |
bool result = false; |
|
232 |
|
|
233 |
try |
|
234 |
{ |
|
235 |
var client = new RestClient(uri); |
|
236 |
client.Timeout = -1; |
|
237 |
var request = new RestRequest(Method.GET); |
|
238 |
IRestResponse response = await client.ExecuteAsync(request); |
|
239 |
|
|
240 |
if (response.StatusCode == System.Net.HttpStatusCode.OK) |
|
241 |
{ |
|
242 |
var fs = File.Create(savePath); |
|
243 |
|
|
244 |
await fs.WriteAsync(response.RawBytes, 0, response.RawBytes.Length); |
|
245 |
fs.Close(); |
|
246 |
result = true; |
|
247 |
} |
|
248 |
} |
|
249 |
catch (Exception ex) |
|
250 |
{ |
|
251 |
logger.Error($"RestDownloadAsync : {uri} {savePath}", ex); |
|
252 |
} |
|
253 |
return result; |
|
254 |
} |
|
255 |
|
|
178 | 256 |
public static void DeleteFiles(string processType, string path) |
179 | 257 |
{ |
180 | 258 |
try |
DownloadManager/packages.config | ||
---|---|---|
3 | 3 |
<package id="log4net" version="2.0.9" targetFramework="net461" /> |
내보내기 Unified diff