From 42be2492b5f24199c38ecbd65a521d9df3bddb46 Mon Sep 17 00:00:00 2001 From: "Morten@Thinkpad-X220" Date: Wed, 3 Oct 2012 12:24:50 -0200 Subject: [PATCH] Implements the 16 MacroPropertyTypes from the database U4-946 --- .../Macros/PropertyTypes/ContentAll.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/ContentPicker.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/ContentRandom.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/ContentStubs.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/ContentTree.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/ContentType.cs | 27 +++++++++++++++++++ .../PropertyTypes/ContentTypeMultiple.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/MediaCurrent.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/Number.cs | 27 +++++++++++++++++++ .../PropertyTypes/PropertyTypePicker.cs | 27 +++++++++++++++++++ .../PropertyTypePickerMultiple.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/TabPicker.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/TabPickerMultiple.cs | 27 +++++++++++++++++++ src/Umbraco.Core/Macros/PropertyTypes/Text.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/TextMultiLine.cs | 27 +++++++++++++++++++ .../Macros/PropertyTypes/YesNoBool.cs | 27 +++++++++++++++++++ src/Umbraco.Core/Umbraco.Core.csproj | 16 +++++++++++ 17 files changed, 448 insertions(+) create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/ContentAll.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/ContentPicker.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/ContentRandom.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/ContentStubs.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/ContentTree.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/ContentType.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/ContentTypeMultiple.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/MediaCurrent.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/Number.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePicker.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePickerMultiple.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/TabPicker.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/TabPickerMultiple.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/Text.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/TextMultiLine.cs create mode 100644 src/Umbraco.Core/Macros/PropertyTypes/YesNoBool.cs diff --git a/src/Umbraco.Core/Macros/PropertyTypes/ContentAll.cs b/src/Umbraco.Core/Macros/PropertyTypes/ContentAll.cs new file mode 100644 index 0000000000..a10742aef9 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/ContentAll.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class ContentAll : IMacroPropertyType + { + public string Alias + { + get { return "contentAll"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "content"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/ContentPicker.cs b/src/Umbraco.Core/Macros/PropertyTypes/ContentPicker.cs new file mode 100644 index 0000000000..d3526314d0 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/ContentPicker.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class ContentPicker : IMacroPropertyType + { + public string Alias + { + get { return "contentPicker"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "content"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/ContentRandom.cs b/src/Umbraco.Core/Macros/PropertyTypes/ContentRandom.cs new file mode 100644 index 0000000000..c6aa7a46d5 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/ContentRandom.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class ContentRandom : IMacroPropertyType + { + public string Alias + { + get { return "contentRandom"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "content"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/ContentStubs.cs b/src/Umbraco.Core/Macros/PropertyTypes/ContentStubs.cs new file mode 100644 index 0000000000..2c5889a6f0 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/ContentStubs.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class ContentStubs : IMacroPropertyType + { + public string Alias + { + get { return "contentStubs"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "content"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/ContentTree.cs b/src/Umbraco.Core/Macros/PropertyTypes/ContentTree.cs new file mode 100644 index 0000000000..19be18ebe5 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/ContentTree.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class ContentTree : IMacroPropertyType + { + public string Alias + { + get { return "contentTree"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "content"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/ContentType.cs b/src/Umbraco.Core/Macros/PropertyTypes/ContentType.cs new file mode 100644 index 0000000000..7ebd8862a3 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/ContentType.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class ContentType : IMacroPropertyType + { + public string Alias + { + get { return "contentType"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "contentTypeSingle"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/ContentTypeMultiple.cs b/src/Umbraco.Core/Macros/PropertyTypes/ContentTypeMultiple.cs new file mode 100644 index 0000000000..451d3918de --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/ContentTypeMultiple.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class ContentTypeMultiple : IMacroPropertyType + { + public string Alias + { + get { return "contentTypeMultiple"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "contentTypeMultiple"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/MediaCurrent.cs b/src/Umbraco.Core/Macros/PropertyTypes/MediaCurrent.cs new file mode 100644 index 0000000000..7850ee072a --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/MediaCurrent.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class MediaCurrent : IMacroPropertyType + { + public string Alias + { + get { return "mediaCurrent"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "media"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/Number.cs b/src/Umbraco.Core/Macros/PropertyTypes/Number.cs new file mode 100644 index 0000000000..eab4bf60db --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/Number.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class Number : IMacroPropertyType + { + public string Alias + { + get { return "number"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "numeric"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Int32; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePicker.cs b/src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePicker.cs new file mode 100644 index 0000000000..e1ff10369f --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePicker.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class PropertyTypePicker : IMacroPropertyType + { + public string Alias + { + get { return "propertyTypePicker"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "propertyTypePicker"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.String; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePickerMultiple.cs b/src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePickerMultiple.cs new file mode 100644 index 0000000000..7199faabbd --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/PropertyTypePickerMultiple.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class PropertyTypePickerMultiple : IMacroPropertyType + { + public string Alias + { + get { return "propertyTypePickerMultiple"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "propertyTypePickerMultiple"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.String; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/TabPicker.cs b/src/Umbraco.Core/Macros/PropertyTypes/TabPicker.cs new file mode 100644 index 0000000000..7c8e1d3e45 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/TabPicker.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class TabPicker : IMacroPropertyType + { + public string Alias + { + get { return "tabPicker"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "tabPicker"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.String; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/TabPickerMultiple.cs b/src/Umbraco.Core/Macros/PropertyTypes/TabPickerMultiple.cs new file mode 100644 index 0000000000..7681fccd4f --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/TabPickerMultiple.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class TabPickerMultiple : IMacroPropertyType + { + public string Alias + { + get { return "tabPickerMultiple"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "tabPickerMultiple"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.String; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/Text.cs b/src/Umbraco.Core/Macros/PropertyTypes/Text.cs new file mode 100644 index 0000000000..ddc7fca1a3 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/Text.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class Text : IMacroPropertyType + { + public string Alias + { + get { return "text"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "text"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.String; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/TextMultiLine.cs b/src/Umbraco.Core/Macros/PropertyTypes/TextMultiLine.cs new file mode 100644 index 0000000000..d5eb7cddf8 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/TextMultiLine.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class TextMultiLine : IMacroPropertyType + { + public string Alias + { + get { return "textMultiLine"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "textMultiple"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.String; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Macros/PropertyTypes/YesNoBool.cs b/src/Umbraco.Core/Macros/PropertyTypes/YesNoBool.cs new file mode 100644 index 0000000000..793c3d3659 --- /dev/null +++ b/src/Umbraco.Core/Macros/PropertyTypes/YesNoBool.cs @@ -0,0 +1,27 @@ +using Umbraco.Core.Models; + +namespace Umbraco.Core.Macros.PropertyTypes +{ + public class YesNoBool : IMacroPropertyType + { + public string Alias + { + get { return "bool"; } + } + + public string RenderingAssembly + { + get { return "umbraco.macroRenderings"; } + } + + public string RenderingType + { + get { return "yesNo"; } + } + + public MacroPropertyTypeBaseTypes BaseType + { + get { return MacroPropertyTypeBaseTypes.Boolean; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index cb61131871..37e96b9af6 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -90,7 +90,23 @@ + + + + + + + + + + + + + + + +