Skip to content

Commit b221e5f

Browse files
committed
setup
1 parent 1624b62 commit b221e5f

File tree

7 files changed

+32
-6
lines changed

7 files changed

+32
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Windows.Input;
22

3-
namespace SimpleMVVM;
3+
namespace SimpleMVVM.BaseClasses;
44

55
/// <summary>
66
/// Provides a base implementation of the <see cref="ICommand"/> interface for WPF MVVM scenarios.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Runtime.CompilerServices;
33
using System.Windows;
44

5-
namespace SimpleMVVM;
5+
namespace SimpleMVVM.BaseClasses;
66

77
/// <summary>
88
/// Provides a base implementation of <see cref="INotifyPropertyChanged"/> for view models in a WPF MVVM application.

SimpleMVVM/BindAttribute.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace SimpleMVVM;
2+
3+
[AttributeUsage(AttributeTargets.Class)]
4+
public class BindAttribute : Attribute
5+
{
6+
7+
}

SimpleMVVM/CommandAttribute.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace SimpleMVVM;
2+
3+
[AttributeUsage(AttributeTargets.Class)]
4+
public class CommandAttribute : Attribute
5+
{
6+
7+
}

SimpleMVVM/SimpleMVVM.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@
5959
<ItemGroup>
6060
<None Include="..\Icon.png" Pack="true" PackagePath="" />
6161
<None Include="..\README.md" Pack="true" PackagePath="" />
62-
<None Include="$(MSBuildThisFileDirectory)../ViewModelGenerator/bin/Release/netstandard2.0/ViewModelGenerator.dll"
63-
Pack="true"
64-
PackagePath="analyzers/dotnet/cs/"
65-
Condition="Exists('$(MSBuildThisFileDirectory)../ViewModelGenerator/bin/Release/netstandard2.0/ViewModelGenerator.dll')" />
62+
<None Include="$(MSBuildThisFileDirectory)../ViewModelGenerator/bin/Release/netstandard2.0/ViewModelGenerator.dll" Pack="true" PackagePath="analyzers/dotnet/cs/" Condition="Exists('$(MSBuildThisFileDirectory)../ViewModelGenerator/bin/Release/netstandard2.0/ViewModelGenerator.dll')" />
6663
</ItemGroup>
6764

6865
</Project>

SimpleMVVM/ViewModeAttribute.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace SimpleMVVM;
2+
3+
[AttributeUsage(AttributeTargets.Class)]
4+
public class ViewModeAttribute : Attribute
5+
{
6+
7+
}

ViewModelGenerator/ViewModelGenerator.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ namespace ViewModelGenerator;
55
[Generator]
66
public class ViewModelGenerator : IIncrementalGenerator
77
{
8+
//Get classes ViewModel attribute
9+
//Get methods in viewmodel with command attribute
10+
//Create new command class with name of method that calls method on execute.
11+
//?? Figure out how to handle CanExecute cleanly ??
12+
//
13+
//Get properties in viewmodel with bind attribute
14+
//Create a new ObservableProperty with a get/set to the property name
15+
816
public void Initialize(IncrementalGeneratorInitializationContext context)
917
=> throw new System.NotImplementedException();
1018
}

0 commit comments

Comments
 (0)