Skip to content

Abandoned: Converts public fields to public properties

License

Notifications You must be signed in to change notification settings

fodyarchived/Fielder

Folders and files

NameName
Last commit message
Last commit date
Jan 9, 2019
Oct 1, 2018
Jan 12, 2018
Feb 11, 2019
Feb 11, 2019
Jan 5, 2019
Aug 12, 2018
Dec 6, 2017
Dec 6, 2017
Jan 30, 2019
Jun 27, 2018
Jan 30, 2019
Jan 17, 2019
Sep 20, 2012
Dec 6, 2017

Repository files navigation

Abandoned: This project is no longer maintained.

Chat on Gitter NuGet Status

This is an add-in for Fody

Icon

Converts public fields to public properties

Introduction to Fody

This feature means you can exclude the { get; set; } on your properties and use fields instead.

Usage

See also Fody usage.

NuGet installation

Install the Fielder.Fody NuGet package and update the Fody NuGet package:

PM> Install-Package Fody
PM> Install-Package Fielder.Fody

The Install-Package Fody is required since NuGet always defaults to the oldest, and most buggy, version of any dependency.

Add to FodyWeavers.xml

Add <Fielder/> to FodyWeavers.xml

<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
  <Fielder/>
</Weavers>

How does this work

  • For all types find all public instance fields with a capitalised first character
  • Convert all those fields to properties with the same name
  • Find all usages of those fields and point them to the new properties

Icon

Cow designed by Anuar Zhumaev from The Noun Project