Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Sykora committed Apr 6, 2015
2 parents 90f09b9 + a30cee6 commit c6e108a
Show file tree
Hide file tree
Showing 2,792 changed files with 319,360 additions and 99 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ FakesAssemblies/
**/App_Data/Logs/
**/App_Data/[Pp]review/
**/App_Data/TEMP/
**/App_Data/NuGetBackup/
Cached/

# Ignore Umbraco content cache file
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
## Initial Release (0.9.0)
## Initial Release (1.0)

* Includes support for Umbraco 6 and 7
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Vault for Umbraco 6
#Vault for Umbraco 6 and 7

### Build Status:

Expand All @@ -7,16 +7,10 @@
| master | [![Build status](https://ci.appveyor.com/api/projects/status/bqbyg6yevctgm7tl?svg=true)](https://ci.appveyor.com/project/kensykora/umbracovault) |
| develop | [![Build status](https://ci.appveyor.com/api/projects/status/bqbyg6yevctgm7tl/branch/develop?svg=true)](https://ci.appveyor.com/project/kensykora/umbracovault/branch/develop) |

**Version 0.9, Designed for Umbraco 6.x**

***Note**: We're already hard at work developing and testing a more refined version of Vault designed to support Umbraco 7. Some features identified in this document may not apply to newer versions of Umbraco Vault. But don't worry, the good stuff will stick around.*

***Also note**: Vault has a lot of features. We're actively working on documenting all of them, but this may take some time; this document is not yet complete.*

##Overview
## Overview
Vault for Umbraco is an easy-to-use, extensible ORM to quickly and easily get strongly-typed Umbraco CMS data into your markup. It allows you to create lightly-decorated classes that Vault will understand how to hydrate. This gives you the full view model-style experience in Umbraco that you are accustomed to in MVC, complete with strongly-typed view properties (no more magic strings in your views).

##The Idea
## The Idea

let's assume we have a document type with the alias `BlogEntry` set up with the following properties:

Expand Down Expand Up @@ -59,7 +53,7 @@ Much cleaner, with compile time checking. Reads nicer than the usual `@Umbraco.F

Want to learn more? Check out the wiki!

##Nuget Installation
## Nuget Installation

```PowerShell
PM> Nuget.exe Sources Add -Name UmbracoVaultBuild -Source https://ci.appveyor.com/nuget/umbracovault-5m6ate96gcwx -UserName <appveyoremail> -Password <appveyorpassword>
Expand Down
Binary file modified ReferenceWebsite/App_Data/Umbraco.sdf
Binary file not shown.
4 changes: 0 additions & 4 deletions ReferenceWebsite/ReferenceWebsite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@
<Reference Include="TidyNet">
<HintPath>..\packages\UmbracoCms.Core.6.2.4\lib\TidyNet.dll</HintPath>
</Reference>
<Reference Include="uComponents.DataTypes, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\uComponents.6.0.0\lib\net40\uComponents.DataTypes.dll</HintPath>
</Reference>
<Reference Include="umbraco">
<HintPath>..\packages\UmbracoCms.Core.6.2.4\lib\umbraco.dll</HintPath>
</Reference>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions ReferenceWebsiteUmbraco7/App_Browsers/Form.browser
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<browsers>

<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.HtmlControls.HtmlForm"
adapterType="umbraco.presentation.urlRewriter.FormRewriterControlAdapter" />
</controlAdapters>
</browser>

</browsers>
26 changes: 26 additions & 0 deletions ReferenceWebsiteUmbraco7/App_Browsers/w3cvalidator.browser
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<browsers>
<!--
Browser capability file for the w3c validator

sample UA: "W3C_Validator/1.305.2.148 libwww-perl/5.803"
-->
<browser id="w3cValidator" parentID="default">
<identification>
<userAgent match="^W3C_Validator" />
</identification>

<capture>
<userAgent match="^W3C_Validator/(?'version'(?'major'\d+)(?'minor'\.\d+)\w*).*" />
</capture>

<capabilities>
<capability name="browser" value="w3cValidator" />
<capability name="majorversion" value="${major}" />
<capability name="minorversion" value="${minor}" />
<capability name="version" value="${version}" />
<capability name="w3cdomversion" value="1.0" />
<capability name="xml" value="true" />
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
</capabilities>
</browser>
</browsers>
1 change: 1 addition & 0 deletions ReferenceWebsiteUmbraco7/App_Data/access.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<access/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<packages></packages>
1 change: 1 addition & 0 deletions ReferenceWebsiteUmbraco7/App_Plugins/dummy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete.
1 change: 1 addition & 0 deletions ReferenceWebsiteUmbraco7/Global.asax
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %>
44 changes: 44 additions & 0 deletions ReferenceWebsiteUmbraco7/Models/Arrays.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System.Collections.Generic;
using UmbracoVault.Attributes;

namespace ReferenceWebsite.Models
{
[UmbracoEntity(AutoMap = true)]
public class ArraysViewModel : CmsViewModelBase
{
/// <summary>
/// Raw integer arrays are supported using a textstring
/// </summary>
public int[] IntArray { get; set; }

/// <summary>
/// Raw string arrays are supported using a textstring
/// </summary>
public string[] StringArray { get; set; }

/// <summary>
/// Generic content lists are supported.
/// </summary>
public IList<StaffMember> StaffList { get; set; }

/// <summary>
/// This contains the list of Checkbox Values
/// </summary>
public string[] CheckboxList { get; set; }

/// <summary>
/// THis contains the list of Dictionary Picker values
/// </summary>
public string[] DictionaryPicker { get; set; }

/// <summary>
/// List of Integers that correspond to prevalues in the Umbraco DB. Lookup is required to get text values.
/// </summary>
public int[] DropDownListMultiplePublishKeys { get; set; }

/// <summary>
/// List of dropdown values. Publishes the string entry so no lookup is required
/// </summary>
public string[] DropDownListMultiple { get; set; }
}
}
27 changes: 27 additions & 0 deletions ReferenceWebsiteUmbraco7/Models/Blog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using UmbracoVault.Attributes;

namespace ReferenceWebsite.Models
{
[UmbracoMediaEntity(AutoMap = true)]
public class BlogEntryViewModel : CmsViewModelBase
{
public string Title { get; set; }
public DateTime PostDate { get; set; }

[UmbracoRichTextProperty]
public string Content { get; set; }

[UmbracoProperty(Alias = "image")]
public Image PostImage { get; set; }
}

[UmbracoEntity(AutoMap = true)]
public class BlogHomeViewModel : CmsViewModelBase
{
public string Title { get; set; }
public string SidebarCopy { get; set; }
public BlogEntryViewModel FeaturedBlogEntry { get; set; }
}

}
10 changes: 10 additions & 0 deletions ReferenceWebsiteUmbraco7/Models/Breadcrumbs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace ReferenceWebsite.Models
{
public class BreadcrumbsViewModel : CmsViewModelBase
{
}
}
17 changes: 17 additions & 0 deletions ReferenceWebsiteUmbraco7/Models/CmsViewModelBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Umbraco.Core.Models;

namespace ReferenceWebsite.Models
{
public interface ICmsViewModel
{
IPublishedContent CmsContent { get; set; }
}

/// <summary>
/// Base class for view models, provides Umbraco node information
/// </summary>
public class CmsViewModelBase : ICmsViewModel
{
public IPublishedContent CmsContent { get; set; }
}
}
33 changes: 33 additions & 0 deletions ReferenceWebsiteUmbraco7/Models/Enums.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using UmbracoVault.Attributes;

namespace ReferenceWebsite.Models
{
/// <summary>
/// Enum of full month names
/// </summary>
public enum Month
{
January = 1,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
}

/// <summary>
/// Sample model entry showing an enum property
/// </summary>
[UmbracoEntity(AutoMap=true)]
public class EnumsViewModel : CmsViewModelBase
{
[UmbracoEnumProperty]
public Month Month { get; set; }
}
}
13 changes: 13 additions & 0 deletions ReferenceWebsiteUmbraco7/Models/GenericContent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using UmbracoVault.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;

namespace ReferenceWebsite.Models
{
[UmbracoEntity(AutoMap=true)]
public class GenericContentViewModel
{
public string Content { get; set; }
}
}
94 changes: 94 additions & 0 deletions ReferenceWebsiteUmbraco7/Models/NumericPrimitives.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
using UmbracoVault.Attributes;

namespace ReferenceWebsite.Models
{
/// <summary>
/// Vault supports most C# numeric and boolean primitives
/// </summary>
[UmbracoEntity(AutoMap = true)]
public class NumericTypesViewModel : CmsViewModelBase
{
/// <summary>
/// Booleans can be represented by the Umbraco true/false type.
/// </summary>
public bool Bool { get; set; }

/// <summary>
/// Bytes
/// Supported range: 0 to 255
/// </summary>
public byte Byte { get; set; }

/// <summary>
/// Decimals
/// Supported range: -79228162514264337593543950335 to 79228162514264337593543950335
/// </summary>
/// <remarks>Exceeds Umbraco numeric type</remarks>
public decimal Decimal { get; set; }

/// <summary>
/// Doubles
/// Supported range: -1.79769313486232e308 to 1.79769313486232e308
/// </summary>
/// <remarks>Exceeds Umbraco numeric type</remarks>
public double Double { get; set; }

/// <summary>
/// Floats
/// Supported range: -3.402823e38 to 3.402823e38
/// </summary>
public float Float { get; set; }

/// <summary>
/// Ints
/// Supported range: -2,147,483,648 to 2,147,483,647
/// </summary>
public int Int { get; set; }

/// <summary>
/// Longs
/// Supported range: -9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807
/// </summary>
/// <remarks>Exceeds Umbraco numeric type</remarks>
public long Long { get; set; }

/// <summary>
/// Signed Bytes
/// Supported range: -128 to 127
/// </summary>
public sbyte SByte { get; set; }

/// <summary>
/// Shorts
/// Supported range: -32,768 to 32,767
/// </summary>
public short Short { get; set; }

/// <summary>
/// Unsigned Ints
/// Supported range: 0 to 4,294,967,295
/// </summary>
/// <remarks>Exceeds Umbraco numeric type</remarks>
public uint UInt { get; set; }

/// <summary>
/// Unsigned Longs
/// Supported range: 0 to 18,446,744,073,709,551,615
/// </summary>
/// <remarks>Exceeds Umbraco numeric type</remarks>
public ulong ULong { get; set; }

/// <summary>
/// Unsigned Shorts
/// Supported range: 0 to 65,535
/// </summary>
public ushort UShort { get; set; }

/// <summary>
/// Slider property editor
/// Supported range: 0 to 2,147,483,647
/// </summary>
/// <remarks>Slider doesn't support negative values</remarks>
public int Slider { get; set; }
}
}
Loading

0 comments on commit c6e108a

Please sign in to comment.