diff --git a/NuGet/Tools/NuGet.exe b/NuGet/Tools/NuGet.exe index 8db00e237b..a6caf01c9e 100644 Binary files a/NuGet/Tools/NuGet.exe and b/NuGet/Tools/NuGet.exe differ diff --git a/Samples/ProjectTracker/.dockerignore b/Samples/ProjectTracker/.dockerignore deleted file mode 100644 index df2e0fe502..0000000000 --- a/Samples/ProjectTracker/.dockerignore +++ /dev/null @@ -1,9 +0,0 @@ -.dockerignore -.env -.git -.gitignore -.vs -.vscode -*/bin -*/obj -**/.toolstarget \ No newline at end of file diff --git a/Samples/ProjectTracker/AttributeGetter/AttributeGetter.csproj b/Samples/ProjectTracker/AttributeGetter/AttributeGetter.csproj deleted file mode 100644 index e9b787261a..0000000000 --- a/Samples/ProjectTracker/AttributeGetter/AttributeGetter.csproj +++ /dev/null @@ -1,65 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {6CEA51BA-06E1-4567-8660-37EABF1B6FDF} - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - Properties - AttributeGetter - AttributeGetter - 512 - Resources\Resource.Designer.cs - Off - True - v7.1 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/ProjectTracker/AttributeGetter/AttributeGetter.csproj.bak b/Samples/ProjectTracker/AttributeGetter/AttributeGetter.csproj.bak deleted file mode 100644 index da8764266b..0000000000 --- a/Samples/ProjectTracker/AttributeGetter/AttributeGetter.csproj.bak +++ /dev/null @@ -1,65 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {6CEA51BA-06E1-4567-8660-37EABF1B6FDF} - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - Properties - AttributeGetter - AttributeGetter - 512 - Resources\Resource.Designer.cs - Off - True - v7.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/ProjectTracker/AttributeGetter/DisplayGetter.cs b/Samples/ProjectTracker/AttributeGetter/DisplayGetter.cs deleted file mode 100644 index 7b06b228fe..0000000000 --- a/Samples/ProjectTracker/AttributeGetter/DisplayGetter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; - -namespace AttributeGetter -{ - public static class DisplayGetter - { - public static string GetFriendlyNameFromAttributes(Type type, string name) - { - // If name is blank then check the DataAnnotations attribute and then the ComponentModel attribute. - var propertyInfo = type.GetProperty(name); - if (propertyInfo != null) - { - // DataAnnotations attribute. - var display = propertyInfo.GetCustomAttributes(typeof(DisplayAttribute), true).OfType().FirstOrDefault(); - if (display != null) - name = display.GetName(); - } - return name; - } - } -} diff --git a/Samples/ProjectTracker/AttributeGetter/Properties/AssemblyInfo.cs b/Samples/ProjectTracker/AttributeGetter/Properties/AssemblyInfo.cs deleted file mode 100644 index 74d0aba2b2..0000000000 --- a/Samples/ProjectTracker/AttributeGetter/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Android.App; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AttributeGetter")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AttributeGetter")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/ProjectTracker/AttributeGetter/Resources/AboutResources.txt b/Samples/ProjectTracker/AttributeGetter/Resources/AboutResources.txt deleted file mode 100644 index c2bca974c4..0000000000 --- a/Samples/ProjectTracker/AttributeGetter/Resources/AboutResources.txt +++ /dev/null @@ -1,44 +0,0 @@ -Images, layout descriptions, binary blobs and string dictionaries can be included -in your application as resource files. Various Android APIs are designed to -operate on the resource IDs instead of dealing with images, strings or binary blobs -directly. - -For example, a sample Android app that contains a user interface layout (main.axml), -an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) -would keep its resources in the "Resources" directory of the application: - -Resources/ - drawable/ - icon.png - - layout/ - main.axml - - values/ - strings.xml - -In order to get the build system to recognize Android resources, set the build action to -"AndroidResource". The native Android APIs do not operate directly with filenames, but -instead operate on resource IDs. When you compile an Android application that uses resources, -the build system will package the resources for distribution and generate a class called "R" -(this is an Android convention) that contains the tokens for each one of the resources -included. For example, for the above Resources layout, this is what the R class would expose: - -public class R { - public class drawable { - public const int icon = 0x123; - } - - public class layout { - public const int main = 0x456; - } - - public class strings { - public const int first_string = 0xabc; - public const int second_string = 0xbcd; - } -} - -You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main -to reference the layout/main.axml file, or R.strings.first_string to reference the first -string in the dictionary file values/strings.xml. \ No newline at end of file diff --git a/Samples/ProjectTracker/AttributeGetter/Resources/Resource.Designer.cs b/Samples/ProjectTracker/AttributeGetter/Resources/Resource.Designer.cs deleted file mode 100644 index bad3f353b0..0000000000 --- a/Samples/ProjectTracker/AttributeGetter/Resources/Resource.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -[assembly: global::Android.Runtime.ResourceDesignerAttribute("AttributeGetter.Resource", IsApplication=false)] - -namespace AttributeGetter -{ - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] - public partial class Resource - { - - static Resource() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - public partial class Attribute - { - - static Attribute() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private Attribute() - { - } - } - - public partial class String - { - - // aapt resource value: 0x7f020001 - public static int ApplicationName = 2130837505; - - // aapt resource value: 0x7f020000 - public static int Hello = 2130837504; - - static String() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private String() - { - } - } - } -} -#pragma warning restore 1591 diff --git a/Samples/ProjectTracker/AttributeGetter/Resources/Values/Strings.xml b/Samples/ProjectTracker/AttributeGetter/Resources/Values/Strings.xml deleted file mode 100644 index 8fd17630ea..0000000000 --- a/Samples/ProjectTracker/AttributeGetter/Resources/Values/Strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, Click Me! - $projectname$ - diff --git a/Samples/ProjectTracker/How to run WPF.txt b/Samples/ProjectTracker/How to run WPF.txt deleted file mode 100644 index bcb553ade1..0000000000 --- a/Samples/ProjectTracker/How to run WPF.txt +++ /dev/null @@ -1,7 +0,0 @@ -1. Set ProjectTracker.Ui.WPF as Startup Project and run (CTRL F5) - -Note 1 - This project uses a cloud application server at http://ptrackerserver.azurewebsites.net -(have a look at ProjectTracker.Ui.WPF App.config) - -Note 2 - The application server ProjectTracker.AppServerHost is the source code for cloud application server -and uses ProjectTracker.DalMock assembly to mock a database table. diff --git a/Samples/ProjectTracker/How to run WinForms.txt b/Samples/ProjectTracker/How to run WinForms.txt deleted file mode 100644 index e0da576ae9..0000000000 --- a/Samples/ProjectTracker/How to run WinForms.txt +++ /dev/null @@ -1,7 +0,0 @@ -1. Set ProjectTracker.Ui.WinForm as Startup Project and run (CTRL F5) - -Note 1 - This project uses a cloud application server at http://ptrackerserver.azurewebsites.net -(have a look at ProjectTracker.Ui.WinForm App.config) - -Note 2 - The application server ProjectTracker.AppServerHost is the source code for cloud application server -and uses ProjectTracker.DalMock assembly to mock a database table. diff --git a/Samples/ProjectTracker/HowtoRunBlazor.txt b/Samples/ProjectTracker/HowtoRunBlazor.txt deleted file mode 100644 index 6e9439c2df..0000000000 --- a/Samples/ProjectTracker/HowtoRunBlazor.txt +++ /dev/null @@ -1,11 +0,0 @@ -Note: These steps are taken from a reply posted by Rocky - -In order to run/debug the Blazor sample. -You need to launch not just the Blazor client, but also the app server project, -just like you would with the WinForms or WPF apps. - -Right-click on the solution, select 'Set Startup Projects' -When dialog appears select the radio button 'Multiple startup Projects' - -Set Action for the project 'ProjectTracker.AppServerCore' to 'Start -Also set Action for the project 'ProjectTracker.Ui.Blazor.Client' to 'Start' diff --git a/Samples/ProjectTracker/ProjectTracker.AppServer/Controllers/CslaStateController.cs b/Samples/ProjectTracker/ProjectTracker.AppServer/Controllers/CslaStateController.cs new file mode 100644 index 0000000000..d55403166d --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.AppServer/Controllers/CslaStateController.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNetCore.Mvc; +using Csla; +using Csla.State; + +namespace ProjectTracker.AppServer.Controllers +{ + /// + /// Gets and puts the current user session data + /// from the Blazor wasm client components. + /// + /// + /// + [ApiController] + [Route("[controller]")] + public class CslaStateController(ApplicationContext applicationContext, ISessionManager sessionManager) : + Csla.AspNetCore.Blazor.State.StateController(applicationContext, sessionManager) + { + public override byte[] Get() => base.Get(); + + public override void Put(byte[] updatedSessionData) => base.Put(updatedSessionData); + } +} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServer/Controllers/DataPortalController.cs b/Samples/ProjectTracker/ProjectTracker.AppServer/Controllers/DataPortalController.cs new file mode 100644 index 0000000000..c2eae7e5cd --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.AppServer/Controllers/DataPortalController.cs @@ -0,0 +1,17 @@ +using Csla; +using Microsoft.AspNetCore.Mvc; + +namespace ProjectTracker.AppServer.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class DataPortalController(ApplicationContext applicationContext) + : Csla.Server.Hosts.HttpPortalController(applicationContext) + { + [HttpGet] + public string Get() + { + return "DataPortal running..."; + } + } +} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServer/Program.cs b/Samples/ProjectTracker/ProjectTracker.AppServer/Program.cs new file mode 100644 index 0000000000..045e34db40 --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.AppServer/Program.cs @@ -0,0 +1,57 @@ +using Csla.Configuration; +using Microsoft.AspNetCore.Server.Kestrel.Core; +using ProjectTracker.Configuration; + +const string BlazorClientPolicy = "AllowAllOrigins"; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); + +// CSLA requires AddHttpContextAccessor +builder.Services.AddHttpContextAccessor(); + +// support CORS so clients can call services +builder.Services.AddCors(options => +{ + options.AddPolicy(BlazorClientPolicy, + builder => + { + builder + .AllowAnyOrigin() + .AllowAnyHeader() + .AllowAnyMethod(); + }); +}); + +// Required by CSLA data portal controller. If using Kestrel: +builder.Services.Configure(options => +{ + options.AllowSynchronousIO = true; +}); + +// Required by CSLA data portal controller. If using IIS: +builder.Services.Configure(options => +{ + options.AllowSynchronousIO = true; +}); + +builder.Services.AddCsla(o => o + .Security(so => so.FlowSecurityPrincipalFromClient = true)); + +builder.Services.AddDalMock(); +//builder.Services.AddDalEfCore(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/Samples/ProjectTracker/ProjectTracker.AppServer/ProjectTracker.AppServer.csproj b/Samples/ProjectTracker/ProjectTracker.AppServer/ProjectTracker.AppServer.csproj new file mode 100644 index 0000000000..c2351206f6 --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.AppServer/ProjectTracker.AppServer.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/launchSettings.json b/Samples/ProjectTracker/ProjectTracker.AppServer/Properties/launchSettings.json similarity index 58% rename from Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/launchSettings.json rename to Samples/ProjectTracker/ProjectTracker.AppServer/Properties/launchSettings.json index 1627d164a9..f1e62cbc71 100644 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/launchSettings.json +++ b/Samples/ProjectTracker/ProjectTracker.AppServer/Properties/launchSettings.json @@ -1,35 +1,41 @@ -{ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:8040", - "sslPort": 0 + "applicationUrl": "http://localhost:4374", + "sslPort": 44387 } }, - "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { - "IIS Express": { - "commandName": "IISExpress", + "http": { + "commandName": "Project", + "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "api/dataportal", + "applicationUrl": "http://localhost:5260", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, - "ProjectTracker.AppServerCore": { + "https": { "commandName": "Project", + "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "api/dataportal", + "applicationUrl": "https://localhost:7291;http://localhost:5260", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:5001;http://localhost:5000" + } }, - "Docker": { - "commandName": "Docker", + "IIS Express": { + "commandName": "IISExpress", "launchBrowser": true, - "launchUrl": "{Scheme}://localhost:{ServicePort}/api/dataportal" + "launchUrl": "api/dataportal", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } } } -} \ No newline at end of file +} diff --git a/Samples/ProjectTracker/ProjectTracker.AppServer/appsettings.Development.json b/Samples/ProjectTracker/ProjectTracker.AppServer/appsettings.Development.json new file mode 100644 index 0000000000..0c208ae918 --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.AppServer/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Samples/ProjectTracker/ProjectTracker.Ui.Blazor.Server/appsettings.json b/Samples/ProjectTracker/ProjectTracker.AppServer/appsettings.json similarity index 56% rename from Samples/ProjectTracker/ProjectTracker.Ui.Blazor.Server/appsettings.json rename to Samples/ProjectTracker/ProjectTracker.AppServer/appsettings.json index d9d9a9bff6..10f68b8c8b 100644 --- a/Samples/ProjectTracker/ProjectTracker.Ui.Blazor.Server/appsettings.json +++ b/Samples/ProjectTracker/ProjectTracker.AppServer/appsettings.json @@ -2,8 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*" diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/.cfignore b/Samples/ProjectTracker/ProjectTracker.AppServerCore/.cfignore deleted file mode 100644 index 68409ea529..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/.cfignore +++ /dev/null @@ -1,123 +0,0 @@ -## Ingore non-server projects -ProjectTracker.AppServerHost -ProjectTracker.BusinessLibrary.Android -ProjectTracker.BusinessLibrary.iOS -ProjectTracker.BusinessLibrary.NET -ProjectTracker.Uwp -ProjectTracker.Xamarin -ProjectTracker.DalEf -ProjectTracker.Ui.UWP -ProjectTracker.Ui.WinForms -ProjectTracker.Ui.WisejWeb -ProjectTracker.Ui.WPF -ProjectTracker.Ui.Xamarin - -## Ignore Visual Studio temporary files, intermediate build output, and -## files generated by popular Visual Studio add-ons. - -# VS files -*.suo -*.user -*.userosscache -*.sln.docstates -*.vcxproj.filters -*.userprefs -.vs/ - -# Intermediate Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Oo]bj/ -[Ll]og/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -*_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 - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# 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 - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# Web workbench (sass) -.sass-cache/ - -# 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 - -# 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 - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Paket dependency manager -.paket/paket.exe -paket-files/ \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Controllers/DataPortalController.cs b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Controllers/DataPortalController.cs deleted file mode 100644 index 5178d32cfd..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Controllers/DataPortalController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Threading.Tasks; -using Csla; -using Microsoft.AspNetCore.Mvc; - -namespace ProjectTracker.AppServerHost.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class DataPortalController : Csla.Server.Hosts.HttpPortalController - { - // This override exists for demo purposes only, normally you - // wouldn't implement this code. - [HttpPost] - public override Task PostAsync([FromQuery] string operation) - { - return base.PostAsync(operation); - } - - // Implementing a GET is totally optional, but is nice - // for quick diagnosis as to whether a service is running. - // GET api/values - [HttpGet] - public async Task> GetAsync() - { - try - { - var obj = await DataPortal.FetchAsync(); - return $"{obj.ProjectCount} projects exist; {obj.ResourceCount} resources exist"; - } - catch (Exception ex) - { - return ex.ToString(); - } - } - } -} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Controllers/DataPortalControllerText.cs b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Controllers/DataPortalControllerText.cs deleted file mode 100644 index 402eaa5987..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Controllers/DataPortalControllerText.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Threading.Tasks; -using Csla; -using Microsoft.AspNetCore.Mvc; - -namespace ProjectTracker.AppServerHost.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class DataPortalTextController : Csla.Server.Hosts.HttpPortalController - { - public DataPortalTextController() - { - UseTextSerialization = true; - } - - // This override exists for demo purposes only, normally you - // wouldn't implement this code. - [HttpPost] - public override Task PostAsync([FromQuery] string operation) - { - return base.PostAsync(operation); - } - - // Implementing a GET is totally optional, but is nice - // for quick diagnosis as to whether a service is running. - // GET api/values - [HttpGet] - public async Task> GetAsync() - { - try - { - var obj = await DataPortal.FetchAsync(); - return $"{obj.ProjectCount} projects exist; {obj.ResourceCount} resources exist"; - } - catch (Exception ex) - { - return ex.ToString(); - } - } - } -} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Dockerfile b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Dockerfile deleted file mode 100644 index 3035b21859..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base -WORKDIR /app -EXPOSE 80 - -FROM microsoft/dotnet:2.1-sdk AS build -WORKDIR /src -COPY ["ProjectTracker.AppServerCore/ProjectTracker.AppServerCore.csproj", "ProjectTracker.AppServerCore/"] -COPY ["ProjectTracker.DalMock/ProjectTracker.DalMock.csproj", "ProjectTracker.DalMock/"] -COPY ["ProjectTracker.Dal/ProjectTracker.Dal.csproj", "ProjectTracker.Dal/"] -COPY ["ProjectTracker.BusinessLibrary.Netstandard/ProjectTracker.BusinessLibrary.Netstandard.csproj", "ProjectTracker.BusinessLibrary.Netstandard/"] -RUN dotnet restore "ProjectTracker.AppServerCore/ProjectTracker.AppServerCore.csproj" -COPY . . -WORKDIR "/src/ProjectTracker.AppServerCore" -RUN dotnet build "ProjectTracker.AppServerCore.csproj" -c Release -o /app - -FROM build AS publish -RUN dotnet publish "ProjectTracker.AppServerCore.csproj" -c Release -o /app - -FROM base AS final -WORKDIR /app -COPY --from=publish /app . -ENTRYPOINT ["dotnet", "ProjectTracker.AppServerCore.dll"] \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Program.cs b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Program.cs deleted file mode 100644 index cd6f82f6bc..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace ProjectTracker.AppServerCore -{ - public class Program - { - public static void Main(string[] args) - { - CreateWebHostBuilder(args).Build().Run(); - } - - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); - } -} diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/ProjectTracker.AppServerCore.csproj b/Samples/ProjectTracker/ProjectTracker.AppServerCore/ProjectTracker.AppServerCore.csproj deleted file mode 100644 index e52b83156f..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/ProjectTracker.AppServerCore.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - netcoreapp3.1 - Linux - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/LinuxFolderProfile.pubxml b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/LinuxFolderProfile.pubxml deleted file mode 100644 index 9feaba0a6d..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/LinuxFolderProfile.pubxml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - FileSystem - FileSystem - Release - Any CPU - - True - False - 5c0d9c82-1431-48c4-a5bd-c03043be4997 - bin\Release\netcoreapp2.1\linux-x64\ - False - netcoreapp2.1 - linux-x64 - true - <_IsPortable>false - - \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/RDLK8S.pubxml b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/RDLK8S.pubxml deleted file mode 100644 index 3026d8a176..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/RDLK8S.pubxml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Custom - true - /subscriptions/cde4e939-e40c-4894-9968-69abb0a883b6/resourceGroups/KubeDemo/providers/Microsoft.ContainerRegistry/registries/RDLK8S - RDLK8S - KubeDemo - Microsoft Azure Sponsorship - https://rdlk8s.azurecr.io/ - RDLK8S - - - ContainerRegistry - Release - Any CPU - 5c0d9c82-1431-48c4-a5bd-c03043be4997 - - \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/ptrackerserver - Web Deploy.pubxml b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/ptrackerserver - Web Deploy.pubxml deleted file mode 100644 index e4232f7294..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Properties/PublishProfiles/ptrackerserver - Web Deploy.pubxml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - MSDeploy - /subscriptions/48430b41-1fde-46d2-8fe8-1e0b1e931df7/resourceGroups/ProjectTracker/providers/Microsoft.Web/sites/ptrackerserver - ProjectTracker - AzureWebSite - Release - Any CPU - http://ptrackerserver.azurewebsites.net - True - False - 5c0d9c82-1431-48c4-a5bd-c03043be4997 - ptrackerserver.scm.azurewebsites.net:443 - ptrackerserver - - True - WMSVC - True - $ptrackerserver - <_SavePWD>True - <_DestinationType>AzureWebSite - False - - \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Startup.cs b/Samples/ProjectTracker/ProjectTracker.AppServerCore/Startup.cs deleted file mode 100644 index 834595c5e7..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/Startup.cs +++ /dev/null @@ -1,95 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Csla.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.AspNetCore.Server.Kestrel.Core; -using ProjectTracker.Configuration; -using Microsoft.AspNetCore.ResponseCompression; -using System.IO.Compression; -using System.Linq; - -namespace ProjectTracker.AppServerCore -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - private const string BlazorClientPolicy = "AllowAllOrigins"; - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddResponseCompression(options => - - { - - options.Providers.Add(); - options.Providers.Add(); - options.MimeTypes = - ResponseCompressionDefaults.MimeTypes.Concat( - new[] { "application/*", "text/*" }); - }); - services.Configure(options => - { - options.Level = CompressionLevel.Fastest; - }); - services.AddCors(options => - { - options.AddPolicy(BlazorClientPolicy, - builder => - { - builder - .AllowAnyOrigin() - .AllowAnyHeader() - .AllowAnyMethod(); - }); - }); - services.AddMvc((o) => o.EnableEndpointRouting = false); - - // If using Kestrel: - services.Configure(options => - { - options.AllowSynchronousIO = true; - }); - - // If using IIS: - services.Configure(options => - { - options.AllowSynchronousIO = true; - }); - - services.AddHttpContextAccessor(); - - services.AddDalMock(); - //services.AddDalEfCore(); - services.AddCsla(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - app.UseResponseCompression(); - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseHsts(); - } - - app.UseCors(BlazorClientPolicy); // must be before app.UseMvc() - - app.UseHttpsRedirection(); - app.UseMvc(); - - app.UseCsla(); - } - } -} diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/appsettings.Development.json b/Samples/ProjectTracker/ProjectTracker.AppServerCore/appsettings.Development.json deleted file mode 100644 index e203e9407e..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/appsettings.json b/Samples/ProjectTracker/ProjectTracker.AppServerCore/appsettings.json deleted file mode 100644 index af39edda26..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/appsettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Warning" - } - }, - "AllowedHosts": "*", - "ConnectionStrings": { - "PTrackerData": "Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\PTracker.mdf;Integrated Security=True;Connect Timeout=30" - } -} diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/global.json b/Samples/ProjectTracker/ProjectTracker.AppServerCore/global.json deleted file mode 100644 index 6dec9be5ea..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "2.1.301" - } -} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/k8sdeploy.yaml b/Samples/ProjectTracker/ProjectTracker.AppServerCore/k8sdeploy.yaml deleted file mode 100644 index 5b8bfe389b..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/k8sdeploy.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: projecttracker -spec: - selector: - matchLabels: - app: projecttracker - replicas: 1 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - minReadySeconds: 5 - template: - metadata: - labels: - app: projecttracker - spec: - containers: - - name: projecttracker - image: rdlk8s.azurecr.io/projecttrackerappservercore:latest - ports: - - containerPort: 80 - resources: - requests: - cpu: 250m - limits: - cpu: 500m ---- -apiVersion: v1 -kind: Service -metadata: - name: projecttracker -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: projecttracker \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.AppServerCore/manifest.yml b/Samples/ProjectTracker/ProjectTracker.AppServerCore/manifest.yml deleted file mode 100644 index 4623e8218b..0000000000 --- a/Samples/ProjectTracker/ProjectTracker.AppServerCore/manifest.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -applications: -- name: projecttracker - memory: 128M - stack: cflinuxfs2 - buildpack: https://github.com/cloudfoundry/dotnet-core-buildpack.git - path: bin\Release\netcoreapp2.1\linux-x64\ \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/DateInput.razor b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/DateInput.razor new file mode 100644 index 0000000000..3f389a82bb --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/DateInput.razor @@ -0,0 +1,43 @@ +
+
+ @Property.ErrorText + @Property.WarningText + @Property.InformationText +
+ +@code { + #nullable disable + [Parameter] + public Csla.Blazor.IPropertyInfo Property { get; set; } + [Parameter] + public bool EmptyIsMin { get; set; } = true; + [Parameter] + public string FormatString { get; set; } = "MM/dd/yyyy"; + + private Csla.SmartDate DateValue; + + private string TextValue + { + get + { + DateValue = new Csla.SmartDate((DateTime?)Property.Value, EmptyIsMin); + DateValue.FormatString = FormatString; + return DateValue.Text; + } + set + { + try + { + DateValue.Text = value; + } + catch (ArgumentException) + { /* invalid text entry, don't update value */ } + if (DateValue.IsEmpty) + Property.Value = null; + else + Property.Value = DateValue.Date; + } + } +} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/DateInputRow.razor b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/DateInputRow.razor new file mode 100644 index 0000000000..2b1bf03400 --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/DateInputRow.razor @@ -0,0 +1,17 @@ +@if (Property.CanRead) +{ + + @(Property.FriendlyName) + + + + +} + +@code { +#nullable disable + [Parameter] + public Csla.Blazor.IPropertyInfo Property { get; set; } + [Parameter] + public bool EmptyIsMin { get; set; } = true; +} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/LabelRow.razor b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/LabelRow.razor new file mode 100644 index 0000000000..c46462bb05 --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/LabelRow.razor @@ -0,0 +1,13 @@ +@if (Property.CanRead) +{ + + @Property.FriendlyName + @Property.Value + +} + +@code { +#nullable disable + [Parameter] + public Csla.Blazor.IPropertyInfo Property { get; set; } +} \ No newline at end of file diff --git a/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/TextArea.razor b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/TextArea.razor new file mode 100644 index 0000000000..6cecaa291c --- /dev/null +++ b/Samples/ProjectTracker/ProjectTracker.Blazor/ProjectTracker.Blazor.Client/Components/TextArea.razor @@ -0,0 +1,22 @@ +
+