-
Notifications
You must be signed in to change notification settings - Fork 83.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing bower_components and fixing typo #1529
Conversation
@sayedihashimi I've found this advice about it, but do you have a more official URL handy for us to point to? |
Adding @madskristensen and @DamianEdwards who were more involved in the discussion regarding this than I was. |
Accidently hit the close button. |
There are basically two workflows we want to support going forward:
We don’t want to special case bower_components for SCC since for workflow #1, people would want to check in ./wwwroot/lib/bower_components. |
@shiftkey, does Barry's comment address your concerns? |
Removing bower_components and fixing typo
This commit updates file state to upstream project. Thanks!
## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # DNX project.lock.json artifacts/ *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.pfx *.publishsettings node_modules/ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files *.mdf *.ldf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml
Removing bower_components and fixing typo
## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # DNX project.lock.json project.fragment.lock.json artifacts/ *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted #*.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings node_modules/ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files *.mdf *.ldf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml # CodeRush .cr/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Ignore Theme Files /Calltime.Web/Theme/ /Calltime.Web/assets/ /Calltime.Web/assets # Ignore runtime scripts /Calltime.Web/Scripts /Calltime.Web/Scripts/
## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # DNX project.lock.json project.fragment.lock.json artifacts/ *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted #*.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings node_modules/ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files *.mdf *.ldf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml # CodeRush .cr/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Ignore Theme Files /Calltime.Web/Theme/ /Calltime.Web/assets/ /Calltime.Web/assets # Ignore runtime scripts /Calltime.Web/Scripts /Calltime.Web/Scripts/
.. |
## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ **/Properties/launchSettings.json # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml # CodeRush .cr/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser
diff --git a/.gitignore b/.gitignore index a48f643..9f32482 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,362 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app - -# Log files for saved players -*.log \ No newline at end of file +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + + + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ \ No newline at end of file diff --git a/Genetic.cpp b/Genetic.cpp index 4ebd56a..3d04407 100644 --- a/Genetic.cpp +++ b/Genetic.cpp @@ -1,6 +1,7 @@ #include "Genetic.h" + //mutationRate is in the range [0, 1], greedyPercent is in the range [0, 1] Genetic::Genetic(const float mutationRate, const float greedyPercent) : m_mutationRate(clamp(mutationRate, 0.0f, 1.0f)) @@ -15,7 +16,7 @@ void Genetic::setPopulationSize(int populationSize){ //Make new players based on how successful the current ones are void Genetic::breed(vector<playerContainer<NeuralPlayer> >& population){ vector<playerContainer<NeuralPlayer> > newPop; - newPop.resize(m_populationSize); + newPop.reserve(m_populationSize); //Keep the best greedyPercent of last generation int numToKeep = (int)(m_greedyPercent * (float)m_populationSize); @@ -25,18 +26,18 @@ void Genetic::breed(vector<playerContainer<NeuralPlayer> >& population){ //Copy the players which are being kept from greedyPercent for(int i = 0; i < numToKeep; ++i){ - newPop[i] = population[m_populationSize - 1 - i]; + newPop.push_back(population[m_populationSize - 1 - i]); } //Iterates over the remaining child elements for(int i = numToKeep; i < m_populationSize; ++i){ playerContainer<NeuralPlayer> parent1 = pickParent(population); playerContainer<NeuralPlayer> parent2 = pickParent(population); - vector<Matrix> newWeights = crossOver(parent1, parent2); + vector<MatrixXd> newWeights = crossOver(parent1, parent2); playerContainer<NeuralPlayer> temp(population[m_populationSize-1 - i]); temp.player.neural.setWeights(newWeights); - newPop[i] = temp; + newPop.push_back(temp); } population = newPop; } @@ -50,17 +51,17 @@ void Genetic::mutate(vector<playerContainer<NeuralPlayer> >& population){ int numToKeep = (int)(m_greedyPercent * (float)m_populationSize); for(int i = numToKeep; i < m_populationSize; ++i){ - vector<Matrix> weights = population[i].player.neural.getWeights(); + vector<MatrixXd> weights = population[i].player.neural.getWeights(); size_t layers = weights.size(); //For each layer for(size_t lay = 0; lay < layers; ++lay){ - int rows = weights[lay].numRows(); - int cols = weights[lay].numCols(); + int rows = weights[lay].rows(); + int cols = weights[lay].cols(); //Randomly mutate each element - for(int row = 0; row < rows; ++row){ - for(int col = 0; col < cols; ++col){ + for(int col = 0; col < cols; ++col){ + for(int row = 0; row < rows; ++row){ //Mutate with a certain chance if( ((float)rand() / float(RAND_MAX)) < m_mutationRate){ weights[lay](row, col) += distribution(gen); @@ -98,10 +99,10 @@ playerContainer<NeuralPlayer> Genetic::pickParent( return population.back(); } -vector<Matrix> Genetic::crossOver(const playerContainer<NeuralPlayer> parent1, - const playerContainer<NeuralPlayer> parent2){ - vector<Matrix> weights1; - vector<Matrix> weights2; +vector<MatrixXd> Genetic::crossOver(const playerContainer<NeuralPlayer>& parent1, + const playerContainer<NeuralPlayer>& parent2){ + vector<MatrixXd> weights1; + vector<MatrixXd> weights2; //Parent 1 weights1 = parent1.player.neural.getWeights(); @@ -111,12 +112,12 @@ vector<Matrix> Genetic::crossOver(const playerContainer<NeuralPlayer> parent1, //For each layer for(size_t i = 0; i < length; ++i){ - int rows = weights1[i].numRows(); - int cols = weights1[i].numCols(); + int rows = weights1[i].rows(); + int cols = weights1[i].cols(); //Cross breed matrix - for(int row = 0; row < rows; ++row){ - for(int col = 0; col < cols; ++col){ + for(int col = 0; col < cols; ++col){ + for(int row = 0; row < rows; ++row){ //50% chance of being from parent1 or parent2 if(rand() % 2 == 0){ weights1[i](row, col) = weights2[i](row, col); diff --git a/Genetic.h b/Genetic.h index 3c1563a..9d3ed76 100644 --- a/Genetic.h +++ b/Genetic.h @@ -4,7 +4,9 @@ #include <iostream> #include <random> -#include "Matrix.h" +#include <Eigen/Dense> +using namespace Eigen; + #include "NeuralNet.h" #include "Player.h" #include "main.h" @@ -24,8 +26,8 @@ public: void mutate(vector<playerContainer<NeuralPlayer> >& population); private: - vector<Matrix> crossOver(const playerContainer<NeuralPlayer> parent1, - const playerContainer<NeuralPlayer> parent2); + vector<MatrixXd> crossOver(const playerContainer<NeuralPlayer>& parent1, + const playerContainer<NeuralPlayer>& parent2); playerContainer<NeuralPlayer> pickParent( const vector<playerContainer<NeuralPlayer> >& population) const; diff --git a/Matrix.cpp b/Matrix.cpp deleted file mode 100644 index e445b7d..0000000 --- a/Matrix.cpp +++ /dev/null @@ -1,244 +0,0 @@ - -#include "Matrix.h" - - - - -//Size Constructor -Matrix::Matrix(const unsigned int rows, const unsigned int cols) - : m_rows(rows) - , m_cols(cols){ - if (rows == 0 || cols == 0){ - cerr << "Error: Matrix size constructor has 0 size" << endl; - exit(1); - } - m_data = new double[rows * cols]; -} - -//Copy constructor -Matrix::Matrix(const Matrix& m) - : m_rows(m.m_rows) - , m_cols(m.m_cols){ - if (m_rows <= 0 || m_cols <= 0){ - cerr << "Error: Matrix copy constructor has 0 size" << endl; - exit(1); - } - m_data = new double[m_rows * m_cols]; - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - m_data[m_cols * row + col] = m.m_data[m.m_cols * row + col]; - } - } -} - -//Sets all matrix elements to 'n' -void Matrix::initialize(const int n){ - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - m_data[m_cols * row + col] = n; - } - } -} - -vector<double> Matrix::toVector() const{ - vector<double> temp; - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - temp.push_back(m_data[m_cols * row + col]); - } - } - return temp; -} - -unsigned int Matrix::numRows() const{ - return m_rows; -} - -unsigned int Matrix::numCols() const{ - return m_cols; -} - -//Prints the matrix as a grid to the console -void Matrix::printData() const{ - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - printf("%9.4lf", m_data[m_cols * row + col]); - } - cout << endl; - } -} - -//Returns a copy of itself which is transposed -Matrix Matrix::transpose() const{ - Matrix temp(m_cols, m_rows); - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - temp(col, row) = m_data[m_cols * row + col]; - } - } - return temp; -} - -//Destructor -Matrix::~Matrix(){ - delete[] m_data; -} - -//Override = operator to copy each element -void Matrix::operator= (const Matrix& m){ - if(m.numRows() != m_rows || m.numCols() != m_cols){ - cerr << "Error: Matrix sizes are not equivalent. Cannot perform \ - assignment." << endl; - exit(1); - } - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - m_data[m_cols * row + col] = m.m_data[m.m_cols * row + col]; - } - } -} - -//Override - (unary) operator to negate each element -Matrix Matrix::operator- () const{ - Matrix temp(m_rows, m_cols); - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - temp(row, col) = -1 * m_data[m_cols * row + col]; - } - } - return temp; -} - -//Override + operator to add elementwise -Matrix Matrix::operator+ (const Matrix& a) const{ - if(a.numRows() != m_rows || a.numCols() != m_cols){ - cerr << "Error: Matrix sizes are not equivalent. Cannot perform \ - addition." << endl; - exit(1); - } - Matrix temp(m_rows, m_cols); - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - temp(row, col) = a(row, col) + m_data[m_cols * row + col]; - } - } - return temp; -} - -//Override - operator to subtract elementwise -Matrix Matrix::operator- (const Matrix& a) const{ - if(a.numRows() != m_rows || a.numCols() != m_cols){ - cerr << "Error: Matrix sizes are not equivalent. Cannot perform \ - subtraction." << endl; - exit(1); - } - Matrix temp(m_rows, m_cols); - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - temp(row, col) = m_data[m_cols * row + col] - a(row, col); - } - } - return temp; -} - -//Override * operator to multiply elementwise by a constant -Matrix Matrix::operator* (const int a) const{ - Matrix temp(m_rows, m_cols); - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - temp(row, col) = a * m_data[m_cols * row + col]; - } - } - return temp; -} - -//Override * operator to perform standard matrix multiplication -Matrix Matrix::operator* (const Matrix& a) const{ - if(m_cols != a.numRows()){ - cerr << "Error: Matrix sizes are incompatible. Cannot perform \ - matrix multiplication." << endl; - exit(1); - } - Matrix temp(m_rows, a.m_cols); - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < a.m_cols; ++col){ - //perform cross product between current row and current column - temp(row, col) = 0; - for(unsigned int element = 0; element < m_cols; ++element){ - temp(row, col) += m_data[m_cols * row + element] - * a(element, col); - } - } - } - return temp; -} - -//Override () operator to allow access at a specific location -double& Matrix::operator() (const unsigned int row, const unsigned int col){ - if (row >= m_rows || col >= m_cols ){ - cerr << "Error: Matrix subscript out of bounds (too large)." << endl; - exit(1); - } - return m_data[m_cols * row + col]; -} - -//Override () operator to allow access at a specific location -double Matrix::operator() (const unsigned int row, - const unsigned int col) const{ - if (row >= m_rows || col >= m_cols){ - cerr << "Error: Matrix subscript out of bounds (too large)." << endl; - exit(1); - } - return m_data[m_cols * row + col]; -} - -//Sets each element to a random double in the range [min, max] with specified -//resolution -void Matrix::initRand(const double min, const double max, - const unsigned int resolution){ - if(min > max){ - cerr << "Error: initRand(): Min is larger than max." << endl; - exit(1); - } - if(resolution == 0){ - cerr << "Error: initRand(): Resolution is equal to 0" << endl; - exit(1); - } - for(unsigned int row = 0; row < m_rows; ++row){ - for(unsigned int col = 0; col < m_cols; ++col){ - /* resolution represents how many pieces each (int) is broken into. - * bound is used because we can generate ints better than doubles. - * bound is the product of the total range * resolution. - * Afterward, we divide bound by resolution to get a double. - */ - int bound = (int)( (double)resolution * (max - min) ); - //The double value is created by dividing bound by resolution - double randDouble = min + (double)(rand() % bound) / resolution; - //Passed into the matrix - m_data[m_cols * row + col] = randDouble; - } - } -} - -Matrix Matrix::addRowsCols(unsigned int extraRows, unsigned int extraCols, - const double value){ - unsigned int newRows = m_rows + extraRows; - unsigned int newCols = m_cols + extraCols; - Matrix temp(newRows, newCols); - - for(unsigned int row = 0; row < newRows; ++row){ - for(unsigned int col = 0; col < newCols; ++col){ - if(row < m_rows && col < m_cols){ - temp(row, col) = m_data[m_cols * row + col]; - } else{ - temp(row, col) = value; - } - } - } - return temp; -} - - - - - diff --git a/Matrix.h b/Matrix.h deleted file mode 100644 index 3e04666..0000000 --- a/Matrix.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef MATRIX_H -#define MATRIX_H - -#include <stdexcept> -#include <vector> -#include <iostream> -#include <time.h> -#include <stdlib.h> -#include <stdio.h> - -using std::cout; -using std::cin; -using std::cerr; -using std::endl; -using std::vector; - -class Matrix { -public: - Matrix(const unsigned int rows, const unsigned int cols); - Matrix(const Matrix& m); - ~Matrix(); - - double& operator() (const unsigned int row, const unsigned int col); - double operator() (const unsigned int row, const unsigned int col) const; - void operator= (const Matrix& m); - - std::vector<double> toVector() const; - - unsigned int numRows() const; - unsigned int numCols() const; - void printData() const; - - Matrix operator- () const; - Matrix operator+ (const Matrix& a) const; - Matrix operator- (const Matrix& a) const; - Matrix operator* (const int a) const; - Matrix operator* (const Matrix& a) const; - - Matrix transpose() const; - void initialize(const int n); - void initRand(const double min, const double max, - const unsigned int resolution=20); - - Matrix addRowsCols(unsigned int extraRows, unsigned int extraCols, - const double value); - -private: - unsigned int m_rows, m_cols; - double* m_data; -}; - -#endif diff --git a/NeuralNet.cpp b/NeuralNet.cpp index d86037e..e0865af 100644 --- a/NeuralNet.cpp +++ b/NeuralNet.cpp @@ -9,11 +9,12 @@ NeuralNet::NeuralNet(){ //Constructor takes in the structure of the network as a matrix NeuralNet::NeuralNet(const vector<unsigned int>& layerSizes) : m_layerSizes(layerSizes){ + unsigned int numLayers = layerSizes.size() - 1; + m_weights.reserve(numLayers); + //Create vectors for weights. Each entry is a matrix for that layer - for(unsigned int i = 0; i < layerSizes.size() - 1; ++i){ - Matrix tempWeight(layerSizes[i] + 1, layerSizes[i+1]); - tempWeight.initRand(-1, 1); - m_weights.push_back(tempWeight); + for(unsigned int i = 0; i < numLayers; ++i){ + m_weights.push_back(MatrixXd::Random(layerSizes[i] + 1, layerSizes[i+1])); } } @@ -32,7 +33,7 @@ void NeuralNet::printWeights() const{ cout << "Current weights:" << endl; for(unsigned int i = 0; i < m_weights.size(); ++i){ cout << "================================================" << endl; - m_weights[i].printData(); + cout << m_weights[i] << endl; } cout << "================================================" << endl; } @@ -54,13 +55,12 @@ bool NeuralNet::saveToFile(string fileName) const{ outputFile << "\n"; for(unsigned int lay = 0; lay < m_weights.size(); ++lay){ - unsigned int numRows = m_weights[lay].numRows(); - unsigned int numCols = m_weights[lay].numCols(); + unsigned int rows = m_weights[lay].rows(); + unsigned int cols = m_weights[lay].cols(); - for(unsigned int i = 0; i < numRows; ++i){ - for(unsigned int j = 0; j < numCols; ++j){ - Matrix cur = m_weights[lay]; - outputFile << cur(i, j) << " "; + for(unsigned int col = 0; col < cols; ++col){ + for(unsigned int row = 0; row < rows; ++row){ + outputFile << m_weights[lay](row, col) << " "; } } } @@ -88,12 +88,14 @@ bool NeuralNet::loadFromFile(string fileName){ } for(unsigned int lay = 0; lay < numLayers - 1; ++lay){ - Matrix cur(m_layerSizes[lay] + 1, m_layerSizes[lay + 1]); - for(unsigned int i = 0; i < cur.numRows(); ++i){ - for(unsigned int j = 0; j < cur.numCols(); ++j){ + unsigned int rows = m_layerSizes[lay] + 1; + unsigned int cols = m_layerSizes[lay + 1]; + MatrixXd cur(rows, cols); + for(unsigned int col = 0; col < cols; ++col){ + for(unsigned int row = 0; row < rows; ++row){ double temp; inputFile >> temp; - cur(i, j) = temp; + cur(row, col) = temp; } } m_weights.push_back(cur); @@ -112,27 +114,31 @@ bool NeuralNet::loadFromFile(string fileName){ } //Performs forward propagation using m_weights and 'input' -Matrix NeuralNet::forward(const Matrix& input) const{ +RowVectorXd NeuralNet::forward(const RowVectorXd& input) const{ + unsigned int numLayers = m_weights.size(); + //Stores the previous layer's output - vector<Matrix> layers; + vector<RowVectorXd> layers; + layers.reserve(numLayers + 1); layers.push_back(input); - for(unsigned int lay = 0; lay < m_weights.size(); ++lay){ - //Add extra col with 1.0 in it for bias - Matrix prev = (layers.back()).addRowsCols(0, 1, 1.0f); + for(unsigned int lay = 0; lay < numLayers; ++lay){ + unsigned int numCols = layers[lay].size(); + RowVectorXd prev(numCols + 1); + prev << layers[lay], 1.0; //Cur = f(layers * weights + bias)...where f(x) is nonlinearity funtion - layers.push_back( applyNonlinearity(prev * m_weights[lay], sigmoid) ); + layers.push_back(applyNonlinearity(prev * m_weights[lay], Activations::relu)); } - return layers.back(); + return layers[numLayers]; } -vector<Matrix> NeuralNet::getWeights() const{ +vector<MatrixXd> NeuralNet::getWeights() const{ return m_weights; } //Sets the internal weights -void NeuralNet::setWeights(const vector<Matrix>& weights){ +void NeuralNet::setWeights(const vector<MatrixXd>& weights){ if (weights.size() == 0 || weights.size() != m_weights.size()){ cerr << "Error: setWeights(): Weights have different sizes." << endl; exit(1); @@ -142,20 +148,14 @@ void NeuralNet::setWeights(const vector<Matrix>& weights){ } } -//Applies the nonlinearity function (sigmoid) elementwise -Matrix NeuralNet::applyNonlinearity(const Matrix& input, - double(*callback)(double)) const{ - Matrix temp(input); - for(unsigned int row = 0; row < input.numRows(); ++row){ - for(unsigned int col = 0; col < input.numCols(); ++col){ - //Applies the callback to each element of input - temp(row, col) = callback(input(row, col)); - } - } - return temp; +RowVectorXd NeuralNet::applyNonlinearity(const RowVectorXd& input, Activations activation) const{ + switch (activation){ + case Activations::sigmoid: // 1 / (1 + e^-x) + return (((-1 * input.array()).exp() + 1).inverse()).matrix(); + case Activations::relu: // max(0, x) + return ((input.array() > 0).cast<double>() * input.array()).matrix(); + default: + return input; + } } -//Sigmoid function. Returns a double between (0, 1) -double NeuralNet::sigmoid(const double x){ - return 1 / (1 + exp(-x)); -} diff --git a/NeuralNet.h b/NeuralNet.h index ff3f64a..362af2d 100644 --- a/NeuralNet.h +++ b/NeuralNet.h @@ -1,7 +1,9 @@ #ifndef NN_H #define NN_H -#include "Matrix.h" +#include <Eigen/Dense> +using namespace Eigen; + #include <iostream> #include <fstream> #include <vector> @@ -10,36 +12,43 @@ using std::cout; using std::cin; +using std::cerr; using std::endl; using std::vector; using std::ofstream; using std::ifstream; using std::string; +enum Activations { sigmoid, relu }; + class NeuralNet { + + public: NeuralNet(); NeuralNet(const vector<unsigned int>& layerSizes); NeuralNet(const NeuralNet& nn); - Matrix forward(const Matrix& input) const; + RowVectorXd forward(const RowVectorXd& input) const; void printWeights() const; void operator= (const NeuralNet& nn); - vector<Matrix> getWeights() const; - void setWeights(const vector<Matrix>& weights); + vector<MatrixXd> getWeights() const; + void setWeights(const vector<MatrixXd>& weights); bool saveToFile(string fileName) const; bool loadFromFile(string fileName); private: vector<unsigned int> m_layerSizes; - vector<Matrix> m_weights; + vector<MatrixXd> m_weights; - Matrix applyNonlinearity(const Matrix& input, - double(*funct)(double)) const; - static double sigmoid(const double x); + /*RowVectorXd applyNonlinearity(const RowVectorXd& input, + double(*funct)(double)) const;*/ + RowVectorXd applyNonlinearity(const RowVectorXd& input, Activations activation) const; + //static double sigmoid(const double x); + //static double relu(const double x); }; #endif diff --git a/Player.cpp b/Player.cpp index df231b7..27dfbad 100644 --- a/Player.cpp +++ b/Player.cpp @@ -24,8 +24,7 @@ void Player::operator= (const Player& right){ } /* vector<double> Player::getMove() const{ - Matrix temp(1, 9); - temp.initRand(-1, 1); + MatrixXd temp = MatrixXd::Random(1, 9); return temp.toVector(); }*/ @@ -68,8 +67,8 @@ void NeuralPlayer::operator= (const NeuralPlayer& right){ neural = right.neural; } -vector<double> NeuralPlayer::getMove(const Matrix& input) const{ - return neural.forward(input).toVector(); +RowVectorXd NeuralPlayer::getMove(const RowVectorXd& input) const{ + return neural.forward(input); } //----------ManualPlayer-------------- @@ -98,7 +97,7 @@ void ManualPlayer::operator= (const ManualPlayer& right){ Player::operator=(right); } -vector<double> ManualPlayer::getMove(const Matrix& input) const{ +RowVectorXd ManualPlayer::getMove(const RowVectorXd& input) const{ unsigned int row, col; char eater; m_os << "Your move, of the form \"row, col\": "; @@ -106,10 +105,10 @@ vector<double> ManualPlayer::getMove(const Matrix& input) const{ row --; col --; - Matrix temp(m_rows, m_cols); - temp.initialize(0); - temp(row, col) = 1; - return temp.toVector(); + RowVectorXd temp(m_rows * m_cols); + temp << RowVectorXd::Constant(m_rows * m_cols, 0); + temp(row * m_cols + col) = 1.0; + return temp; } //----------PerfectPlayer-------------- diff --git a/Player.h b/Player.h index f15f861..6449e6e 100644 --- a/Player.h +++ b/Player.h @@ -1,8 +1,10 @@ #ifndef PLAYER_H #define PLAYER_H +#include <Eigen/Dense> +using namespace Eigen; + #include <vector> -#include "Matrix.h" #include "NeuralNet.h" using std::cout; @@ -22,7 +24,7 @@ public: void operator= (const Player& right); bool operator< (const Player& right) const; - virtual vector<double> getMove(const Matrix& input) const = 0; + virtual RowVectorXd getMove(const RowVectorXd& input) const = 0; void addToFitness(const double a); double getFitness() const; @@ -44,7 +46,7 @@ public: void operator= (const NeuralPlayer& right); - virtual vector<double> getMove(const Matrix& input) const override; + virtual RowVectorXd getMove(const RowVectorXd& input) const override; NeuralNet neural; private: @@ -61,7 +63,7 @@ public: void operator= (const ManualPlayer& right); - virtual vector<double> getMove(const Matrix& input) const override; + virtual RowVectorXd getMove(const RowVectorXd& input) const override; private: istream& m_is; @@ -79,7 +81,7 @@ public: void operator= (const PerfectPlayer& right); - virtual vector<double> getMove(const Matrix& input) const override; + virtual vector<double> getMove(const VectorXd& input) const override; private: double winningMove() const; diff --git a/Population.h b/Population.h index 0d7953c..2f006df 100644 --- a/Population.h +++ b/Population.h @@ -7,13 +7,16 @@ #include <vector> #include <algorithm> #include <string> +#include <ctime> + +#include <Eigen/Dense> +using namespace Eigen; -#include "Matrix.h" #include "NeuralNet.h" #include "Player.h" #include "TicTacToe.h" #include "Genetic.h" -#include "UltimateTTT.h" +//#include "UltimateTTT.h" using std::cout; using std::cin; @@ -29,7 +32,7 @@ public: Population<Game>(); void init(unsigned int seed = 1, istream& is = cin, ostream& os = cout); - void train(bool verbose); + time_t train(bool verbose); string saveBest(string path); void loadBest(string path, string name = ""); @@ -140,7 +143,8 @@ string Population<Game>::saveBest(string path){ template <template <class, class> class Game> -void Population<Game>::train(bool verbose){ +time_t Population<Game>::train(bool verbose){ + time_t startTime = time(NULL); for(int generation = 0; generation < m_iterations; ++generation){ //Play games with every permutaiton of players roundRobin(); @@ -149,7 +153,7 @@ void Population<Game>::train(bool verbose){ sort(m_population.begin(), m_population.end(), comparePlayerContainer<NeuralPlayer>); - m_hallOfFame.push_back(m_population.back()); + m_hallOfFame.push_back(m_population[m_populationSize - 1]); //Print board if(verbose){ @@ -179,6 +183,7 @@ void Population<Game>::train(bool verbose){ m_population[i].player.resetFitness(); } } + return time(NULL) - startTime; } @@ -241,6 +246,7 @@ void Population<Game>::init(unsigned int seed, istream& is, ostream& os){ } m_ga.setPopulationSize(m_populationSize); + m_hallOfFame.reserve(m_iterations); } template <template <class, class> class Game> diff --git a/README.md b/README.md index 1fbf255..f4e88d8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# TicTacToeMachineLearning -The goal of this project is to train the computer to play tic tac toe at a superhuman level. This is a rather trivial problem, but I'm simply using it as a chance to learn more about machine learning. My approach is overkill, but this is just a fun project. - -I'm using a neural network trained by a genetic algorithm to learn tic tac toe. I start with a random population of players. Each generation they play every other player once. Fitness points are awarded for their record: 0 points for each loss, 0.5 for each tie, and 1 point for each win. I then evolve the the players based on normal genetic algorithm techniques (mutation, breeding, crossover, etc.). The goal is to maximize the player's fitness. +# TicTacToeMachineLearning +The goal of this project is to train the computer to play tic tac toe at a superhuman level. This is a rather trivial problem, but I'm simply using it as a chance to learn more about machine learning. My approach is overkill, but this is just a fun project. + +I'm using a neural network trained by a genetic algorithm to learn tic tac toe. I start with a random population of players. Each generation they play every other player once. Fitness points are awarded for their record: 0 points for each loss, 0.5 for each tie, and 1 point for each win. I then evolve the the players based on normal genetic algorithm techniques (mutation, breeding, crossover, etc.). The goal is to maximize the player's fitness. diff --git a/TicTacToe.h b/TicTacToe.h index f7d97eb..530bb82 100644 --- a/TicTacToe.h +++ b/TicTacToe.h @@ -1,7 +1,9 @@ #ifndef TTT_H #define TTT_H -#include "Matrix.h" +#include <Eigen/Dense> +using namespace Eigen; + #include "NeuralNet.h" #include "Player.h" @@ -12,6 +14,7 @@ using std::cout; using std::cin; +using std::cerr; using std::endl; using std::vector; using std::pair; @@ -35,13 +38,13 @@ private: bool isEmpty() const; bool isFull() const; - Matrix toMatrix() const; - Matrix toPlayerPerspective(const States state) const; + RowVectorXd toMatrix() const; + RowVectorXd toPlayerPerspective(const States state) const; States getBoardAtPosition(const int position) const; void setBoardAtPosition(const int position, const States state); - vector<unsigned int> bestMoves(const vector<double>& input) const; + RowVectorXi bestMoves(const RowVectorXd& input) const; void printBoard() const; bool hasWon() const; @@ -104,28 +107,24 @@ bool TicTacToe<T1, T2>::isFull() const{ //Returns a vector of the preferred moves starting with most preferred template <class T1, class T2> -vector<unsigned int> TicTacToe<T1, T2>::bestMoves( - const vector<double>& input) const{ - vector<unsigned int> temp; +RowVectorXi TicTacToe<T1, T2>::bestMoves(const RowVectorXd& input) const{ + Matrix<int, 1, 9> ret; vector< pair<double, unsigned int> > inputPair; - - temp.resize(NUM_OUTPUTS, -1); + inputPair.reserve(9); //Populate inputPair for(unsigned int i = 0; i < NUM_OUTPUTS; ++i){ - inputPair.push_back(make_pair(input[i], i)); + inputPair.push_back(make_pair(input(i), i)); } sort(inputPair.begin(), inputPair.end()); - //Populate temp + //Populate ret for(unsigned int i = 0; i < NUM_OUTPUTS; ++i){ - temp[i] = inputPair[i].second; + ret(8 - i) = inputPair[i].second; } - //Reverse temp - reverse(temp.begin(), temp.end()); - return temp; + return ret; } //Prints the current board to the console @@ -154,13 +153,11 @@ void TicTacToe<T1, T2>::printBoard() const{ * representation so it can be passed into other methods. */ template <class T1, class T2> -Matrix TicTacToe<T1, T2>::toMatrix() const{ - Matrix temp(1, NUM_OUTPUTS); +RowVectorXd TicTacToe<T1, T2>::toMatrix() const{ + RowVectorXd temp(NUM_OUTPUTS); - for(int i = 0; i < 3; ++i){ - for(int j = 0; j < 3; ++j){ - temp(0, 3 * i + j) = (float)getBoardAtPosition(3 * i + j); - } + for(int i = 0; i < 9; ++i){ + temp(i) = (double)getBoardAtPosition(i); } return temp; } @@ -172,19 +169,17 @@ Matrix TicTacToe<T1, T2>::toMatrix() const{ - empty squares = 0 */ template <class T1, class T2> -Matrix TicTacToe<T1, T2>::toPlayerPerspective(const States state) const{ - Matrix temp(toMatrix()); +RowVectorXd TicTacToe<T1, T2>::toPlayerPerspective(const States state) const{ + RowVectorXd temp = toMatrix(); - for(unsigned int i = 0; i < temp.numRows(); ++i){ - for(unsigned int j = 0; j < temp.numCols(); ++j){ - States cur = static_cast<States>(temp(i, j)); - if(cur == States::empty){ - temp(i, j) = 0.0; - } else if(cur == state){ - temp(i, j) = 1.0; - } else{ - temp(i, j) = -1.0; - } + for(unsigned int i = 0; i < 9; ++i){ + States cur = static_cast<States>((int)temp(i)); + if(cur == States::empty){ + temp(i) = 0.0; + } else if(cur == state){ + temp(i) = 1.0; + } else{ + temp(i) = -1.0; } } return temp; @@ -258,7 +253,7 @@ bool TicTacToe<T1, T2>::hasWon() const{ template <class T1, class T2> bool TicTacToe<T1, T2>::takeTurn(const States state, const int turn){ //holds the list of desired moves in order of preference - vector<unsigned int> moves; + RowVectorXi moves; //Diagnostics if(m_verbose){ @@ -266,7 +261,7 @@ bool TicTacToe<T1, T2>::takeTurn(const States state, const int turn){ } //player 1 controls 'X' squares, player 2 controls 'O' squares - Matrix playerPerspective = toPlayerPerspective(state); + RowVectorXd playerPerspective = toPlayerPerspective(state); if(state == States::playerX){ moves = bestMoves(m_player1.player.getMove(playerPerspective)); } else{ @@ -275,8 +270,8 @@ bool TicTacToe<T1, T2>::takeTurn(const States state, const int turn){ //Make the best move from available squares for(int i = 0; i < NUM_OUTPUTS; ++i){ - if(getBoardAtPosition(moves[i]) == States::empty){ - setBoardAtPosition(moves[i], state); + if(getBoardAtPosition(moves(i)) == States::empty){ + setBoardAtPosition(moves(i), state); break; } } diff --git a/TicTacToeMachineLearning.sln b/TicTacToeMachineLearning.sln new file mode 100644 index 0000000..61f2553 --- /dev/null +++ b/TicTacToeMachineLearning.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2035 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TicTacToeMachineLearning", "TicTacToeMachineLearning.vcxproj", "{AE943583-6E21-47EC-BFC2-F37CA248C5A9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Debug|x64.ActiveCfg = Debug|x64 + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Debug|x64.Build.0 = Debug|x64 + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Debug|x86.ActiveCfg = Debug|Win32 + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Debug|x86.Build.0 = Debug|Win32 + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Release|x64.ActiveCfg = Release|x64 + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Release|x64.Build.0 = Release|x64 + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Release|x86.ActiveCfg = Release|Win32 + {AE943583-6E21-47EC-BFC2-F37CA248C5A9}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7CBB95EE-B334-49D0-B4E3-EB36EAE13774} + EndGlobalSection +EndGlobal diff --git a/TicTacToeMachineLearning.vcxproj b/TicTacToeMachineLearning.vcxproj new file mode 100644 index 0000000..5e818ca --- /dev/null +++ b/TicTacToeMachineLearning.vcxproj @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <VCProjectVersion>15.0</VCProjectVersion> + <ProjectGuid>{AE943583-6E21-47EC-BFC2-F37CA248C5A9}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>D:/MinGW/include/eigen-eigen-5a0156e40feb/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <Optimization>Disabled</Optimization> + </ClCompile> + <Link> + <TargetMachine>MachineX86</TargetMachine> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>D:/MinGW/include/eigen-eigen-5a0156e40feb/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <TargetMachine>MachineX86</TargetMachine> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Genetic.cpp" /> + <ClCompile Include="main.cpp" /> + <ClCompile Include="Matrix.cpp" /> + <ClCompile Include="NeuralNet.cpp" /> + <ClCompile Include="Player.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="Genetic.h" /> + <ClInclude Include="main.h" /> + <ClInclude Include="Matrix.h" /> + <ClInclude Include="NeuralNet.h" /> + <ClInclude Include="Player.h" /> + <ClInclude Include="Population.h" /> + <ClInclude Include="TicTacToe.h" /> + <ClInclude Include="UltimateTTT.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/TicTacToeMachineLearning.vcxproj.filters b/TicTacToeMachineLearning.vcxproj.filters new file mode 100644 index 0000000..4feca21 --- /dev/null +++ b/TicTacToeMachineLearning.vcxproj.filters @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="Genetic.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="main.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Matrix.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="NeuralNet.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Player.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="Genetic.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="main.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Matrix.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="NeuralNet.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Player.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Population.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="TicTacToe.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="UltimateTTT.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/Todo.txt b/Todo.txt index 3ec2b32..b39e9ec 100644 --- a/Todo.txt +++ b/Todo.txt @@ -1,7 +1,8 @@ TODO List - Code formatting -- Improve Matrix class functionality/cleanliness +- XXXXXXXXXXXXX Improve Matrix class functionality/cleanliness XXXXXXXXXXXXX +- Use Eigen matrix library - Ultimate Tic Tac Toe - Random Player (chooses moves randomly) - Timekeeping (execution time) diff --git a/Training Times.xlsx b/Training Times.xlsx new file mode 100644 index 0000000..fe8cf0b Binary files /dev/null and b/Training Times.xlsx differ diff --git a/UltimateTTT.h b/UltimateTTT.h index 5f47f14..45cb8fa 100644 --- a/UltimateTTT.h +++ b/UltimateTTT.h @@ -133,10 +133,11 @@ bool UltimateTTT<T1, T2>::subBoardTied(const int subBoard) const{ template <class T1, class T2> vector<unsigned int> UltimateTTT<T1, T2>::bestMoves( const vector<double>& input) const{ - vector<unsigned int> temp; - temp.resize(NUM_OUTPUTS, -1); - - vector< pair<double, unsigned int> > inputPair; + + vector<unsigned int> ret; + vector< pair<double, unsigned int> > inputPair; + ret.reserve(NUM_OUTPUTS); + inputPair.reserve(NUM_OUTPUTS); //Populate inputPair for(unsigned int i = 0; i < NUM_OUTPUTS; ++i){ @@ -147,12 +148,12 @@ vector<unsigned int> UltimateTTT<T1, T2>::bestMoves( //Populate temp for(unsigned int i = 0; i < NUM_OUTPUTS; ++i){ - temp[i] = inputPair[i].second; + ret.push_back(inputPair[i].second); } //Reverse temp - reverse(temp.begin(), temp.end()); - return temp; + reverse(ret.begin(), ret.end()); + return ret; } //Prints the current board to the console diff --git a/main.cpp b/main.cpp index 81926da..4b1da79 100644 --- a/main.cpp +++ b/main.cpp @@ -2,16 +2,17 @@ #include "main.h" #include "Population.h" +#include <Eigen/Dense> int main(){ - srand(time(NULL)); - + srand((unsigned int)time(NULL)); + //Where your player log files are stored string path = "data/"; Population<TicTacToe> pop; - + /* ManualPlayer tempHuman1(cin, cout, 10, 9); playerContainer<ManualPlayer> human1(tempHuman1); @@ -26,7 +27,7 @@ int main(){ UltimateTTT<NeuralPlayer, NeuralPlayer> ttt(machine1, machine2, true); ttt.playGame(); - + */ char loadPlayer; cout << "Do you want to load a trained player? (y/n): "; @@ -36,8 +37,10 @@ int main(){ if(loadPlayer == 'y' || loadPlayer == 'Y'){ pop.loadBest(path); } else{ - pop.init(time(NULL)); - pop.train(false); + pop.init((unsigned int)time(NULL)); + time_t trainingTime = pop.train(false); + + cout << "Time to train: " << trainingTime << endl; char savePlayer; cout << "Do you want to save the best player to a file? (y/n): "; diff --git a/makefile b/makefile index 8167680..9100c15 100644 --- a/makefile +++ b/makefile @@ -5,21 +5,22 @@ Warnings = -Wall -Wextra -Wdouble-promotion -Wswitch-default -Wfloat-equal \ Sanitize = -fsanitize=address -fsanitize=undefined TestingFlags = -Og -g ReleaseFlags = -O3 -Targets = main.cpp Matrix.cpp NeuralNet.cpp Player.cpp Genetic.cpp +Targets = main.cpp NeuralNet.cpp Player.cpp Genetic.cpp +Include = -isystem d:/MinGW/include/eigen-eigen-5a0156e40feb/ all: $(Targets) $(RM) a - g++ $(CompilerFlags) $(Warnings) $(TestingFlags) $(Targets) + g++ $(CompilerFlags) $(Warnings) $(TestingFlags) $(Targets) $(Include) run: $(Targets) $(RM) a - g++ $(CompilerFlags) $(Warnings) $(TestingFlags) $(Targets) + g++ $(CompilerFlags) $(Warnings) $(TestingFlags) $(Targets) $(Include) ./a.exe fast: $(Targets) $(RM) a - g++ $(CompilerFlags) $(Warnings) $(ReleaseFlags) $(Targets) + g++ $(CompilerFlags) $(Warnings) $(ReleaseFlags) $(Targets) $(Include) clean: $(RM) a
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1a0dbd --- /dev/null +++ b/.gitignore @@ -0,0 +1,457 @@ +### https://raw.github.com/github/gitignore/300be202df4d2bc4824249407fb617df64750627/Global/macOS.gitignore + +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### https://raw.github.com/github/gitignore/300be202df4d2bc4824249407fb617df64750627/Global/Windows.gitignore + +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### https://raw.github.com/github/gitignore/300be202df4d2bc4824249407fb617df64750627/VisualStudio.gitignore + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (github/gitignore#2483 (comment)) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (github/gitignore#1529 (comment)) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +### https://raw.github.com/github/gitignore/300be202df4d2bc4824249407fb617df64750627/Global/JetBrains.gitignore + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + + diff --git a/HanoiTower.sln b/HanoiTower.sln new file mode 100644 index 0000000..d7a8d52 --- /dev/null +++ b/HanoiTower.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HanoiTower", "HanoiTower\HanoiTower.csproj", "{EF983A81-088F-4943-8ED2-539E8FD9F136}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EF983A81-088F-4943-8ED2-539E8FD9F136}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF983A81-088F-4943-8ED2-539E8FD9F136}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF983A81-088F-4943-8ED2-539E8FD9F136}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF983A81-088F-4943-8ED2-539E8FD9F136}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/HanoiTower/HanoiTower.csproj b/HanoiTower/HanoiTower.csproj new file mode 100644 index 0000000..5bfde6c --- /dev/null +++ b/HanoiTower/HanoiTower.csproj @@ -0,0 +1,16 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>netcoreapp2.1</TargetFramework> + </PropertyGroup> + + <ItemGroup> + <Compile Remove="EmptyClass.cs" /> + <Compile Remove="MomorisedRecursableFuncExtensions.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="csharp-monad" Version="1.0.1" /> + <PackageReference Include="AsyncEnumerator" Version="2.2.1" /> + </ItemGroup> +</Project> diff --git a/HanoiTower/PartialApplying.cs b/HanoiTower/PartialApplying.cs new file mode 100644 index 0000000..527e264 --- /dev/null +++ b/HanoiTower/PartialApplying.cs @@ -0,0 +1,31 @@ +using System; +namespace Functional { + + public delegate TResult PartialApply<T, TResult>(T arg); + + public static class PartialApplyFuncExtensions { + public static PartialApply<T_, TResult> _<T_, TResult>(this Func<T_, TResult> func) => new PartialApply<T_, TResult>(func); + public static PartialApply<T_, TResult> _<T_, TResult>(this Func<T_, PartialApply<T_, TResult>> func) => _ => func(_)(_); + public static Func<T1, PartialApply<T_, TResult>> _<T_, T1, TResult>(this Func<T_, Func<T1, TResult>> func) => v1 => _ => func(_)(v1); + public static Func<T1, PartialApply<T_, TResult>> _<T_, T1, TResult>(this Func<T_, Func<T1, PartialApply<T_, TResult>>> func) => v1 => _ => func(_)(v1)(_); + public static Func<T1, Func<T2, PartialApply<T_, TResult>>> _<T_, T1, T2, TResult>(this Func<T_, Func<T1, Func<T2, TResult>>> func) => v1 => v2 => _ => func(_)(v1)(v2); + public static Func<T1, Func<T2, PartialApply<T_, TResult>>> _<T_, T1, T2, TResult>(this Func<T_, Func<T1, Func<T2, PartialApply<T_, TResult>>>> func) => v1 => v2 => _ => func(_)(v1)(v2)(_); + public static Func<T1, Func<T2, Func<T3, PartialApply<T_, TResult>>>> _<T_, T1, T2, T3, TResult>(this Func<T_, Func<T1, Func<T2, Func<T3, TResult>>>> func) => v1 => v2 => v3 => _ => func(_)(v1)(v2)(v3); + public static Func<T, TResult> ToFunc<T, TResult>(PartialApply<T, TResult> func) => v => func(v); + } + + public static class CurryFuncExtensions { + public static Func<T1, TResult> Curry<T1, TResult>(this Func<T1, TResult> func) => v1 => func(v1); + public static Func<T1, Func<T2, TResult>> Curry<T1, T2, TResult>(this Func<T1, T2, TResult> func) => v1 => v2 => func(v1, v2); + public static Func<T1, Func<T2, Func<T3, TResult>>> Curry<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> func) => v1 => v2 => v3 => func(v1, v2, v3); + public static Func<T1, Func<T2, Func<T3, Func<T4, TResult>>>> Curry<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> func) => v1 => v2 => v3 => v4 => func(v1, v2, v3, v4); + } + + public static class CurryActionExtensions { + public static Action<T1> Curry<T1>(this Action<T1> func) => v1 => func(v1); + public static Func<T1, Action<T2>> Curry<T1, T2>(this Action<T1, T2> func) => v1 => v2 => func(v1, v2); + public static Func<T1, Func<T2, Action<T3>>> Curry<T1, T2, T3>(this Action<T1, T2, T3> func) => v1 => v2 => v3 => func(v1, v2, v3); + public static Func<T1, Func<T2, Func<T3, Action<T4>>>> Curry<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> func) => v1 => v2 => v3 => v4 => func(v1, v2, v3, v4); + } + +} diff --git a/HanoiTower/Program.cs b/HanoiTower/Program.cs new file mode 100644 index 0000000..8413db9 --- /dev/null +++ b/HanoiTower/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Async; +using System.Threading; +using Functional; + +namespace HanoiTower { + class Program { + static void Main(string[] args) { + var hanoi = RecursableFuncExtensions.RecurseMemorised<int, int, int, int, AsyncEnumerable<string>> + ((next, src, bare, dst, height) => new AsyncEnumerable<string>(async yield => { + if (height > 1) foreach (var r in next(src, dst, bare, height - 1).ToEnumerable()) await yield.ReturnAsync(r); + await yield.ReturnAsync($"object: {height}, tower: {src}->{dst}"); + if (height > 1) foreach (var r in next(bare, src, dst, height - 1).ToEnumerable()) await yield.ReturnAsync(r); + }).Curry()(1)(2)(3); + + int h; + if (args.Length == 0 || !int.TryParse(args[0], out h)) h = 3; + hanoi(h).ForEachAsync(s => Console.WriteLine(s)); + } + } +} \ No newline at end of file diff --git a/HanoiTower/RecursableFuncExtensions.cs b/HanoiTower/RecursableFuncExtensions.cs new file mode 100644 index 0000000..86fc04c --- /dev/null +++ b/HanoiTower/RecursableFuncExtensions.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; + +namespace Functional { + + public static class RecursableFuncExtensions { + + public static Func<T1, TResult> Recurse<T1, TResult>(this Func<Func<T1, TResult>, T1, TResult> f) { + Func<T1, TResult> next = null; + return next = p1 => f(next, p1); + } + + public static Func<T1, T2, TResult> Recurse<T1, T2, TResult>(this Func<Func<T1, T2, TResult>, T1, T2, TResult> f) { + Func<T1, T2, TResult> next = null; + return next = (p1, p2) => f(next, p1, p2); + } + + public static Func<T1, T2, T3, TResult> Recurse<T1, T2, T3, TResult>(this Func<Func<T1, T2, T3, TResult>, T1, T2, T3, TResult> f) { + Func<T1, T2, T3, TResult> next = null; + return next = (p1, p2, p3) => f(next, p1, p2, p3); + } + + public static Func<T1, T2, T3, T4, TResult> Recurse<T1, T2, T3, T4, TResult>(this Func<Func<T1, T2, T3, T4, TResult>, T1, T2, T3, T4, TResult> f) { + Func<T1, T2, T3, T4, TResult> next = null; + return next = (p1, p2, p3, p4) => f(next, p1, p2, p3, p4); + } + + public static Func<T1, T2, T3, T4, T5, TResult> Recurse<T1, T2, T3, T4, T5, TResult>(this Func<Func<T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, TResult> f) { + Func<T1, T2, T3, T4, T5, TResult> next = null; + return next = (p1, p2, p3, p4, p5) => f(next, p1, p2, p3, p4, p5); + } + + public static Func<T1, T2, T3, T4, T5, T6, TResult> Recurse<T1, T2, T3, T4, T5, T6, TResult>(this Func<Func<T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6, TResult> f) { + Func<T1, T2, T3, T4, T5, T6, TResult> next = null; + return next = (p1, p2, p3, p4, p5, p6) => f(next, p1, p2, p3, p4, p5, p6); + } + + public static Func<T1, TResult> RecurseMemorised<T1, TResult>(this Func<Func<T1, TResult>, T1, TResult> f) { + Dictionary<T1, TResult> memory = new Dictionary<T1, TResult>(); + Func<T1, TResult> next = null; + return next = p1 => memory.ContainsKey(p1) ? memory[p1] : memory[p1] = f(next, p1); + } + + public static Func<T1, T2, TResult> RecurseMemorised<T1, T2, TResult>(this Func<Func<T1, T2, TResult>, T1, T2, TResult> f) { + Dictionary<object, TResult> memory = new Dictionary<object, TResult>(); + Func<T1, T2, TResult> next = null; + return next = (p1, p2) => memory.ContainsKey(new { p1, p2 }) ? memory[new { p1, p2 }] : memory[new { p1, p2 }] = f(next, p1, p2); + } + + public static Func<T1, T2, T3, TResult> RecurseMemorised<T1, T2, T3, TResult>(this Func<Func<T1, T2, T3, TResult>, T1, T2, T3, TResult> f) { + Dictionary<object, TResult> memory = new Dictionary<object, TResult>(); + Func<T1, T2, T3, TResult> next = null; + return next = (p1, p2, p3) => memory.ContainsKey(new { p1, p2, p3 }) ? memory[new { p1, p2, p3 }] : memory[new { p1, p2, p3 }] = f(next, p1, p2, p3); + } + + public static Func<T1, T2, T3, T4, TResult> RecurseMemorised<T1, T2, T3, T4, TResult>(this Func<Func<T1, T2, T3, T4, TResult>, T1, T2, T3, T4, TResult> f) { + Dictionary<object, TResult> memory = new Dictionary<object, TResult>(); + Func<T1, T2, T3, T4, TResult> next = null; + return next = (p1, p2, p3, p4) => memory.ContainsKey(new { p1, p2, p3, p4 }) ? memory[new { p1, p2, p3, p4 }] : memory[new { p1, p2, p3, p4 }] = f(next, p1, p2, p3, p4); + } + + public static Func<T1, T2, T3, T4, T5, TResult> RecurseMemorised<T1, T2, T3, T4, T5, TResult>(this Func<Func<T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, TResult> f) { + Dictionary<object, TResult> memory = new Dictionary<object, TResult>(); + Func<T1, T2, T3, T4, T5, TResult> next = null; + return next = (p1, p2, p3, p4, p5) => memory.ContainsKey(new { p1, p2, p3, p4, p5 }) ? memory[new { p1, p2, p3, p4, p5 }] : memory[new { p1, p2, p3, p4, p5 }] = f(next, p1, p2, p3, p4, p5); + } + + public static Func<T1, T2, T3, T4, T5, T6, TResult> RecurseMemorised<T1, T2, T3, T4, T5, T6, TResult>(this Func<Func<T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6, TResult> f) { + Dictionary<object, TResult> memory = new Dictionary<object, TResult>(); + Func<T1, T2, T3, T4, T5, T6, TResult> next = null; + return next = (p1, p2, p3, p4, p5, p6) => memory.ContainsKey(new { p1, p2, p3, p4, p5, p6 }) ? memory[new { p1, p2, p3, p4, p5, p6 }] : memory[new { p1, p2, p3, p4, p5, p6 }] = f(next, p1, p2, p3, p4, p5, p6); + } + } +}
## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92275db --- /dev/null +++ b/.gitignore @@ -0,0 +1,405 @@ +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# content below from: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (github/gitignore#2483 (comment)) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (github/gitignore#1529 (comment)) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ \ No newline at end of file diff --git a/apiPlayground.sln b/apiPlayground.sln new file mode 100644 index 0000000..4dab081 --- /dev/null +++ b/apiPlayground.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.810.5 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apiPlayground", "apiPlayground\apiPlayground.csproj", "{ABF8BFFB-F192-45A0-AB87-CBBE1CE98C72}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ABF8BFFB-F192-45A0-AB87-CBBE1CE98C72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABF8BFFB-F192-45A0-AB87-CBBE1CE98C72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABF8BFFB-F192-45A0-AB87-CBBE1CE98C72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABF8BFFB-F192-45A0-AB87-CBBE1CE98C72}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6A43EAEA-C456-4961-92B8-4AE1FEEFE946} + EndGlobalSection +EndGlobal diff --git a/apiPlayground/Context.cs b/apiPlayground/Context.cs new file mode 100644 index 0000000..de894b6 --- /dev/null +++ b/apiPlayground/Context.cs @@ -0,0 +1,13 @@ +using System; +using Microsoft.EntityFrameworkCore; + +namespace apiPlayground +{ + public class DatabaseContext : DbContext + { + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseSqlite("Filename=MyDatabase.db"); + } + } +} diff --git a/apiPlayground/Controllers/BookController.cs b/apiPlayground/Controllers/BookController.cs new file mode 100644 index 0000000..3cabe38 --- /dev/null +++ b/apiPlayground/Controllers/BookController.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace apiPlayground.Controllers +{ + [ApiController] + [Route("[controller]")] + public class BookController : ControllerBase + { + private readonly DatabaseContext _myDbContext = new DatabaseContext(); + + [HttpGet] + public IEnumerable<int> Get() + { + return Enumerable.Range(1, 5).ToArray(); + } + } +} diff --git a/apiPlayground/Controllers/WeatherForecastController.cs b/apiPlayground/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..6c52247 --- /dev/null +++ b/apiPlayground/Controllers/WeatherForecastController.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; + +namespace apiPlayground.Controllers +{ + [ApiController] + [Route("[controller]")] + public class WeatherForecastController : ControllerBase + { + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger<WeatherForecastController> _logger; + + public WeatherForecastController(ILogger<WeatherForecastController> logger) + { + _logger = logger; + } + + [HttpGet] + public IEnumerable<WeatherForecast> Get() + { + var rng = new Random(); + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = rng.Next(-20, 55), + Summary = Summaries[rng.Next(Summaries.Length)] + }) + .ToArray(); + } + } +} diff --git a/apiPlayground/Program.cs b/apiPlayground/Program.cs new file mode 100644 index 0000000..d1042e5 --- /dev/null +++ b/apiPlayground/Program.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace apiPlayground +{ + public class Program + { + public static void Main(string[] args) + { + Console.WriteLine(args); + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup<Startup>(); + }); + } +} diff --git a/apiPlayground/Properties/launchSettings.json b/apiPlayground/Properties/launchSettings.json new file mode 100644 index 0000000..d624078 --- /dev/null +++ b/apiPlayground/Properties/launchSettings.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:40379", + "sslPort": 44356 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "weatherforecast", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "apiPlayground": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "weatherforecast", + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/apiPlayground/Startup.cs b/apiPlayground/Startup.cs new file mode 100644 index 0000000..6d9f559 --- /dev/null +++ b/apiPlayground/Startup.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace apiPlayground +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + using (var client = new DatabaseContext()) + { + client.Database.EnsureCreated(); + } + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddEntityFrameworkSqlite().AddDbContext<DatabaseContext>(); + services.AddControllers(); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseHttpsRedirection(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + } + } +} diff --git a/apiPlayground/WeatherForecast.cs b/apiPlayground/WeatherForecast.cs new file mode 100644 index 0000000..7641d9d --- /dev/null +++ b/apiPlayground/WeatherForecast.cs @@ -0,0 +1,15 @@ +using System; + +namespace apiPlayground +{ + public class WeatherForecast + { + public DateTime Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string Summary { get; set; } + } +} diff --git a/apiPlayground/apiPlayground.csproj b/apiPlayground/apiPlayground.csproj new file mode 100644 index 0000000..d10f61d --- /dev/null +++ b/apiPlayground/apiPlayground.csproj @@ -0,0 +1,16 @@ +<Project Sdk="Microsoft.NET.Sdk.Web"> + + <PropertyGroup> + <TargetFramework>netcoreapp3.1</TargetFramework> + </PropertyGroup> + + + <ItemGroup> + <None Remove="Microsoft.EntityFrameworkCore" /> + <None Remove="Microsoft.EntityFrameworkCore.Sqlite" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" /> + <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.7" /> + </ItemGroup> +</Project> diff --git a/apiPlayground/appsettings.Development.json b/apiPlayground/appsettings.Development.json new file mode 100644 index 0000000..c9294ca --- /dev/null +++ b/apiPlayground/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/apiPlayground/appsettings.json b/apiPlayground/appsettings.json new file mode 100644 index 0000000..93b64d3 --- /dev/null +++ b/apiPlayground/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +}
Properties/launchSettings.json ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. typings/ # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ build/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot wwwroot/ dist/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # DNX project.lock.json artifacts/ *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Microsoft Azure ApplicationInsights config file ApplicationInsights.config # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.pfx *.publishsettings node_modules/ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files *.mdf *.ldf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml #Others .DS_Store .vscode/
## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.tlog *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Nuget personal access tokens and Credentials nuget.config # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd # VS Code files for those working on multiple tools .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace # Local History for Visual Studio Code .history/ # Windows Installer files from build outputs *.cab *.msi *.msix *.msm *.msp # JetBrains Rider .idea/ *.sln.iml
## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.tlog *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Nuget personal access tokens and Credentials nuget.config # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd # VS Code files for those working on multiple tools .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace # Local History for Visual Studio Code .history/ # Windows Installer files from build outputs *.cab *.msi *.msix *.msm *.msp # JetBrains Rider .idea/ *.sln.iml
# Created by https://www.toptal.com/developers/gitignore/api/java,maven,bower,gradle,eclipse,java-web,intellij,code-java,intellij+iml,intellij+all,visualstudio,visualstudiocode,openframeworks+visualstudio,vuejs,node # Edit at https://www.toptal.com/developers/gitignore?templates=java,maven,bower,gradle,eclipse,java-web,intellij,code-java,intellij+iml,intellij+all,visualstudio,visualstudiocode,openframeworks+visualstudio,vuejs,node ### Bower ### bower_components .bower-cache .bower-registry .bower-tmp ### Code-Java ### # Language Support for Java(TM) by Red Hat extension for Visual Studio Code - https://marketplace.visualstudio.com/items?itemName=redhat.java .project .classpath factoryConfiguration.json ### Eclipse ### .metadata bin/ tmp/ *.tmp *.bak *.swp *~.nib local.properties .settings/ .loadpath .recommenders # External tool builders .externalToolBuilders/ # Locally stored "Eclipse launch configurations" *.launch # PyDev specific (Python IDE for Eclipse) *.pydevproject # CDT-specific (C/C++ Development Tooling) .cproject # CDT- autotools .autotools # Java annotation processor (APT) .factorypath # PDT-specific (PHP Development Tools) .buildpath # sbteclipse plugin .target # Tern plugin .tern-project # TeXlipse plugin .texlipse # STS (Spring Tool Suite) .springBeans # Code Recommenders .recommenders/ # Annotation Processing .apt_generated/ .apt_generated_test/ # Scala IDE specific (Scala & Java development for Eclipse) .cache-main .scala_dependencies .worksheet # Uncomment this line if you wish to ignore the project description file. # Typically, this file would be tracked if it contains build/dependency configurations: #.project ### Eclipse Patch ### # Spring Boot Tooling .sts4-cache/ ### Intellij ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/usage.statistics.xml .idea/**/dictionaries .idea/**/shelf # Generated files .idea/**/contentModel.xml # Sensitive or high-churn files .idea/**/dataSources/ .idea/**/dataSources.ids .idea/**/dataSources.local.xml .idea/**/sqlDataSources.xml .idea/**/dynamic.xml .idea/**/uiDesigner.xml .idea/**/dbnavigator.xml # Gradle .idea/**/gradle.xml .idea/**/libraries # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. # .idea/artifacts # .idea/compiler.xml # .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules # *.iml # *.ipr # CMake cmake-build-*/ # Mongo Explorer plugin .idea/**/mongoSettings.xml # File-based project format *.iws # IntelliJ out/ # mpeltonen/sbt-idea plugin .idea_modules/ # JIRA plugin atlassian-ide-plugin.xml # Cursive Clojure plugin .idea/replstate.xml # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties # Editor-based Rest Client .idea/httpRequests # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser ### Intellij Patch ### # Comment Reason: toptal/gitignore.io#186 (comment) # *.iml # modules.xml # .idea/misc.xml # *.ipr # Sonarlint plugin .idea/**/sonarlint/ # SonarQube Plugin .idea/**/sonarIssues.xml # Markdown Navigator plugin .idea/**/markdown-navigator.xml .idea/**/markdown-navigator-enh.xml .idea/**/markdown-navigator/ # Cache file creation bug # See https://youtrack.jetbrains.com/issue/JBR-2257 .idea/$CACHE_FILE$ ### Intellij+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff # Generated files # Sensitive or high-churn files # Gradle # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. # .idea/artifacts # .idea/compiler.xml # .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules # *.iml # *.ipr # CMake # Mongo Explorer plugin # File-based project format # IntelliJ # mpeltonen/sbt-idea plugin # JIRA plugin # Cursive Clojure plugin # Crashlytics plugin (for Android Studio and IntelliJ) # Editor-based Rest Client # Android studio 3.1+ serialized cache file ### Intellij+all Patch ### # Ignores the whole .idea folder and all .iml files # See toptal/gitignore.io#186 and toptal/gitignore.io#360 .idea/ # Reason: toptal/gitignore.io#186 (comment) *.iml modules.xml .idea/misc.xml *.ipr # Sonarlint plugin .idea/sonarlint ### Intellij+iml ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff # Generated files # Sensitive or high-churn files # Gradle # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. # .idea/artifacts # .idea/compiler.xml # .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules # *.iml # *.ipr # CMake # Mongo Explorer plugin # File-based project format # IntelliJ # mpeltonen/sbt-idea plugin # JIRA plugin # Cursive Clojure plugin # Crashlytics plugin (for Android Studio and IntelliJ) # Editor-based Rest Client # Android studio 3.1+ serialized cache file ### Intellij+iml Patch ### # Reason: toptal/gitignore.io#186 (comment) ### Java ### # Compiled class file *.class # Log file *.log # BlueJ files *.ctxt # Mobile Tools for Java (J2ME) .mtj.tmp/ # Package Files # *.jar *.war *.nar *.ear *.zip *.tar.gz *.rar # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* ### Java-Web ### ## ignoring target file target/ ### Maven ### pom.xml.tag pom.xml.releaseBackup pom.xml.versionsBackup pom.xml.next release.properties dependency-reduced-pom.xml buildNumber.properties .mvn/timing.properties # https://github.com/takari/maven-wrapper#usage-without-binary-jar .mvn/wrapper/maven-wrapper.jar ### Node ### # Logs logs npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env .env.test # parcel-bundler cache (https://parceljs.org/) .cache # Next.js build output .next # Nuxt.js build / generate output .nuxt dist # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and not Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # Stores VSCode versions used for testing VSCode extensions .vscode-test ### OpenFrameworks+VisualStudio ### # ignore generated binaries # but not the data folder /bin/* !/bin/data/ # general [Bb]uild/ [Oo]bj/ *.o [Dd]ebug*/ [Rr]elease*/ *.mode* *.app/ *.pyc .svn/ # IDE files which should # be ignored # XCode *.pbxuser *.perspective *.perspectivev3 *.mode1v3 *.mode2v3 # XCode 4 xcuserdata *.xcworkspace # Code::Blocks *.depend *.layout # Visual Studio *.sdf *.opensdf *.suo *.pdb *.ilk *.aps ipch/ # Eclipse .externalToolBuilders # operating system # Linux *~ # KDE .directory .AppleDouble # OSX .DS_Store # Thumbnails ._* # Windows # Image file caches Thumbs.db # Folder config file Desktop.ini # Android .csettings ### OpenFrameworks+VisualStudio Patch ### .vs/ *.ncb *.opendb *.cachefile *.VC.db *.VC.VC.opendb *.psess *.vsp *.vspx *.sap ### VisualStudioCode ### .vscode/* #!.vscode/settings.json #!.vscode/tasks.json #!.vscode/launch.json #!.vscode/extensions.json *.code-workspace ### VisualStudioCode Patch ### # Ignore all local history of files .history ### Vuejs ### # Recommended template: Node.gitignore dist/ npm-debug.log yarn-error.log ### Gradle ### .gradle build/ # Ignore Gradle GUI config gradle-app.setting # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) !gradle-wrapper.jar # Cache of project .gradletasknamecache # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 # gradle/wrapper/gradle-wrapper.properties ### Gradle Patch ### **/build/ ### VisualStudio ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.meta *.obj *.iobj *.pch *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp_proj *_wpftmp.csproj *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files # Visual Studio profiler # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*[.json, .xml, .info] # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # End of https://www.toptal.com/developers/gitignore/api/java,maven,bower,gradle,eclipse,java-web,intellij,code-java,intellij+iml,intellij+all,visualstudio,visualstudiocode,openframeworks+visualstudio,vuejs,node .bloop/** .metals cache .vscode *.h2.db
## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # DNX project.lock.json project.fragment.lock.json artifacts/ *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted #*.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings node_modules/ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files *.mdf *.ldf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml # CodeRush .cr/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc
*.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.tlog *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio 6 auto-generated project file (contains which files were open etc.) *.vbp # Visual Studio 6 workspace and project file (working project files containing files to include in project) *.dsw *.dsp # Visual Studio 6 technical files *.ncb *.aps # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # Visual Studio History (VSHistory) files .vshistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd # VS Code files for those working on multiple tools .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace # Local History for Visual Studio Code .history/ # Windows Installer files from build outputs *.cab *.msi *.msix *.msm *.msp # JetBrains Rider *.sln.iml
### Csharp ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*[.json, .xml, .info] # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/
## файлы, созданные популярными дополнениями Visual Studio. ## ## Получить последнюю версию от https://github.com/github/gitignore/blob/main/VisualStudio.gitignore # Файлы, зависящие от пользователя *.rsuser *.suo *.user *.userosscache *.sln.docstates # Пользовательские файлы (MonoDevelop / Xamarin Studio) *.пользовательские настройки # Автоматически генерируемые файлы Mono mono_crash.* # Результаты сборки [Dd] ошибка/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Мм]/ [Aa][Rr][Mm]64/ блд/ [Bb] в/ [Oo]bj/ [Ll]og/ [Ll] ogs/ # Visual Studio 2015/2017 каталог кэша / параметров .vs/ # Раскомментируйте, если у вас есть задачи, которые создают статические файлы проекта в wwwroot #wwwroot/ # Автоматически генерируемые файлы Visual Studio 2017 Файлы\ Сгенерированные/ # MSTest результаты тестирования [Tt] есть [Rr] результат */ [Bb] uild[Ll] og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Результаты сборки проекта ATL [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Результаты тестирования Бенчмаркдотнет.Артефакты/ # .NET Core project.lock.json project.fragment.lock.json артефакты/ # ASP.NET Строительные леса ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Файлы, созданные Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.tlog *.vspscc *.vssscc .сборки *.pidb *.svclog *.scc # Тестовые файлы Chutzpah _Chutzpah* # Файлы кэша Visual C ++ ipch/ *.точки доступа *.ncb *.opendb *.opensdf *.sdf *.файл кэша *.VC.db *.VC.VC.opendb # Профилировщик Visual Studio *.psess *.vsp *.vspx *.sap # Файлы трассировки Visual Studio *.e2e # Локальное рабочее пространство TFS 2012 $ tf/ # Инструментарий автоматизации руководства *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Выходная папка Installshield [Ee]xpress/ # DocProject - это надстройка генератора документации DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Справка/html # Каталог с одним щелчком мыши опубликовать/ # Опубликовать веб-вывод .*[Pp]ublish.xml *.azurePubxml # Примечание: прокомментируйте следующую строку, если вы хотите проверить настройки веб-развертывания, # но строки подключения к базе данных (с потенциальными паролями) будут незашифрованными *.pubxml *.publishproj # Веб-приложение Microsoft Azure публикует настройки. Прокомментируйте следующую строку, если хотите # проверка настроек публикации веб-приложения Azure, но конфиденциальная информация, содержащаяся # в этих сценариях будут незашифрованы Публиковать скрипты/ # Пакеты NuGet *.nupkg # Пакеты символов NuGet *.snupkg # Папка пакетов может быть проигнорирована из-за восстановления пакета **/[Pp]учетные записи /* # кроме build/, который используется в качестве целевого объекта MSBuild. **!/[Pp]ackages/build/ # Раскомментируйте, если необходимо, однако, как правило, он будет восстановлен при необходимости #!**/[Pp]учетные записи/репозитории.config Файлы project.json # NuGet v3 создают больше игнорируемых файлов *.nuget.props *.nuget.targets # Вывод сборки Microsoft Azure csx/ *.build.csdef # Эмулятор Microsoft Azure ecf/ rcf/ # Каталоги и файлы пакетов приложений магазина Windows Пакеты приложений/ BundleArtifacts/ Пакет.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Файлы кэша Visual Studio # файлы, заканчивающиеся на .cache, могут быть проигнорированы .*[Cc] боль # но следите за каталогами, заканчивающимися на .cache .?*![Cc]боль/ # Другие Клиентская база/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Включение файлов со строгими именами может представлять угрозу безопасности # (github/gitignore#2483 (comment) ) #*.snk # Поскольку существует несколько рабочих процессов, раскомментируйте следующую строку, чтобы игнорировать bower_components # (github/gitignore#1529 (comment) ) #bower_компоненты/ # RIA/Проекты Silverlight Сгенерированный код/ # Резервное копирование и создание отчетов о файлах в результате преобразования старого файла проекта # к более новой версии Visual Studio. Файлы резервных копий не нужны, # потому что у нас есть git ;-) _ улучшение_порт_файлов/ * Резервное копирование/ Список обновлений *.XML Список обновлений *.htm ServiceFabricBackup/ *.rptproj.bak # Файлы SQL Server *.mdf *.ldf *.ndf # Проекты бизнес-аналитики *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser -* [Bb]ackup.rdl -* [Bb] ackup ([0-9]).rdl -* [Bb] ackup ([0-9][0-9]).rdl # Подделки Microsoft Поддельные сборки/ # Файл настроек плагина GhostDoc *.GhostDoc.xml # Node.js Инструменты для Visual Studio .ntvs_analysis.dat node_modules/ # Журнал сборки Visual Studio 6 *.plg # Файл параметров рабочей области Visual Studio 6 *.opt # Автоматически сгенерированный файл рабочей области Visual Studio 6 (содержит, какие файлы были открыты и т.д.) *.vbw # Автоматически сгенерированный файл проекта Visual Studio 6 (содержит, какие файлы были открыты и т.д.) *.vbp # Рабочая область Visual Studio 6 и файл проекта (рабочие файлы проекта, содержащие файлы для включения в проект) *.dsw *.dsp # Технические файлы Visual Studio 6 *.ncb *.точки доступа # Visual Studio LightSwitch вывод сборки **/*.HTMLClient/Созданные статьи **/*.DesktopClient/Созданные статьи **/*.DesktopClient/ModelManifest.xml **/*.Server/Созданные статьи **/*.Server/ModelManifest.xml _Pvt_Extensions # Пакетный менеджер зависимостей .paket/paket.exe пакет-файлы/ # ПОДДЕЛЬНЫЙ - F# Сделать .подделка/ # Личные настройки CodeRush .cr/личный # Инструменты Python для Visual Studio (PTVS) __pycache__/ *.pyc # Cake - раскомментируйте, если вы его используете # инструменты/** # !tools/packages.config # Студия вкладок *.tss # Конфигурационный файл JustMock от Telerik *.jmconfig # Вывод сборки BizTalk *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # Результаты анализа пользовательского интерфейса OpenCover Открыть обложку/ # Вывод локального запуска Azure Stream Analytics ASALocalRun/ # Двоичный и структурированный журнал MSBuild *.binlog # Файл конфигурации отладчика графического процессора NVidia Nsight *.nvuser # Рабочая папка MFractors (инструмент повышения производительности Xamarin) .mfractor/ # Локальная история для Visual Studio .локальная история/ # История файлов Visual Studio (VSHistory) .история/ # Проверка работоспособности временной базы данных BeatPulse healthchecksdb # Папка резервного копирования для инструмента преобразования ссылок на пакеты в Visual Studio 2017 Резервное копирование миграции/ # Рабочая папка Ionide (кроссплатформенный F # VS Code tools) .ионид/ # Fody - автоматически сгенерированная XML-схема FodyWeavers.xsd # Файлы VS Code для тех, кто работает с несколькими инструментами .vscode/* .vscode!/settings.json .vscode!/tasks.json .vscode!/launch.json .vscode!/extensions.json *.code-рабочее пространство # Локальная история для кода Visual Studio .история/ # Файлы установщика Windows из выходных данных сборки *.cab *.msi *.msix * .msm * .msp # Гонщик JetBrains *.sln.im
…## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Jetbrains Resharper/Rider # Common IntelliJ Platform excludes # User specific **/.idea/ # Sensitive or high-churn files **/.idea/**/dataSources/ **/.idea/**/dataSources.ids **/.idea/**/dataSources.xml **/.idea/**/dataSources.local.xml **/.idea/**/sqlDataSources.xml **/.idea/**/dynamic.xml # Rider # Rider auto-generates .iml files, and contentModel.xml **/.idea/**/*.iml **/.idea/**/contentModel.xml **/.idea/**/modules.xml *.suo *.user .vs/ [Bb]in/ [Oo]bj/ _UpgradeReport_Files/ [Pp]ackages/ Thumbs.db Desktop.ini .DS_Store # Visual Studio Code .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace # Local History for Visual Studio Code .history/ # Misc .editorconfig TownOfUs.sln
*.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.tlog *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace / # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio 6 auto-generated project file (contains which files were open etc.) *.vbp # Visual Studio 6 workspace and project file (working project files containing files to include in project) *.dsw *.dsp # Visual Studio 6 technical files *.ncb *.aps # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # Visual Studio History (VSHistory) files .vshistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd # VS Code files for those working on multiple tools .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace # Local History for Visual Studio Code .history/ # Windows Installer files from build outputs *.cab *.msi *.msix *.msm *.msp # JetBrains Rider *.sln.iml
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..011c188 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,14 @@ +# [Choice] .NET version: 6.0, 3.1, 6.0-bullseye, 3.1-bullseye, 6.0-focal, 3.1-focal +ARG VARIANT="6.0" +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} + +# [Choice] Node.js version: none, lts/*, 18, 16, 14 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends <your-package-list-here> + +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..7dff597 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,47 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/dotnet-postgres +{ + "name": "C# (.NET) and PostgreSQL (Community)", + "dockerComposeFile": "docker-compose.yml", + "service": "app", + "workspaceFolder": "/workspace", + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-dotnettools.csharp" + ] + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [5000, 5001], + + // [Optional] To reuse of your local HTTPS dev cert: + // + // 1. Export it locally using this command: + // * Windows PowerShell: + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" + // * macOS/Linux terminal: + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" + // + // 2. Uncomment these 'remoteEnv' lines: + // "remoteEnv": { + // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", + // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", + // }, + // + // 3. Next, copy your certificate into the container: + // 1. Start the container + // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer + // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "dotnet --info", + + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..685bc06 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,43 @@ +version: '3' + +services: + app: + build: + context: . + dockerfile: Dockerfile + args: + # Update 'VARIANT' to pick a version of .NET: 3.1, 6.0 + VARIANT: "6.0" + # Optional version of Node.js + NODE_VERSION: "lts/*" + + volumes: + - ..:/workspace:cached + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity + + # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. + network_mode: service:db + + # Uncomment the next line to use a non-root user for all processes. + # user: vscode + + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + + db: + image: postgres:14.3 + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + POSTGRES_DB: postgres + + # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + +volumes: + postgres-data: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a72f3dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,454 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (github/gitignore#2483 (comment)) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (github/gitignore#1529 (comment)) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json diff --git a/Test/Program.cs b/Test/Program.cs new file mode 100644 index 0000000..83fa4f4 --- /dev/null +++ b/Test/Program.cs @@ -0,0 +1,2 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); diff --git a/Test/Test.csproj b/Test/Test.csproj new file mode 100644 index 0000000..40c60dd --- /dev/null +++ b/Test/Test.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net6.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project>
# Created by .ignore support plugin (hsz.mobi) ### VisualStudio template ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # DNX project.lock.json project.fragment.lock.json artifacts/ *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.pfx *.publishsettings node_modules/ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files *.mdf *.ldf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml ### VisualStudioCode template .vscode
## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (github/gitignore#2483 (comment)) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (github/gitignore#1529 (comment)) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- Backup*.rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # JetBrains Rider .idea/ *.sln.iml # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb
Signed-off-by: Matheus Castello <matheus@castello.eng.br> diff --git a/dotnetUno5/.editorconfig b/dotnetUno5/.editorconfig new file mode 100644 index 0000000..87d5412 --- /dev/null +++ b/dotnetUno5/.editorconfig @@ -0,0 +1,167 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +# This file is the top-most EditorConfig file +root = true + +########################################## +# Common Settings +########################################## + +[*] +indent_style = space +end_of_line = crlf +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 + +########################################## +# File Extension Settings +########################################## + +[*.{yml,yaml}] +indent_size = 2 + +[.vsconfig] +indent_size = 2 +end_of_line = lf + +[*.sln] +indent_style = tab +indent_size = 2 + +[*.{csproj,proj,projitems,shproj}] +indent_size = 2 + +[*.{json,slnf}] +indent_size = 2 +end_of_line = lf + +[*.{props,targets}] +indent_size = 2 + +[*.xaml] +indent_size = 2 +charset = utf-8-bom + +[*.xml] +indent_size = 2 +end_of_line = lf + +[*.plist] +indent_size = 2 +indent_style = tab +end_of_line = lf + +[*.manifest] +indent_size = 2 + +[*.appxmanifest] +indent_size = 2 + +[*.{json,css,webmanifest}] +indent_size = 2 +end_of_line = lf + +[web.config] +indent_size = 2 +end_of_line = lf + +[*.sh] +indent_size = 2 +end_of_line = lf + +[*.cs] +# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099 +end_of_line = unset + +# See https://github.com/dotnet/roslyn/issues/20356#issuecomment-310143926 +trim_trailing_whitespace = false + +tab_width = 4 +indent_size = 4 + +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true + +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion + +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = file_scoped:warning +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent diff --git a/dotnetUno5/.gitignore b/dotnetUno5/.gitignore new file mode 100644 index 0000000..c6ef85f --- /dev/null +++ b/dotnetUno5/.gitignore @@ -0,0 +1,403 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# Single Target Config +solution-config.props +# Windows Publish Profiles +!**/*.Windows/Properties/PublishProfiles/*.pubxml \ No newline at end of file diff --git a/dotnetUno5/.vscode/extensions.json b/dotnetUno5/.vscode/extensions.json new file mode 100644 index 0000000..1048536 --- /dev/null +++ b/dotnetUno5/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "ms-dotnettools.csharp", + "unoplatform.vscode" + ] +} diff --git a/dotnetUno5/.vscode/launch.json b/dotnetUno5/.vscode/launch.json new file mode 100644 index 0000000..5692d7d --- /dev/null +++ b/dotnetUno5/.vscode/launch.json @@ -0,0 +1,62 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": "Debug Local", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build-skia-gtk", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/__change__.Skia.Gtk/bin/Debug/net8.0/__change__.Skia.Gtk.dll", + "args": [], + "env": { + "DOTNET_MODIFIABLE_ASSEMBLIES": "debug" + }, + "cwd": "${workspaceFolder}/__change__.Skia.Gtk", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": "Torizon ARMv8", + "type": "coreclr", + "request": "launch", + "program": "~/app/__change__.Skia.Gtk", + "cwd": "~/app/", + "stopAtEntry": false, + "console": "internalConsole", + "env": { + "DOTNET_MODIFIABLE_ASSEMBLIES": "debug", + //"GDK_BACKEND": "x11", + //"GDK_GL": "gles", + "UNO_FULLSCREEN": "true" + }, + "args": [], + "pipeTransport": { + "pipeCwd": "${workspaceFolder}", + "pipeProgram": "ssh", + "pipeArgs": [ + "-T", + "-q", + "-p", + "${config:torizon_debug_ssh_port}", + "-i", + "${workspaceFolder}/.conf/id_rsa", // ssh key path + "-o", + "StrictHostKeyChecking=no", + "-o", + "UserKnownHostsFile /dev/null", + "${config:torizon_run_as}@${config:torizon_ip}" // user@device + ], + "debuggerPath": "/vsdbg/vsdbg" + }, + "preLaunchTask": "deploy-torizon-arm64" + } + ] +} diff --git a/dotnetUno5/.vscode/settings.json b/dotnetUno5/.vscode/settings.json new file mode 100644 index 0000000..9ae726b --- /dev/null +++ b/dotnetUno5/.vscode/settings.json @@ -0,0 +1,25 @@ +{ + "torizon_psswd": "", + "torizon_login": "", + "torizon_ip": "", + "host_ip": "", + "torizon_workspace": "${workspaceFolder}", + "torizon_debug_port": "", + "torizon_debug_ssh_port": "2225", + "torizon_debug_port2": "", + "torizon_debug_port3": "", + "torizon_gpu": "", + "torizon_arch": "", + "wait_sync": "1", + "torizon_run_as": "torizon", + "torizon_app_root": "/home/torizon", + "tcb.packageName": "__change__", + "tcb.version": "3.8.1", + "omnisharp.useModernNet": true, + "dotnet.server.useOmnisharp": true, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.expand": false, + "explorer.fileNesting.patterns": { + "*.xaml": "$(capture).xaml.cs" + } +} diff --git a/dotnetUno5/.vscode/tasks.json b/dotnetUno5/.vscode/tasks.json new file mode 100644 index 0000000..2175909 --- /dev/null +++ b/dotnetUno5/.vscode/tasks.json @@ -0,0 +1,95 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build-skia-gtk", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/__change__.Skia.Gtk/__change__.Skia.Gtk.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish-skia-gtk", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/__change__.Skia.Gtk/__change__.Skia.Gtk.csproj", + "-c", "Debug", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish-torizon-arm64", + "detail": "", + "hide": true, + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "-c", + "Debug", + "${workspaceFolder}/__change__.Skia.Gtk/__change__.Skia.Gtk.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary", + "-c", "Debug", + "-r", + "linux-arm64", + "--no-self-contained" + ], + "dependsOrder": "sequence", + "problemMatcher": "$msCompile", + "icon": { + "id": "flame", + "color": "terminal.ansiYellow" + } + }, + { + "label": "deploy-torizon-arm64", + "detail": "", + "hide": true, + "command": "scp", + "type": "process", + "args": [ + "-i", + "${workspaceFolder}/.conf/id_rsa", + "-o", + "UserKnownHostsFile=/dev/null", + "-o", + "StrictHostKeyChecking=no", + "-P", + "${config:torizon_debug_ssh_port}", + "-pr", + "${workspaceFolder}/__change__.Skia.Gtk/bin/Debug/net6.0/linux-arm64/publish", + "${config:torizon_run_as}@${config:torizon_ip}:~/app" + ], + "dependsOn": [ + "validate-settings", + "validate-arch-arm64", + "apply-torizon-packages", + "copy-docker-compose", + "pre-cleanup", + "publish-torizon-arm64", + "build-container-torizon-debug-arm64", + "push-container-torizon-debug-arm64", + "pull-container-torizon-debug-arm64", + "run-container-torizon-debug-arm64", + "wait-a-bit", + "pos-cleanup" + ], + "dependsOrder": "sequence", + "problemMatcher": "$msCompile", + "icon": { + "id": "flame", + "color": "terminal.ansiYellow" + } + }, + ] +} diff --git a/dotnetUno5/.vsconfig b/dotnetUno5/.vsconfig new file mode 100644 index 0000000..63efb85 --- /dev/null +++ b/dotnetUno5/.vsconfig @@ -0,0 +1,19 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Component.CoreEditor", + "Microsoft.VisualStudio.Workload.CoreEditor", + "Microsoft.NetCore.Component.SDK", + "Microsoft.NetCore.Component.DevelopmentTools", + "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", + "Microsoft.VisualStudio.Component.TextTemplating", + "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", + "Microsoft.VisualStudio.Component.Debugger.JustInTime", + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Microsoft.Component.NetFX.Native", + "Microsoft.VisualStudio.Component.Graphics", + "Microsoft.VisualStudio.Component.Merq", + "Microsoft.VisualStudio.Workload.NetCrossPlat", + "Microsoft.VisualStudio.Workload.NetCoreTools" + ] +} diff --git a/dotnetUno5/Directory.Build.props b/dotnetUno5/Directory.Build.props new file mode 100644 index 0000000..d11886d --- /dev/null +++ b/dotnetUno5/Directory.Build.props @@ -0,0 +1,86 @@ +<Project> + <PropertyGroup> + <DotNetVersion>net8.0</DotNetVersion> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + + <DebugType>portable</DebugType> + <DebugSymbols>True</DebugSymbols> + + <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> + + <!-- + Adding NoWarn to remove build warnings + NU1507: Warning when there are multiple package sources when using CPM with no source mapping + NETSDK1201: Warning that specifying RID won't create self containing app + PRI257: Ignore default language (en) not being one of the included resources (eg en-us, en-uk) + --> + <NoWarn>$(NoWarn);NU1507;NETSDK1201;PRI257</NoWarn> + + <DefaultLanguage>en</DefaultLanguage> + + <IsAndroid>false</IsAndroid> + <IsIOS>false</IsIOS> + <IsMac>false</IsMac> + <IsMacCatalyst>false</IsMacCatalyst> + <IsWinAppSdk>false</IsWinAppSdk> + + <!-- Required for Hot Reload (See https://github.com/dotnet/sdk/issues/36666) --> + <IncludeSourceRevisionInInformationalVersion Condition="'$(Configuration)'=='Debug'">false</IncludeSourceRevisionInInformationalVersion> + </PropertyGroup> + + <Choose> + <When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'"> + <PropertyGroup> + <IsAndroid>true</IsAndroid> + <SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion> + </PropertyGroup> + </When> + <When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'"> + <PropertyGroup> + <IsIOS>true</IsIOS> + <SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion> + </PropertyGroup> + + <!-- + Eagerly define capabilities for iOS to avoid VS 2022 to ask for + project reload, and ninitialize the debugger toolbar faster. + See https://github.com/unoplatform/uno/issues/14303. + --> + <ItemGroup> + <ProjectCapability Include="XamarinStaticLaunchProfiles" /> + <ProjectCapability Include="Maui" /> + <ProjectCapability Include="MauiCore" /> + </ItemGroup> + </When> + <When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'"> + <PropertyGroup> + <IsMac>true</IsMac> + <SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion> + </PropertyGroup> + </When> + <When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'"> + <PropertyGroup> + <IsMacCatalyst>true</IsMacCatalyst> + <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion> + </PropertyGroup> + </When> + <When Condition="$(TargetFramework.Contains('windows10'))"> + <PropertyGroup> + <IsWinAppSdk>true</IsWinAppSdk> + <SupportedOSPlatformVersion>10.0.18362.0</SupportedOSPlatformVersion> + <TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion> + <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers> + <EnableCoreMrtTooling Condition=" '$(BuildingInsideVisualStudio)' != 'true' ">false</EnableCoreMrtTooling> + </PropertyGroup> + </When> + </Choose> + + <!-- + If working on a single target framework, copy solution-config.props.sample to solution-config.props + and uncomment the appropriate lines in solution-config.props to build for the desired platforms only. + + https://platform.uno/docs/articles/guides/solution-building-single-targetframework.html + --> + <Import Project="solution-config.props" Condition="exists('solution-config.props')" /> +</Project> diff --git a/dotnetUno5/Directory.Build.targets b/dotnetUno5/Directory.Build.targets new file mode 100644 index 0000000..8eb5584 --- /dev/null +++ b/dotnetUno5/Directory.Build.targets @@ -0,0 +1,6 @@ +<Project> + <ItemGroup> + <!-- Removes native usings to avoid Ambiguous reference --> + <Using Remove="@(Using->HasMetadata('Platform'))" /> + </ItemGroup> +</Project> diff --git a/dotnetUno5/Directory.Packages.props b/dotnetUno5/Directory.Packages.props new file mode 100644 index 0000000..09e1d8b --- /dev/null +++ b/dotnetUno5/Directory.Packages.props @@ -0,0 +1,46 @@ +<Project ToolsVersion="15.0"> + <ItemGroup> + <PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" /> + <PackageVersion Include="coverlet.collector" Version="6.0.0" /> + <PackageVersion Include="FluentAssertions" Version="6.12.0" /> + <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" /> + <PackageVersion Include="NUnit" Version="3.13.3" /> + <PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" /> + <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> + <PackageVersion Include="Serilog.AspNetCore" Version="7.0.0" /> + <PackageVersion Include="SkiaSharp.Skottie" Version="2.88.6" /> + <PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.6" /> + <PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" /> + <PackageVersion Include="Uno.Extensions.Configuration" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Hosting" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Hosting.WinUI" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Http" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Http.WinUI" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Http.Refit" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Localization" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Localization.WinUI" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Logging.Serilog" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Logging.WinUI" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Navigation" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Navigation.WinUI" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Reactive" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Reactive.WinUI" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Serialization" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Serialization.Http" Version="3.0.11" /> + <PackageVersion Include="Uno.Extensions.Serialization.Refit" Version="3.0.11" /> + <PackageVersion Include="Uno.Material.WinUI" Version="4.0.6" /> + <PackageVersion Include="Uno.Dsp.Tasks" Version="1.2.7" /> + <PackageVersion Include="Uno.Toolkit.WinUI" Version="5.0.17" /> + <PackageVersion Include="Uno.Toolkit.WinUI.Material" Version="5.0.17" /> + <PackageVersion Include="Uno.Resizetizer" Version="1.2.0" /> + <PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.48" /> + <PackageVersion Include="Uno.UniversalImageLoader" Version="1.9.36" /> + <PackageVersion Include="Uno.WinUI" Version="5.0.48" /> + <PackageVersion Include="Uno.WinUI.Lottie" Version="5.0.48" /> + <PackageVersion Include="Uno.WinUI.DevServer" Version="5.0.48" /> + <PackageVersion Include="Uno.WinUI.Skia.Gtk" Version="5.0.48" /> + <PackageVersion Include="Uno.UITest.Helpers" Version="1.1.0-dev.70" /> + <PackageVersion Include="Xamarin.UITest" Version="4.3.0" /> + </ItemGroup> +</Project> diff --git a/dotnetUno5/__change__.DataContracts/Serialization/WeatherForecastContext.cs b/dotnetUno5/__change__.DataContracts/Serialization/WeatherForecastContext.cs new file mode 100644 index 0000000..ae6b029 --- /dev/null +++ b/dotnetUno5/__change__.DataContracts/Serialization/WeatherForecastContext.cs @@ -0,0 +1,24 @@ +using System.Collections.Immutable; +using System.Text.Json.Serialization; + +namespace __change__.DataContracts.Serialization; + +/// <summary> +/// Generated class for System.Text.Json Serialization +/// </summary> +/// <remarks> +/// When using the JsonSerializerContext you must add the JsonSerializableAttribute +/// for each type that you may need to serialize / deserialize including both the +/// concrete type and any interface that the concrete type implements. +/// For more information on the JsonSerializerContext see: +/// https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation?WT.mc_id=DT-MVP-5002924 +/// </remarks> +[JsonSerializable(typeof(WeatherForecast))] +[JsonSerializable(typeof(WeatherForecast[]))] +[JsonSerializable(typeof(IEnumerable<WeatherForecast>))] +[JsonSerializable(typeof(IImmutableList<WeatherForecast>))] +[JsonSerializable(typeof(ImmutableList<WeatherForecast>))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] +public partial class WeatherForecastContext : JsonSerializerContext +{ +} diff --git a/dotnetUno5/__change__.DataContracts/WeatherForecast.cs b/dotnetUno5/__change__.DataContracts/WeatherForecast.cs new file mode 100644 index 0000000..9a484f6 --- /dev/null +++ b/dotnetUno5/__change__.DataContracts/WeatherForecast.cs @@ -0,0 +1,15 @@ +namespace __change__.DataContracts; + +/// <summary> +/// A Weather Forecast for a specific date +/// </summary> +/// <param name="Date">Gets the Date of the Forecast.</param> +/// <param name="TemperatureC">Gets the Forecast Temperature in Celsius.</param> +/// <param name="Summary">Get a description of how the weather will feel.</param> +public record WeatherForecast(DateOnly Date, double TemperatureC, string? Summary) +{ + /// <summary> + /// Gets the Forecast Temperature in Fahrenheit + /// </summary> + public double TemperatureF => 32 + (TemperatureC * 9 / 5); +} diff --git a/dotnetUno5/__change__.DataContracts/__change__.DataContracts.csproj b/dotnetUno5/__change__.DataContracts/__change__.DataContracts.csproj new file mode 100644 index 0000000..e39c72b --- /dev/null +++ b/dotnetUno5/__change__.DataContracts/__change__.DataContracts.csproj @@ -0,0 +1,6 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <TargetFramework>$(DotNetVersion)</TargetFramework> + <GenerateDocumentationFile>true</GenerateDocumentationFile> + </PropertyGroup> +</Project> diff --git a/dotnetUno5/__change__.Shared/AppHead.xaml b/dotnetUno5/__change__.Shared/AppHead.xaml new file mode 100644 index 0000000..bfd96b2 --- /dev/null +++ b/dotnetUno5/__change__.Shared/AppHead.xaml @@ -0,0 +1,17 @@ +<local:App x:Class="__change__.AppHead" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:wasm="http://platform.uno/wasm" + xmlns:local="using:__change__" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + mc:Ignorable="wasm"> + + <local:App.Resources> + <ResourceDictionary> + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="ms-appx:///__change__/AppResources.xaml" /> + </ResourceDictionary.MergedDictionaries> + </ResourceDictionary> + </local:App.Resources> + +</local:App> diff --git a/dotnetUno5/__change__.Shared/AppHead.xaml.cs b/dotnetUno5/__change__.Shared/AppHead.xaml.cs new file mode 100644 index 0000000..4b61ac4 --- /dev/null +++ b/dotnetUno5/__change__.Shared/AppHead.xaml.cs @@ -0,0 +1,28 @@ +using Microsoft.UI.Xaml; +using Uno.Resizetizer; + +namespace __change__; + +public sealed partial class AppHead : App +{ + /// <summary> + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// </summary> + public AppHead() + { + this.InitializeComponent(); + } + + /// <summary> + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// </summary> + /// <param name="args">Details about the launch request and process.</param> + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + base.OnLaunched(args); + + MainWindow.SetWindowIcon(); + } +} diff --git a/dotnetUno5/__change__.Shared/Icons/icon.svg b/dotnetUno5/__change__.Shared/Icons/icon.svg new file mode 100644 index 0000000..5899d75 --- /dev/null +++ b/dotnetUno5/__change__.Shared/Icons/icon.svg @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + width="456" + height="456" + viewBox="0 0 456 456" + version="1.1" + id="svg453" + sodipodi:docname="icon.svg" + inkscape:version="1.2 (dc2aedaf03, 2022-05-15)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs457" /> + <sodipodi:namedview + id="namedview455" + pagecolor="#ffffff" + bordercolor="#000000" + borderopacity="0.25" + inkscape:showpageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + showgrid="false" + inkscape:zoom="1.8574561" + inkscape:cx="228.26919" + inkscape:cy="228.26919" + inkscape:window-width="1920" + inkscape:window-height="1027" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg453" /> + <rect + x="0" + y="0" + width="456" + height="456" + fill="#FFFFFF" + id="rect451" /> +</svg> diff --git a/dotnetUno5/__change__.Shared/Icons/icon_foreground.svg b/dotnetUno5/__change__.Shared/Icons/icon_foreground.svg new file mode 100644 index 0000000..e45dbd9 --- /dev/null +++ b/dotnetUno5/__change__.Shared/Icons/icon_foreground.svg @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + width="450" + height="450" + viewBox="0 0 50.369617 49.826836" + version="1.1" + id="svg151" + sodipodi:docname="icon_foreground.svg" + inkscape:version="1.2 (dc2aedaf03, 2022-05-15)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview153" + pagecolor="#ffffff" + bordercolor="#000000" + borderopacity="0.25" + inkscape:showpageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + showgrid="false" + inkscape:zoom="1.250876" + inkscape:cx="218.64677" + inkscape:cy="175.87674" + inkscape:window-width="1920" + inkscape:window-height="1027" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="g149" /> + <defs + id="defs105"> + <path + id="aj28a0fd1a" + d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" /> + <path + id="fdje57jgic" + d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" /> + <path + id="6bg72xwlze" + d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" /> + <path + id="eaqjnja8wg" + d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" /> + </defs> + <g + fill="none" + fill-rule="evenodd" + id="g149" + transform="translate(-2.9304427e-4,-1.6465461e-4)"> + <g + id="g147"> + <g + id="g145"> + <path + fill="#7a67f8" + d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261" + id="path107" /> + <path + fill="#f85977" + d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z" + id="path109" /> + <path + fill="#159bff" + d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88" + id="path111" /> + <path + fill="#67e5ad" + d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312" + id="path113" /> + <g + transform="translate(21.154,18.577)" + id="g120"> + <mask + id="8jptpqrneb" + fill="#ffffff"> + <use + xlink:href="#aj28a0fd1a" + id="use115" /> + </mask> + <path + d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z" + mask="url(#8jptpqrneb)" + id="path118" /> + </g> + <g + transform="translate(27.404,20.981)" + id="g127"> + <mask + id="b2iljpfwbd" + fill="#ffffff"> + <use + xlink:href="#fdje57jgic" + id="use122" /> + </mask> + <path + d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" + mask="url(#b2iljpfwbd)" + id="path125" /> + </g> + <g + transform="translate(18.99,24.587)" + id="g134"> + <mask + id="gj70tyfpnf" + fill="#ffffff"> + <use + xlink:href="#6bg72xwlze" + id="use129" /> + </mask> + <path + d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z" + mask="url(#gj70tyfpnf)" + id="path132" /> + </g> + <g + transform="translate(25.24,26.99)" + id="g141"> + <mask + id="z7vhvduckh" + fill="#ffffff"> + <use + xlink:href="#eaqjnja8wg" + id="use136" /> + </mask> + <path + d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z" + mask="url(#z7vhvduckh)" + id="path139" /> + </g> + </g> + </g> + </g> +</svg> diff --git a/dotnetUno5/__change__.Shared/Splash/splash_screen.svg b/dotnetUno5/__change__.Shared/Splash/splash_screen.svg new file mode 100644 index 0000000..e45dbd9 --- /dev/null +++ b/dotnetUno5/__change__.Shared/Splash/splash_screen.svg @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + width="450" + height="450" + viewBox="0 0 50.369617 49.826836" + version="1.1" + id="svg151" + sodipodi:docname="icon_foreground.svg" + inkscape:version="1.2 (dc2aedaf03, 2022-05-15)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview153" + pagecolor="#ffffff" + bordercolor="#000000" + borderopacity="0.25" + inkscape:showpageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + showgrid="false" + inkscape:zoom="1.250876" + inkscape:cx="218.64677" + inkscape:cy="175.87674" + inkscape:window-width="1920" + inkscape:window-height="1027" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="g149" /> + <defs + id="defs105"> + <path + id="aj28a0fd1a" + d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" /> + <path + id="fdje57jgic" + d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" /> + <path + id="6bg72xwlze" + d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" /> + <path + id="eaqjnja8wg" + d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" /> + </defs> + <g + fill="none" + fill-rule="evenodd" + id="g149" + transform="translate(-2.9304427e-4,-1.6465461e-4)"> + <g + id="g147"> + <g + id="g145"> + <path + fill="#7a67f8" + d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261" + id="path107" /> + <path + fill="#f85977" + d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z" + id="path109" /> + <path + fill="#159bff" + d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88" + id="path111" /> + <path + fill="#67e5ad" + d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312" + id="path113" /> + <g + transform="translate(21.154,18.577)" + id="g120"> + <mask + id="8jptpqrneb" + fill="#ffffff"> + <use + xlink:href="#aj28a0fd1a" + id="use115" /> + </mask> + <path + d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z" + mask="url(#8jptpqrneb)" + id="path118" /> + </g> + <g + transform="translate(27.404,20.981)" + id="g127"> + <mask + id="b2iljpfwbd" + fill="#ffffff"> + <use + xlink:href="#fdje57jgic" + id="use122" /> + </mask> + <path + d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" + mask="url(#b2iljpfwbd)" + id="path125" /> + </g> + <g + transform="translate(18.99,24.587)" + id="g134"> + <mask + id="gj70tyfpnf" + fill="#ffffff"> + <use + xlink:href="#6bg72xwlze" + id="use129" /> + </mask> + <path + d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z" + mask="url(#gj70tyfpnf)" + id="path132" /> + </g> + <g + transform="translate(25.24,26.99)" + id="g141"> + <mask + id="z7vhvduckh" + fill="#ffffff"> + <use + xlink:href="#eaqjnja8wg" + id="use136" /> + </mask> + <path + d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z" + mask="url(#z7vhvduckh)" + id="path139" /> + </g> + </g> + </g> + </g> +</svg> diff --git a/dotnetUno5/__change__.Shared/__change__.Shared.csproj b/dotnetUno5/__change__.Shared/__change__.Shared.csproj new file mode 100644 index 0000000..65e5451 --- /dev/null +++ b/dotnetUno5/__change__.Shared/__change__.Shared.csproj @@ -0,0 +1,12 @@ +<Project Sdk="Microsoft.Build.NoTargets/3.7.0"> + <PropertyGroup> + <!-- NOTE: The TargetFramework is required by MSBuild but not used as this project is not built. --> + <TargetFramework>$(DotNetVersion)</TargetFramework> + <EnableDefaultItems>false</EnableDefaultItems> + </PropertyGroup> + + <ItemGroup> + <None Include="**\*" Exclude="obj\**;bin\**;*.csproj" /> + <None Update="AppHead.xaml.cs" DependentUpon="AppHead.xaml" /> + </ItemGroup> +</Project> diff --git a/dotnetUno5/__change__.Shared/base.props b/dotnetUno5/__change__.Shared/base.props new file mode 100644 index 0000000..d27f017 --- /dev/null +++ b/dotnetUno5/__change__.Shared/base.props @@ -0,0 +1,30 @@ +<Project> + <ItemGroup> + <PackageReference Include="Uno.Resizetizer" /> + </ItemGroup> + + <ItemGroup> + <None Include="$(MSBuildThisFileDirectory)AppHead.xaml" /> + <ApplicationDefinition Include="$(MSBuildThisFileDirectory)AppHead.xaml" + SubType="Designer" + XamlRuntime="WinUI" + Generator="MSBuild:Compile" + Link="AppHead.xaml" /> + <Compile Include="$(MSBuildThisFileDirectory)AppHead.xaml.cs" + XamlRuntime="WinUI" + DependentUpon="AppHead.xaml" + Link="AppHead.xaml.cs" /> + <UnoIcon Include="$(MSBuildThisFileDirectory)Icons\icon.svg" + ForegroundFile="$(MSBuildThisFileDirectory)Icons\icon_foreground.svg" + ForegroundScale="0.65" + Color="#00000000" /> + <UnoSplashScreen + Include="$(MSBuildThisFileDirectory)Splash\splash_screen.svg" + BaseSize="128,128" + Color="#FFFFFF" /> + <!-- NOTE: Files explicitly linked to display in the head projects for clarity. --> + <None Include="$(MSBuildThisFileDirectory)Icons\icon.svg" Link="Icons\icon.svg" /> + <None Include="$(MSBuildThisFileDirectory)Icons\icon_foreground.svg" Link="Icons\icon_foreground.svg" /> + <None Include="$(MSBuildThisFileDirectory)Splash\splash_screen.svg" Link="Splash\splash_screen.svg" /> + </ItemGroup> +</Project> diff --git a/dotnetUno5/__change__.Skia.Gtk/Package.appxmanifest b/dotnetUno5/__change__.Skia.Gtk/Package.appxmanifest new file mode 100644 index 0000000..a79e160 --- /dev/null +++ b/dotnetUno5/__change__.Skia.Gtk/Package.appxmanifest @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> + +<Package + xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" + xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" + xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" + IgnorableNamespaces="uap rescap"> + + <Identity + Name="__change__" + Publisher="O=__change__" + Version="1.0.0.0" /> + + <Properties> + <DisplayName>__change__</DisplayName> + <PublisherDisplayName>__change__</PublisherDisplayName> + </Properties> + + <Dependencies> + <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" /> + <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" /> + </Dependencies> + + <Resources> + <Resource Language="x-generate"/> + </Resources> + + <Applications> + <Application Id="App" + Executable="$targetnametoken$.exe" + EntryPoint="$targetentrypoint$"> + <uap:VisualElements + DisplayName="__change__" + Description="__change__"> + <uap:SplashScreen /> + </uap:VisualElements> + </Application> + </Applications> + + <Capabilities> + <rescap:Capability Name="runFullTrust" /> + </Capabilities> +</Package> diff --git a/dotnetUno5/__change__.Skia.Gtk/Program.cs b/dotnetUno5/__change__.Skia.Gtk/Program.cs new file mode 100644 index 0000000..96ef96a --- /dev/null +++ b/dotnetUno5/__change__.Skia.Gtk/Program.cs @@ -0,0 +1,21 @@ +using System; +using GLib; +using Uno.UI.Runtime.Skia.Gtk; + +namespace __change__.Skia.Gtk; + +public class Program +{ + public static void Main(string[] args) + { + ExceptionManager.UnhandledException += delegate (UnhandledExceptionArgs expArgs) + { + Console.WriteLine("GLIB UNHANDLED EXCEPTION" + expArgs.ExceptionObject.ToString()); + expArgs.ExitApplication = true; + }; + + var host = new GtkHost(() => new AppHead()); + + host.Run(); + } +} diff --git a/dotnetUno5/__change__.Skia.Gtk/__change__.Skia.Gtk.csproj b/dotnetUno5/__change__.Skia.Gtk/__change__.Skia.Gtk.csproj new file mode 100644 index 0000000..eb5d410 --- /dev/null +++ b/dotnetUno5/__change__.Skia.Gtk/__change__.Skia.Gtk.csproj @@ -0,0 +1,47 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType> + <OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType> + <TargetFramework>$(DotNetVersion)</TargetFramework> + <ApplicationManifest>app.manifest</ApplicationManifest> + </PropertyGroup> + <ItemGroup> + <EmbeddedResource Include="Package.appxmanifest" /> + <Manifest Include="$(ApplicationManifest)" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="Uno.WinUI.Skia.Gtk" /> + <PackageReference Include="Uno.Extensions.Configuration" /> + <PackageReference Include="Uno.Extensions.Http" /> + <PackageReference Include="Uno.Extensions.Http.Refit" /> + <PackageReference Include="Uno.Extensions.Logging.WinUI" /> + <PackageReference Include="Uno.Extensions.Logging.Serilog" /> + <PackageReference Include="Uno.Extensions.Serialization.Http" /> + <PackageReference Include="Uno.Extensions.Serialization.Refit" /> + <PackageReference Include="Uno.Material.WinUI" /> + <PackageReference Include="Uno.Toolkit.WinUI.Material" /> + <PackageReference Include="Uno.Toolkit.WinUI" /> + <PackageReference Include="Uno.Extensions.Hosting.WinUI" /> + <PackageReference Include="Uno.Extensions.Localization.WinUI" /> + <PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" /> + <PackageReference Include="Uno.Extensions.Navigation.WinUI" /> + <PackageReference Include="Uno.Extensions.Reactive.WinUI" /> + <PackageReference Include="Microsoft.Extensions.Logging.Console" /> + <PackageReference Include="SkiaSharp.Views.Uno.WinUI" /> + <PackageReference Include="SkiaSharp.Skottie" /> + <PackageReference Include="Uno.WinUI.DevServer" Condition="'$(Configuration)'=='Debug'" /> + <PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\__change__\__change__.csproj" /> + <ProjectReference Include="..\__change__.DataContracts\__change__.DataContracts.csproj" /> + </ItemGroup> + <Import Project="..\__change__.Shared\base.props" /> + + <Target Name="ValidateOverrides" BeforeTargets="Restore;_CheckForUnsupportedTargetFramework" Condition="'$(OverrideTargetFramework)' != ''"> + <Error + Text="OverrideTargetFramework set to '$(OverrideTargetFramework)' is invalid. Set OverrideTargetFramework to $([MSBuild]::Escape('$'))(DotNetVersion) or skip building this project (eg unload the project in Visual Studio)" + Condition="'$(OverrideTargetFramework)'!='$(DotNetVersion)'" /> + </Target> +</Project> diff --git a/dotnetUno5/__change__.Skia.Gtk/app.manifest b/dotnetUno5/__change__.Skia.Gtk/app.manifest new file mode 100644 index 0000000..0e175d8 --- /dev/null +++ b/dotnetUno5/__change__.Skia.Gtk/app.manifest @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> + <assemblyIdentity version="1.0.0.0" name="__change__.Gtk"/> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> + <security> + <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> + <!-- UAC Manifest Options + If you want to change the Windows User Account Control level replace the + requestedExecutionLevel node with one of the following. + + <requestedExecutionLevel level="asInvoker" uiAccess="false" /> + <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> + + Specifying requestedExecutionLevel element will disable file and registry virtualization. + Remove this element if your application requires this virtualization for backwards + compatibility. + --> + <requestedExecutionLevel level="asInvoker" uiAccess="false" /> + </requestedPrivileges> + </security> + </trustInfo> + + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- A list of the Windows versions that this application has been tested on + and is designed to work with. Uncomment the appropriate elements + and Windows will automatically select the most compatible environment. --> + + <!-- Windows Vista --> + <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />--> + + <!-- Windows 7 --> + <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />--> + + <!-- Windows 8 --> + <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />--> + + <!-- Windows 8.1 --> + <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />--> + + <!-- Windows 10 --> + <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />--> + + </application> + </compatibility> + + <!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher + DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need + to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should + also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> + + <application xmlns="urn:schemas-microsoft-com:asm.v3"> + <windowsSettings> + <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware> + <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness> + </windowsSettings> + </application> + + + <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) --> + <!-- + <dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> + </dependency> + --> + +</assembly> diff --git a/dotnetUno5/__change__.Tests/AppInfoTests.cs b/dotnetUno5/__change__.Tests/AppInfoTests.cs new file mode 100644 index 0000000..80db345 --- /dev/null +++ b/dotnetUno5/__change__.Tests/AppInfoTests.cs @@ -0,0 +1,18 @@ +namespace __change__.Tests; + +public class AppInfoTests +{ + [SetUp] + public void Setup() + { + } + + [Test] + public void AppInfoCreation() + { + var appInfo = new AppConfig { Environment = "Test" }; + + appInfo.Should().NotBeNull(); + appInfo.Environment.Should().Be("Test"); + } +} diff --git a/dotnetUno5/__change__.Tests/GlobalUsings.cs b/dotnetUno5/__change__.Tests/GlobalUsings.cs new file mode 100644 index 0000000..24b8f95 --- /dev/null +++ b/dotnetUno5/__change__.Tests/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using FluentAssertions; +global using __change__.Business.Models; +global using NUnit.Framework; diff --git a/dotnetUno5/__change__.Tests/__change__.Tests.csproj b/dotnetUno5/__change__.Tests/__change__.Tests.csproj new file mode 100644 index 0000000..6c1b2ff --- /dev/null +++ b/dotnetUno5/__change__.Tests/__change__.Tests.csproj @@ -0,0 +1,19 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>$(DotNetVersion)</TargetFramework> + <IsPackable>false</IsPackable> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="FluentAssertions" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" /> + <PackageReference Include="NUnit" /> + <PackageReference Include="NUnit3TestAdapter" /> + <PackageReference Include="coverlet.collector" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\__change__\__change__.csproj" /> + </ItemGroup> +</Project> diff --git a/dotnetUno5/__change__.UITests/Constants.cs b/dotnetUno5/__change__.UITests/Constants.cs new file mode 100644 index 0000000..52285e6 --- /dev/null +++ b/dotnetUno5/__change__.UITests/Constants.cs @@ -0,0 +1,12 @@ +namespace __change__.UITests; + +public class Constants +{ + public readonly static string WebAssemblyDefaultUri = "http://localhost:5001/"; + public readonly static string iOSAppName = "com.companyname.__change__"; + public readonly static string AndroidAppName = "com.companyname.__change__"; + public readonly static string iOSDeviceNameOrId = "iPad Pro (12.9-inch) (3rd generation)"; + + public readonly static Platform CurrentPlatform = Platform.Browser; + public readonly static Browser WebAssemblyBrowser = Browser.Chrome; +} diff --git a/dotnetUno5/__change__.UITests/Given_MainPage.cs b/dotnetUno5/__change__.UITests/Given_MainPage.cs new file mode 100644 index 0000000..32f38aa --- /dev/null +++ b/dotnetUno5/__change__.UITests/Given_MainPage.cs @@ -0,0 +1,25 @@ +namespace __change__.UITests; + +public class Given_MainPage : TestBase +{ + [Test] + public async Task When_SmokeTest() + { + // NOTICE + // To run UITests, Run the WASM target without debugger. Note + // the port that is being used and update the Constants.cs file + // in the UITests project with the correct port number. + + // Add delay to allow for the splash screen to disappear + await Task.Delay(5000); + + + // Query for the SecondPageButton and then tap it + Query xamlButton = q => q.All().Marked("SecondPageButton"); + App.WaitForElement(xamlButton); + App.Tap(xamlButton); + + // Take a screenshot and add it to the test results + TakeScreenshot("After tapped"); + } +} diff --git a/dotnetUno5/__change__.UITests/GlobalUsings.cs b/dotnetUno5/__change__.UITests/GlobalUsings.cs new file mode 100644 index 0000000..0a9d902 --- /dev/null +++ b/dotnetUno5/__change__.UITests/GlobalUsings.cs @@ -0,0 +1,5 @@ +global using NUnit.Framework; +global using Uno.UITest; +global using Uno.UITest.Helpers.Queries; +global using Uno.UITests.Helpers; +global using Query = System.Func<Uno.UITest.IAppQuery, Uno.UITest.IAppQuery>; diff --git a/dotnetUno5/__change__.UITests/TestBase.cs b/dotnetUno5/__change__.UITests/TestBase.cs new file mode 100644 index 0000000..83de09a --- /dev/null +++ b/dotnetUno5/__change__.UITests/TestBase.cs @@ -0,0 +1,82 @@ + +namespace __change__.UITests; + +public class TestBase +{ + private IApp? _app; + + static TestBase() + { + AppInitializer.TestEnvironment.AndroidAppName = Constants.AndroidAppName; + AppInitializer.TestEnvironment.WebAssemblyDefaultUri = Constants.WebAssemblyDefaultUri; + AppInitializer.TestEnvironment.iOSAppName = Constants.iOSAppName; + AppInitializer.TestEnvironment.AndroidAppName = Constants.AndroidAppName; + AppInitializer.TestEnvironment.iOSDeviceNameOrId = Constants.iOSDeviceNameOrId; + AppInitializer.TestEnvironment.CurrentPlatform = Constants.CurrentPlatform; + AppInitializer.TestEnvironment.WebAssemblyBrowser = Constants.WebAssemblyBrowser; + +#if DEBUG + AppInitializer.TestEnvironment.WebAssemblyHeadless = false; +#endif + + // Start the app only once, so the tests runs don't restart it + // and gain some time for the tests. + AppInitializer.ColdStartApp(); + } + + protected IApp App + { + get => _app!; + private set + { + _app = value; + Uno.UITest.Helpers.Queries.Helpers.App = value; + } + } + + [SetUp] + public void SetUpTest() + { + App = AppInitializer.AttachToApp(); + } + + [TearDown] + public void TearDownTest() + { + TakeScreenshot("teardown"); + } + + public FileInfo TakeScreenshot(string stepName) + { + var title = $"{TestContext.CurrentContext.Test.Name}_{stepName}" + .Replace(" ", "_") + .Replace(".", "_"); + + var fileInfo = App.Screenshot(title); + + var fileNameWithoutExt = Path.GetFileNameWithoutExtension(fileInfo.Name); + if (fileNameWithoutExt != title && fileInfo.DirectoryName != null) + { + var destFileName = Path + .Combine(fileInfo.DirectoryName, title + Path.GetExtension(fileInfo.Name)); + + if (File.Exists(destFileName)) + { + File.Delete(destFileName); + } + + File.Move(fileInfo.FullName, destFileName); + + TestContext.AddTestAttachment(destFileName, stepName); + + fileInfo = new FileInfo(destFileName); + } + else + { + TestContext.AddTestAttachment(fileInfo.FullName, stepName); + } + + return fileInfo; + } + +} diff --git a/dotnetUno5/__change__.UITests/__change__.UITests.csproj b/dotnetUno5/__change__.UITests/__change__.UITests.csproj new file mode 100644 index 0000000..96ca3ea --- /dev/null +++ b/dotnetUno5/__change__.UITests/__change__.UITests.csproj @@ -0,0 +1,17 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>$(DotNetVersion)</TargetFramework> + <IsTestProject>true</IsTestProject> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="FluentAssertions" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" /> + <PackageReference Include="Newtonsoft.Json" /> + <PackageReference Include="NUnit" /> + <PackageReference Include="NUnit3TestAdapter" /> + <PackageReference Include="Uno.UITest.Help…
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3f4e6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,264 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# Azure Functions localsettings file +local.settings.json + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (github/gitignore#1529 (comment)) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/Echo.cs b/Echo.cs new file mode 100644 index 0000000..3fd1e01 --- /dev/null +++ b/Echo.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.WebJobs; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Logging; +using System.IO; +/*The following lines of code to add using directives for the +Microsoft.AspNetCore.Mvc, Microsoft.Azure.WebJobs, +Microsoft.AspNetCore.Http, and Microsoft.Extensions.Logging namespaces.*/ + +public static class Echo +{/*The following code block to create a new public static method + named Run that returns a variable of type IActionResult and that + also takes in variables of type HttpRequest and ILogger as parameters + named request and logger.*/ + + [FunctionName("Echo")] + public static IActionResult Run( + [HttpTrigger("POST")] HttpRequest request, + ILogger logger) + { + var requestBody = new StreamReader(request.Body).ReadToEnd(); + + logger.LogInformation(">>> Received a POST: " + requestBody); + return new OkObjectResult(requestBody); + /*The following line of code to echo the body of the HTTP request as the HTTP response.*/ + } +} \ No newline at end of file diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..ce7818b --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,9 @@ +{ + "profiles": { + "func": { + "commandName": "Project", + "commandLineArgs": "--port 7189", + "launchBrowser": false + } + } +} \ No newline at end of file diff --git a/func.csproj b/func.csproj new file mode 100644 index 0000000..ea36c60 --- /dev/null +++ b/func.csproj @@ -0,0 +1,19 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <AzureFunctionsVersion>v4</AzureFunctionsVersion> + </PropertyGroup> + <ItemGroup> + <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.2.0" /> + <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> + </ItemGroup> + <ItemGroup> + <None Update="host.json"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Update="local.settings.json"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + <CopyToPublishDirectory>Never</CopyToPublishDirectory> + </None> + </ItemGroup> +</Project> diff --git a/host.json b/host.json new file mode 100644 index 0000000..a304ad4 --- /dev/null +++ b/host.json @@ -0,0 +1,13 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true + } + }, + "logLevel": { + "Default": "Debug" + } + } +}
No description provided.