A set of Roslyn refactorings supporting DDD design
Extension available at Visual Studio Marketpalace here
Currently implemented refactorings:
- make class readonly
- add structural equality
- add comparison operators
- convert type to record
A set of Roslyn refactorings supporting DDD design
A set of Roslyn refactorings supporting DDD design
Extension available at Visual Studio Marketpalace here
Currently implemented refactorings:
Hello Cezary,
Unfortunately, the extension is not working with Visual Studio 2019. Could you provide a version for this VS?
public class DarthQueueDetails
{
protected internal const int MaxNumberOfHarvesting = 3;
private List<DateTime> harvestings;
public string QueueName { get; set; }
public int HarvestingCount => this.harvestings.Count;
public IReadOnlyList<DateTime> Harvestings => this.harvestings;
public DarthQueueDetails(string queueName)
{
this.QueueName = queueName;
this.harvestings = new List<DateTime>();
}
public void Harvest()
{
// ReSharper disable once DateTimeNow
this.harvestings.Add(DateTime.Now);
}
public bool IsTimeForHarvestingFestival()
{
return this.HarvestingCount > MaxNumberOfHarvesting;
}
}
System.NullReferenceException : Object reference not set to an instance of an object.
at DDDToolbox.MakeClassReadonlyRefactoring.<>c__DisplayClass7_0.<ConvertToReadonly>b__0(MemberDeclarationSyntax x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at DDDToolbox.MakeClassReadonlyRefactoring.ConvertToReadonly(TypeDeclarationSyntax typeDeclaration,SyntaxGenerator generator)
at async DDDToolbox.ConvertToRecordTypeRefactoring.ConvertToRecord(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.PreviewChangesSuggestedAction.CreateAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.GetPreviewChangesFlavor(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.CreateAllFlavors(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.