Add stuff

This commit is contained in:
Rui Sousa 2021-12-06 16:27:46 +00:00
parent cfffa082f6
commit 034e6727c3
5 changed files with 52 additions and 12 deletions

View File

@ -0,0 +1,25 @@
using System;
namespace BlueWest.Data
{
/// <summary>
/// Specifies that the annotated class can be mapped from the provided <see cref="SourceType"/>.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public sealed class AAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="MapFromAttribute"/> class with the specified <paramref name="sourceType"/>.
/// </summary>
/// <param name="sourceType">The type of to map from.</param>
public AAttribute(Type sourceType)
{
SourceType = sourceType;
}
/// <summary>
/// Gets the type to map from.
/// </summary>
public Type SourceType { get; }
}
}

View File

@ -22,7 +22,7 @@ namespace BlueWest.Data
}
[MessagePackObject]
public struct FinanceTransaction
public partial struct FinanceTransaction
{
[Key(1)] public int Id { get; set; }
[Key(2)] public int UserId { get; set; }

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
using MapTo;
namespace BlueWest.Data
{
[AAttribute(typeof(FinanceTransaction))]
public partial class FinanceTransactionReadDto
{
}
}

View File

@ -1,14 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest", "BlueWest\BlueWest.csproj", "{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78}"
# Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest", "BlueWest\BlueWest.csproj", "{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Data", "BlueWest.Data\BlueWest.Data.csproj", "{E518C62D-768C-4885-9C9D-FD5761605B54}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Data", "BlueWest.Data\BlueWest.Data.csproj", "{E518C62D-768C-4885-9C9D-FD5761605B54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.WebApi", "BlueWest.WebApi\BlueWest.WebApi.csproj", "{6D3321B5-CF1A-4251-B28D-329EDA6DC278}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.WebApi", "BlueWest.WebApi\BlueWest.WebApi.csproj", "{6D3321B5-CF1A-4251-B28D-329EDA6DC278}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Collections", "BlueWest.Collections\BlueWest.Collections.csproj", "{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapTo", "MapTo\src\MapTo\MapTo.csproj", "{7D8CF461-E20D-48A0-981C-5B60792C56C8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Collections", "BlueWest.Collections\BlueWest.Collections.csproj", "{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -32,9 +33,11 @@ Global
{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Release|Any CPU.Build.0 = Release|Any CPU
{7D8CF461-E20D-48A0-981C-5B60792C56C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D8CF461-E20D-48A0-981C-5B60792C56C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D8CF461-E20D-48A0-981C-5B60792C56C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D8CF461-E20D-48A0-981C-5B60792C56C8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F24E44CA-98BA-4B44-A1E1-57912CC5DCC3}
EndGlobalSection
EndGlobal

2
MapTo

@ -1 +1 @@
Subproject commit 4d73897b4e007d690655fdee6813124dc33d88ea
Subproject commit e3143877729241799c8c578bc4efb062ace8ba00