Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can find several examples of implementing custom designers in the SampleCustomProperties project in the SampleProjects folder installed by CodeSmith. For example, DropDownEditorProperty is a class that wraps up a string and a boolean value together into a single piece of metadata. To serialize this data, it provides a class, DropDownEditorPropertySerializer, which implements IPropertySerializer. The declaration of DropDownEditorProperty is decorated to indicate that this is the serializer class that CodeSmith should use:

Code Block
languagecsharp
[PropertySerializer(typeof(CodeSmith.Samples.DropDownEditorPropertySerializer))|PropertySerializer(typeof(CodeSmith.Samples.DropDownEditorPropertySerializer))]

...


public class DropDownEditorProperty