Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
ImmutableObjectGraph.NuGet/ImmutableObjectGraph.NuGet.nuproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|AnyCPU"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>AnyCPU</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|AnyCPU"> | ||
<Configuration>Release</Configuration> | ||
<Platform>AnyCPU</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>bc4943cf-ca4c-4d24-96aa-7712061526e4</ProjectGuid> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<NuProjPath Condition=" '$(NuProjPath)' == '' ">$(MSBuildExtensionsPath)\NuProj\</NuProjPath> | ||
</PropertyGroup> | ||
<Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props')" /> | ||
<PropertyGroup Label="Configuration"> | ||
<Id>ImmutableObjectGraph</Id> | ||
<Version>0.1.0-beta</Version> | ||
<Title>ImmutableObjectGraph</Title> | ||
<Authors>Andrew Arnott</Authors> | ||
<Owners>Andrew Arnott</Owners> | ||
<Summary>T4 templates for creating immutable types</Summary> | ||
<Description>T4 templates that transform simple mutable type definitions into fully functional immutable types with persistent characteristics.</Description> | ||
<ReleaseNotes> | ||
</ReleaseNotes> | ||
<ProjectUrl>https://github.com/aarnott/immutableobjectgraph</ProjectUrl> | ||
<LicenseUrl> | ||
</LicenseUrl> | ||
<Copyright>Copyright © Andrew Arnott</Copyright> | ||
<Tags>immutable </Tags> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Content Include="content\YourImmutableTypeDefinition.tt" /> | ||
<Content Include="Readme.txt" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\ImmutableObjectGraph\ImmutableObjectGraph.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="content\ImmutableObjectGraph\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.Builders.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.Builders.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.CollectionHelpers.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.CollectionHelpers.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.DeepMutation.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.DeepMutation.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.Delta.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.Delta.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.Discovery.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.Discovery.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.FastSpine.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.FastSpine.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.Interface.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.Interface.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.RedNode.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.RedNode.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.TypeConversion.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.TypeConversion.tt</Link> | ||
</Content> | ||
<Content Include="..\ImmutableObjectGraph\ImmutableObjectGraph.WithProperty.tt"> | ||
<Link>content\ImmutableObjectGraph\ImmutableObjectGraph.WithProperty.tt</Link> | ||
</Content> | ||
</ItemGroup> | ||
<Import Project="$(NuProjPath)\NuProj.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ImmutableObjectGraph | ||
==================== | ||
|
||
To get started, open the YourImmutableTypeDefinition.tt file and start making changes to it. |
28 changes: 28 additions & 0 deletions
28
ImmutableObjectGraph.NuGet/content/YourImmutableTypeDefinition.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<#@ template debug="true" language="C#" #> | ||
<#@ Output Extension=".generated.cs" #> | ||
<# | ||
this.Namespace = "YourNamespace"; | ||
#> | ||
<#@ Include File="ImmutableObjectGraph\ImmutableObjectGraph.RedNode.tt" #> | ||
<#@ Include File="ImmutableObjectGraph\ImmutableObjectGraph.Delta.tt" #> | ||
<#@ Include File="ImmutableObjectGraph\ImmutableObjectGraph.tt" #> | ||
<#+ | ||
abstract class FileSystemEntry { | ||
[Required] | ||
string pathSegment; | ||
|
||
RichData data; | ||
} | ||
|
||
class FileSystemFile : FileSystemEntry { | ||
ImmutableHashSet<string> attributes; | ||
} | ||
|
||
class FileSystemDirectory : FileSystemEntry { | ||
ImmutableSortedSet<FileSystemEntry> children; | ||
} | ||
|
||
class RichData { | ||
int someCoolProperty; | ||
} | ||
#> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters