Skip to content

Commit

Permalink
add ReactiveUI ReactiveWindow wrapper generation (#204)
Browse files Browse the repository at this point in the history
* addition of reactive window generators

* test scenarios for rx windows

* tidied up rx-ui  reactivewindow generation

* corrected reactive window documentation gen

* add more unit tests

* Update ReactiveSimpleChildWindowClassGeneratorTests.cs
  • Loading branch information
dpvreony committed Jan 18, 2022
1 parent 16f5776 commit 5a622cb
Show file tree
Hide file tree
Showing 180 changed files with 1,240 additions and 327 deletions.
@@ -1,13 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp6.0</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<LangVersion>9</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Whipstaff.AspNetCore" Version="6.0.55" />
<PackageReference Include="Whipstaff.Wpf" Version="6.0.55" />
<PackageReference Include="Whipstaff.Wpf.Mahapps" Version="6.0.55" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
</ItemGroup>

Expand Down
6 changes: 5 additions & 1 deletion src/Dhgms.Nucleotide.GenerationTests/EventIdExtensions.cs
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.GenerationTests
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.GenerationTests
{
public static class NumericEventIds
{
Expand Down
7 changes: 4 additions & 3 deletions src/Dhgms.Nucleotide.GenerationTests/Playground.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Dhgms.EfCoreContrib
Expand Down
@@ -1,4 +1,8 @@
using System.Collections.Generic;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System.Collections.Generic;
using Dhgms.Nucleotide.Generators.PropertyInfo;
using Microsoft.CodeAnalysis.CSharp.Syntax;

Expand Down
@@ -1,4 +1,8 @@
using System.Collections.Generic;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System.Collections.Generic;
using Dhgms.Nucleotide.Generators.PropertyInfo;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
Expand Down
@@ -1,4 +1,8 @@
using System.Collections.Generic;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System.Collections.Generic;
using Dhgms.Nucleotide.Generators.PropertyInfo;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Cqrs
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
internal abstract class BaseQueryInterfaceGenerator
{
Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Cqrs
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
public sealed class CommandFactoryInterfaceFeatureFlags
{
Expand Down
@@ -1,6 +1,9 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis;

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
Expand Down
@@ -1,4 +1,8 @@
using System;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using Dhgms.Nucleotide.Generators.GeneratorProcessors;
using Dhgms.Nucleotide.Generators.Models;
Expand Down Expand Up @@ -50,7 +54,7 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
var className = entityGenerationModel.ClassName;
return new []
{
$"Whipstaff.Core.IAuditableCommandFactory<Commands.IAdd{className}Command, RequestDtos.Add{className}RequestDto, ResponseDtos.Add{className}ResponseDto, Commands.IDelete{className}Command, ResponseDtos.Delete{className}ResponseDto, Commands.IUpdate{className}Command, RequestDtos.Update{className}RequestDto, ResponseDtos.Update{className}ResponseDto>"
$"global::Whipstaff.Core.IAuditableCommandFactory<Commands.IAdd{className}Command, RequestDtos.Add{className}RequestDto, ResponseDtos.Add{className}ResponseDto, Commands.IDelete{className}Command, ResponseDtos.Delete{className}ResponseDto, Commands.IUpdate{className}Command, RequestDtos.Update{className}RequestDto, ResponseDtos.Update{className}ResponseDto>"
};
}

Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Cqrs
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
public sealed class CommandInterfaceFeatureFlags
{
Expand Down
@@ -1,6 +1,9 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis;

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
Expand Down
@@ -1,4 +1,8 @@
using System;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using Dhgms.Nucleotide.Generators.GeneratorProcessors;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis.CSharp.Syntax;
Expand Down Expand Up @@ -43,13 +47,13 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
{
return new[]
{
$"Whipstaff.Core.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"global::Whipstaff.Core.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}

return new[]
{
$"Whipstaff.Core.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"global::Whipstaff.Core.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}
}
Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Cqrs
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
internal sealed class ListQueryInterfaceGenerator
{
Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Cqrs
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
public sealed class QueryFactoryInterfaceFeatureFlags
{
Expand Down
@@ -1,6 +1,9 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis;

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
Expand Down
@@ -1,4 +1,8 @@
using System;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using Dhgms.Nucleotide.Generators.GeneratorProcessors;
using Dhgms.Nucleotide.Generators.Models;
Expand Down Expand Up @@ -49,7 +53,7 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
var className = entityGenerationModel.ClassName;
return new []
{
$"Whipstaff.Core.IAuditableQueryFactory<Queries.IList{className}Query, RequestDtos.List{className}RequestDto, ResponseDtos.List{className}ResponseDto, Queries.IView{className}Query, ResponseDtos.View{className}ResponseDto>"
$"global::Whipstaff.Core.IAuditableQueryFactory<Queries.IList{className}Query, RequestDtos.List{className}RequestDto, ResponseDtos.List{className}ResponseDto, Queries.IView{className}Query, ResponseDtos.View{className}ResponseDto>"
};
}

Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Cqrs
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
public sealed class QueryInterfaceFeatureFlag
{
Expand Down
@@ -1,6 +1,9 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis;

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
Expand Down
@@ -1,4 +1,8 @@
using System;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using Dhgms.Nucleotide.Generators.GeneratorProcessors;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis.CSharp.Syntax;
Expand Down Expand Up @@ -46,13 +50,13 @@ protected override string[] GetBaseInterfaces(IEntityGenerationModel entityGener
{
return new[]
{
$"Whipstaff.Core.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"global::Whipstaff.Core.IAuditableRequest<long, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}

return new[]
{
$"Whipstaff.Core.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
$"global::Whipstaff.Core.IAuditableRequest<RequestDtos.{prefix}{entityGenerationModel.ClassName}RequestDto, ResponseDtos.{prefix}{entityGenerationModel.ClassName}ResponseDto>"
};
}
}
Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Cqrs
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Cqrs
{
internal sealed class ViewQueryInterfaceGenerator
{
Expand Down
@@ -1,4 +1,7 @@

// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Database
{
public sealed class ForiegnKeyInterfaceFeatureFlags
Expand Down
@@ -1,4 +1,8 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;

namespace Dhgms.Nucleotide.Generators.Features.Database
{
Expand Down
@@ -1,6 +1,8 @@
using System;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.GeneratorProcessors;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Database
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Database
{
public sealed class ReferencedByEntityFeatureFlags
{
Expand Down
@@ -1,4 +1,8 @@
using Dhgms.Nucleotide.Generators.GeneratorProcessors;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.GeneratorProcessors;

namespace Dhgms.Nucleotide.Generators.Features.Database
{
Expand Down
@@ -1,4 +1,8 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;
using Dhgms.Nucleotide.Generators.Models;

namespace Dhgms.Nucleotide.Generators.Features.Database
Expand Down
@@ -1,7 +1,8 @@
using System.Collections.Generic;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.GeneratorProcessors;
using Dhgms.Nucleotide.Generators.Models;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Dto
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Dto
{
public sealed class RequestDtoClassFeatureFlags
{
Expand Down
@@ -1,4 +1,8 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;
using Dhgms.Nucleotide.Generators.Models;

namespace Dhgms.Nucleotide.Generators.Features.Dto
Expand Down
@@ -1,6 +1,9 @@
using System;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Dhgms.Nucleotide.Generators.GeneratorProcessors;
using Dhgms.Nucleotide.Generators.Models;
using Dhgms.Nucleotide.Generators.PropertyInfo;
Expand Down
@@ -1,4 +1,8 @@
namespace Dhgms.Nucleotide.Generators.Features.Dto
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Dhgms.Nucleotide.Generators.Features.Dto
{
public sealed class ResponseDtoClassFeatureFlags
{
Expand Down
@@ -1,4 +1,8 @@
using Dhgms.Nucleotide.Generators.Generators;
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved.
// DHGMS Solutions and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using Dhgms.Nucleotide.Generators.Generators;
using Dhgms.Nucleotide.Generators.Models;

namespace Dhgms.Nucleotide.Generators.Features.Dto
Expand Down

0 comments on commit 5a622cb

Please sign in to comment.