Upgrade to Framework 4.7
This commit is contained in:
@@ -21,4 +21,4 @@
|
||||
<add key="proxy_GetCompanyHeadlinesSeekingAlphaV1" value="true"/>
|
||||
<add key="proxy_GetCompanyHeadlinesSeekingAlphaV2" value="true"/>
|
||||
</appSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MarketData</RootNamespace>
|
||||
<AssemblyName>mk</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MarketDataLib</RootNamespace>
|
||||
<AssemblyName>MarketDataLib</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
@@ -266,6 +266,7 @@
|
||||
<Compile Include="MarketDataModel\StopLimit.cs" />
|
||||
<Compile Include="Numerics\LeastSquares.cs" />
|
||||
<Compile Include="Numerics\SharpeRatioGenerator.cs" />
|
||||
<Compile Include="Security\Encryption.cs" />
|
||||
<Compile Include="Utility\CSVLineHelper.cs" />
|
||||
<Compile Include="DataAccess\DataSource.cs" />
|
||||
<Compile Include="DataAccess\DataSourceEx.cs" />
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
<add key="proxy_GetCompanyHeadlinesSeekingAlphaV1" value="true"/>
|
||||
<add key="proxy_GetCompanyHeadlinesSeekingAlphaV2" value="true"/>
|
||||
</appSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MarketDataUnitTests</RootNamespace>
|
||||
<AssemblyName>MarketDataUnitTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
|
||||
@@ -20,6 +20,7 @@
|
||||
<TestProjectType>UnitTest</TestProjectType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
||||
53
Program.cs
53
Program.cs
@@ -22,52 +22,12 @@ using MarketData.Cache;
|
||||
using MarketData.Generator.CMTrend;
|
||||
using Axiom.Interpreter;
|
||||
using System.Data;
|
||||
using MarketData.CNNProcessing;
|
||||
using MySql.Data.MySqlClient;
|
||||
using MarketData.Generator.MovingAverage;
|
||||
using MarketData.Generator.MGSHMomentum;
|
||||
using System.Security.Cryptography;
|
||||
using MarketData.Security;
|
||||
|
||||
namespace MarketData
|
||||
{
|
||||
//public static class Security
|
||||
//{
|
||||
// public static string HashPassword(string password)
|
||||
// {
|
||||
// using (SHA256 sha256 = SHA256.Create())
|
||||
// {
|
||||
// byte[] bytes = Encoding.UTF8.GetBytes(password);
|
||||
// byte[] hashBytes = sha256.ComputeHash(bytes);
|
||||
// return Convert.ToBase64String(hashBytes);
|
||||
// }
|
||||
// }
|
||||
|
||||
// public static (string Salt, string Hash) HashPasswordWithSalt(string password)
|
||||
// {
|
||||
// using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider())
|
||||
// {
|
||||
// byte[] salt = new byte[16];
|
||||
// rng.GetBytes(salt);
|
||||
// using (SHA256 sha256 = SHA256.Create())
|
||||
// {
|
||||
// byte[] passwordBytes = Encoding.UTF8.GetBytes(password);
|
||||
// byte[] saltedPassword = new byte[passwordBytes.Length + salt.Length];
|
||||
// Buffer.BlockCopy(passwordBytes, 0, saltedPassword, 0, passwordBytes.Length);
|
||||
// Buffer.BlockCopy(salt, 0, saltedPassword, passwordBytes.Length, salt.Length);
|
||||
// byte[] hashBytes = sha256.ComputeHash(saltedPassword);
|
||||
// return (Convert.ToBase64String(salt), Convert.ToBase64String(hashBytes));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
class Program
|
||||
{
|
||||
public static void DisplayUsage()
|
||||
@@ -1012,6 +972,10 @@ namespace MarketData
|
||||
//}
|
||||
}
|
||||
|
||||
//Security
|
||||
//public static bool VerifyPassword(string inputPassword, string storedSalt, string storedHash)
|
||||
//public static (string Salt, string Hash) HashPasswordWithSalt(string password)
|
||||
//public static string HashPassword(string password)
|
||||
|
||||
|
||||
|
||||
@@ -1025,6 +989,13 @@ namespace MarketData
|
||||
Trace.Listeners.Add(new TextWriterTraceListener(strLogFile));
|
||||
DateTime currentDate=DateTime.Now;
|
||||
|
||||
//String salt= default;
|
||||
//String hash = default;
|
||||
|
||||
// (String salt, String hash)= Encryption.HashPasswordWithSalt("MN5191306");
|
||||
// bool result = Encryption.VerifyPassword("MN5191306", salt, hash);
|
||||
|
||||
|
||||
DateTime maxHolidayDate =HolidayDA.GetMaxHolidayDate();
|
||||
if(currentDate>maxHolidayDate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user