Skip to content

Commit

Permalink
all: normalize all the line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
luantranminh committed Aug 10, 2024
1 parent 96f75c4 commit 06f894a
Show file tree
Hide file tree
Showing 10 changed files with 473 additions and 472 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
86 changes: 43 additions & 43 deletions AtlasProvider.sln
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C41D6C7A-456B-4A0B-ACE1-9931DA092288}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Loader", "src\Atlas.Provider.Loader\Atlas.Provider.Loader.csproj", "{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Core", "src\Atlas.Provider.Core\Atlas.Provider.Core.csproj", "{FAEB024F-B0AA-4B7C-A820-68E497657D0D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A0F935A4-52B6-4790-AA08-A86E0CB562E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Test", "test\Atlas.Provider.Test\Atlas.Provider.Test.csproj", "{D34350D9-C254-4187-A908-00EA03DDE2B5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.Build.0 = Debug|Any CPU
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.ActiveCfg = Release|Any CPU
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.Build.0 = Release|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.Build.0 = Release|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288}
{FAEB024F-B0AA-4B7C-A820-68E497657D0D} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288}
{D34350D9-C254-4187-A908-00EA03DDE2B5} = {A0F935A4-52B6-4790-AA08-A86E0CB562E9}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C41D6C7A-456B-4A0B-ACE1-9931DA092288}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Loader", "src\Atlas.Provider.Loader\Atlas.Provider.Loader.csproj", "{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Core", "src\Atlas.Provider.Core\Atlas.Provider.Core.csproj", "{FAEB024F-B0AA-4B7C-A820-68E497657D0D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A0F935A4-52B6-4790-AA08-A86E0CB562E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlas.Provider.Test", "test\Atlas.Provider.Test\Atlas.Provider.Test.csproj", "{D34350D9-C254-4187-A908-00EA03DDE2B5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Debug|Any CPU.Build.0 = Debug|Any CPU
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.ActiveCfg = Release|Any CPU
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537}.Release|Any CPU.Build.0 = Release|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAEB024F-B0AA-4B7C-A820-68E497657D0D}.Release|Any CPU.Build.0 = Release|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D34350D9-C254-4187-A908-00EA03DDE2B5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{003BD0CC-7AF6-408C-A40D-3FE8F6C73537} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288}
{FAEB024F-B0AA-4B7C-A820-68E497657D0D} = {C41D6C7A-456B-4A0B-ACE1-9931DA092288}
{D34350D9-C254-4187-A908-00EA03DDE2B5} = {A0F935A4-52B6-4790-AA08-A86E0CB562E9}
EndGlobalSection
EndGlobal
34 changes: 17 additions & 17 deletions src/Atlas.Provider.Core/Atlas.Provider.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputPath>..\..\artifacts\bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<Configuration>$(Configuration)</Configuration>

<RootNamespace>Atlas.Provider.Core</RootNamespace>
<Description>Entity Framework Core Command-line Tools</Description>
<Nullable>enable</Nullable>
<IncludeSource>false</IncludeSource>
<LangVersion>latest</LangVersion>
<RollForward>Major</RollForward>

<IsPackable>false</IsPackable>
<CheckEolTargetFramework>False</CheckEolTargetFramework>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputPath>..\..\artifacts\bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<Configuration>$(Configuration)</Configuration>

<RootNamespace>Atlas.Provider.Core</RootNamespace>
<Description>Entity Framework Core Command-line Tools</Description>
<Nullable>enable</Nullable>
<IncludeSource>false</IncludeSource>
<LangVersion>latest</LangVersion>
<RollForward>Major</RollForward>

<IsPackable>false</IsPackable>
<CheckEolTargetFramework>False</CheckEolTargetFramework>
</PropertyGroup>
</Project>
126 changes: 63 additions & 63 deletions src/Atlas.Provider.Core/Program.cs
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
using System;
using System.IO;
using Atlas.Provider.Core.Executor;

namespace Atlas.Provider.Core
{
static class Program
{
static int Main(string[] args)
{
try
{
var options = new Options(args);
// prevent any output from being written to the console, including warn, info, error etc messages from EF Core
var originalOut = Console.Out;
Console.SetOut(Console.Error);
using var executor = new EFDesign(
options.Assembly,
options.StartupAssembly,
options.ProjectDir,
null,
options.RootNamespace,
options.Language,
options.Nullable,
options.PositionalArgs?.ToArray()
);
var types = executor.GetContextTypes();
foreach (var type in types)
{
if (!type.Contains("Name") || type["Name"] == null)
{
continue;
}
var name = type["Name"]!.ToString();
if (string.IsNullOrEmpty(name))
{
continue;
}
var ctxInfo = executor.GetContextInfo(name);
if (ctxInfo == null || !ctxInfo.Contains("ProviderName") || ctxInfo["ProviderName"] == null)
{
continue;
}
var sql = executor.ScriptDbContext(name);
Console.SetOut(originalOut);
if (!string.IsNullOrEmpty(sql))
{
if (ctxInfo["ProviderName"]!.ToString()!.EndsWith("SqlServer"))
{
Console.WriteLine("-- atlas:delimiter GO");
}
Console.WriteLine(sql);
}
}
return 0;
}
catch (Exception ex)
{
Console.Error.WriteLine(ex.Message);
return 1;
}
}
}
using System;
using System.IO;
using Atlas.Provider.Core.Executor;

namespace Atlas.Provider.Core
{
static class Program
{
static int Main(string[] args)
{
try
{
var options = new Options(args);
// prevent any output from being written to the console, including warn, info, error etc messages from EF Core
var originalOut = Console.Out;
Console.SetOut(Console.Error);
using var executor = new EFDesign(
options.Assembly,
options.StartupAssembly,
options.ProjectDir,
null,
options.RootNamespace,
options.Language,
options.Nullable,
options.PositionalArgs?.ToArray()
);
var types = executor.GetContextTypes();
foreach (var type in types)
{
if (!type.Contains("Name") || type["Name"] == null)
{
continue;
}
var name = type["Name"]!.ToString();
if (string.IsNullOrEmpty(name))
{
continue;
}
var ctxInfo = executor.GetContextInfo(name);
if (ctxInfo == null || !ctxInfo.Contains("ProviderName") || ctxInfo["ProviderName"] == null)
{
continue;
}
var sql = executor.ScriptDbContext(name);
Console.SetOut(originalOut);
if (!string.IsNullOrEmpty(sql))
{
if (ctxInfo["ProviderName"]!.ToString()!.EndsWith("SqlServer"))
{
Console.WriteLine("-- atlas:delimiter GO");
}
Console.WriteLine(sql);
}
}
return 0;
}
catch (Exception ex)
{
Console.Error.WriteLine(ex.Message);
return 1;
}
}
}
}
40 changes: 20 additions & 20 deletions src/Atlas.Provider.Demo/Atlas.Provider.Demo.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JunitXml.TestLogger" Version="4.0.254" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JunitXml.TestLogger" Version="4.0.254" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
</ItemGroup>
</Project>
Loading

0 comments on commit 06f894a

Please sign in to comment.