DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB
Fixing attributes used by Linq to Umbraco [TFS Changeset #55110]
This commit is contained in:
@@ -63,8 +63,8 @@ namespace umbraco.LinqCore.Mockable.Tests
|
||||
[TestMethod]
|
||||
public void DataContextMockTest_MockProvider()
|
||||
{
|
||||
var dataProvider = MockRepository.GenerateMock<umbracoDataProvider>();
|
||||
using (var ctx = new MyumbracoDataContext(dataProvider))
|
||||
var dataProvider = MockRepository.GenerateMock<UmbracoDataProvider>();
|
||||
using (var ctx = new MyUmbracoDataContext(dataProvider))
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -72,10 +72,10 @@ namespace umbraco.LinqCore.Mockable.Tests
|
||||
[TestMethod, ExpectedException(typeof(NotImplementedException))]
|
||||
public void DataContextMockTest_MockProviderThrowsException()
|
||||
{
|
||||
var dataProvider = MockRepository.GenerateMock<umbracoDataProvider>();
|
||||
var dataProvider = MockRepository.GenerateMock<UmbracoDataProvider>();
|
||||
|
||||
dataProvider.Stub(d => d.LoadTree<CwsHome>()).Throw(new NotImplementedException());
|
||||
using (var ctx = new MyumbracoDataContext(dataProvider))
|
||||
using (var ctx = new MyUmbracoDataContext(dataProvider))
|
||||
{
|
||||
var homes = ctx.CwsHomes;
|
||||
}
|
||||
|
||||
+20
-20
@@ -15,7 +15,7 @@ namespace umbraco.Test
|
||||
using System.Linq;
|
||||
|
||||
|
||||
public partial class MyumbracoDataContext : umbracoDataContext
|
||||
public partial class MyUmbracoDataContext : UmbracoDataContext
|
||||
{
|
||||
|
||||
#region Partials
|
||||
@@ -23,13 +23,13 @@ namespace umbraco.Test
|
||||
#endregion
|
||||
|
||||
|
||||
public MyumbracoDataContext() :
|
||||
public MyUmbracoDataContext() :
|
||||
base()
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
public MyumbracoDataContext(umbracoDataProvider provider) :
|
||||
public MyUmbracoDataContext(UmbracoDataProvider provider) :
|
||||
base(provider)
|
||||
{
|
||||
OnCreated();
|
||||
@@ -175,7 +175,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// The homepage of a Runway website.
|
||||
/// </summary>
|
||||
[UmbracoInfo("RunwayHomepage", Id = 1045)]
|
||||
[UmbracoInfo("RunwayHomepage")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class Runwayhomepage : DocTypeBase
|
||||
@@ -279,7 +279,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// Runway textpage; this is the standard content page for a Runway website.
|
||||
/// </summary>
|
||||
[UmbracoInfo("RunwayTextpage", Id = 1046)]
|
||||
[UmbracoInfo("RunwayTextpage")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class Runwaytextpage : DocTypeBase
|
||||
@@ -367,7 +367,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Content Folder", Id = 1052)]
|
||||
[UmbracoInfo("Content Folder")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class ContentFolder : DocTypeBase
|
||||
@@ -399,7 +399,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Person", Id = 1053)]
|
||||
[UmbracoInfo("Person")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class Person : DocTypeBase
|
||||
@@ -461,7 +461,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Inherited Folder", Id = 1059)]
|
||||
[UmbracoInfo("Inherited Folder")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class InheritedFolder : ContentFolder
|
||||
@@ -475,7 +475,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the contact form document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Contact", Id = 1079)]
|
||||
[UmbracoInfo("CWS_Contact")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsContact : DocTypeBase
|
||||
@@ -937,7 +937,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the email a friend form document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_EmailAFriend", Id = 1080)]
|
||||
[UmbracoInfo("CWS_EmailAFriend")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsEmailafriend : DocTypeBase
|
||||
@@ -1302,7 +1302,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the event document type for your site and lives beneath the News & Events List document type.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_EventItem", Id = 1081)]
|
||||
[UmbracoInfo("CWS_EventItem")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsEventitem : DocTypeBase
|
||||
@@ -1545,7 +1545,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Galleries document type for your site which stores the Gallery document type as children.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_GalleryList", Id = 1082)]
|
||||
[UmbracoInfo("CWS_GalleryList")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsGallerylist : DocTypeBase
|
||||
@@ -1806,7 +1806,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the gallery document type which stores the Photo document type as children.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Gallery", Id = 1083)]
|
||||
[UmbracoInfo("CWS_Gallery")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsGallery : DocTypeBase
|
||||
@@ -2091,7 +2091,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the homepage document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Home", Id = 1084)]
|
||||
[UmbracoInfo("CWS_Home")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsHome : DocTypeBase
|
||||
@@ -2466,7 +2466,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the News & Events List document type for your site which stores the News and Event Item document types as children.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_NewsEventsList", Id = 1085)]
|
||||
[UmbracoInfo("CWS_NewsEventsList")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsNewseventslist : DocTypeBase
|
||||
@@ -2745,7 +2745,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the news document type for your site and lives beneath the News & Events List document type.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_NewsItem", Id = 1086)]
|
||||
[UmbracoInfo("CWS_NewsItem")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsNewsitem : DocTypeBase
|
||||
@@ -2982,7 +2982,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Photo document type for your site and lives beneath the Gallery document type.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Photo", Id = 1087)]
|
||||
[UmbracoInfo("CWS_Photo")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsPhoto : DocTypeBase
|
||||
@@ -3225,7 +3225,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Textpage document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Textpage", Id = 1088)]
|
||||
[UmbracoInfo("CWS_Textpage")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsTextpage : DocTypeBase
|
||||
@@ -3504,7 +3504,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Textpage document type for your site which has two columns.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_TextpageTwoCol", Id = 1089)]
|
||||
[UmbracoInfo("CWS_TextpageTwoCol")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsTextpagetwocol : DocTypeBase
|
||||
@@ -3831,7 +3831,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Textpage (Three Col)", Id = 1119)]
|
||||
[UmbracoInfo("Textpage (Three Col)")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class TextpageThreeCol : CwsTextpagetwocol
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void AncestorTest_NoWhereCondition_Exists()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var textPage = ctx.CwsTextpages.First();
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void AncestorTest_NoWhereCondition_NotExists()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var textPage = ctx.CwsTextpages.First();
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void AncestorTest_Where_Exists()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var photo = ctx.CwsPhotos.First(p => p.Name.Contains("Umbraco"));
|
||||
var gallery = photo.AncestorOrDefault<CwsGallery>(g => g.Name.Contains("Codegarden"));
|
||||
@@ -106,7 +106,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void AncestorTest_Where_NotExists()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var photo = ctx.CwsPhotos.First(p => p.Name.Contains("Umbraco"));
|
||||
var gallery = photo.AncestorOrDefault<CwsGallery>(g => g.Name.Contains("Bookhouses"));
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var hps = ctx.CwsHomes;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var hps = ctx.CwsHomes;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void ChildTest_ChildExist()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var pages = ctx.CwsHomes.First().CwsTextpages;
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void ChildTest_ChildToParent()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var page = ctx.CwsHomes.First().CwsTextpages.First();
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void ChildTest_AllChildren()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var hp = ctx.CwsHomes.First();
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void CwsReplicationTest_ListGalleries()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var galleryList = ctx.CwsGallerylists.First(); //this would really be a Where(g => g.Id == umbracoContext.Current.PageId.Value) but since I'm not really on a page...
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
var nodeProvider = new NodeDataProvider(Path.Combine(Environment.CurrentDirectory, "umbraco.config"));
|
||||
|
||||
MyumbracoDataContext ctx = new MyumbracoDataContext(nodeProvider);
|
||||
MyUmbracoDataContext ctx = new MyUmbracoDataContext(nodeProvider);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -86,7 +86,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
var nodeProvider = new NodeDataProvider(Path.Combine(Environment.CurrentDirectory, "umbraco.config"), true);
|
||||
|
||||
MyumbracoDataContext ctx = new MyumbracoDataContext(nodeProvider);
|
||||
MyUmbracoDataContext ctx = new MyUmbracoDataContext(nodeProvider);
|
||||
|
||||
var hp = ctx.CwsHomes.First();
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
var ctx = new MyumbracoDataContext();
|
||||
var ctx = new MyUmbracoDataContext();
|
||||
|
||||
Assert.IsInstanceOfType(ctx.DataProvider, typeof(NodeDataProvider));
|
||||
}
|
||||
@@ -107,7 +107,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void DataContextTest_NodeCached()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var hp = ctx.CwsHomes.First();
|
||||
var hp2 = ctx.CwsHomes.First();
|
||||
@@ -120,7 +120,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void DataContextTest_FullCache()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var one = ctx.CwsHomes;
|
||||
var two = ctx.CwsHomes;
|
||||
@@ -133,7 +133,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void DataContextTest_OfNodeTypes()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var tree = ctx.CwsHomes;
|
||||
|
||||
|
||||
+20
-20
@@ -15,7 +15,7 @@ namespace umbraco.Test
|
||||
using System.Linq;
|
||||
|
||||
|
||||
public partial class MyumbracoDataContext : umbracoDataContext
|
||||
public partial class MyUmbracoDataContext : UmbracoDataContext
|
||||
{
|
||||
|
||||
#region Partials
|
||||
@@ -23,13 +23,13 @@ namespace umbraco.Test
|
||||
#endregion
|
||||
|
||||
|
||||
public MyumbracoDataContext() :
|
||||
public MyUmbracoDataContext() :
|
||||
base()
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
public MyumbracoDataContext(umbracoDataProvider provider) :
|
||||
public MyUmbracoDataContext(UmbracoDataProvider provider) :
|
||||
base(provider)
|
||||
{
|
||||
OnCreated();
|
||||
@@ -175,7 +175,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// The homepage of a Runway website.
|
||||
/// </summary>
|
||||
[UmbracoInfo("RunwayHomepage", Id = 1045)]
|
||||
[UmbracoInfo("RunwayHomepage")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class Runwayhomepage : DocTypeBase
|
||||
@@ -279,7 +279,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// Runway textpage; this is the standard content page for a Runway website.
|
||||
/// </summary>
|
||||
[UmbracoInfo("RunwayTextpage", Id = 1046)]
|
||||
[UmbracoInfo("RunwayTextpage")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class Runwaytextpage : DocTypeBase
|
||||
@@ -367,7 +367,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Content Folder", Id = 1052)]
|
||||
[UmbracoInfo("Content Folder")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class ContentFolder : DocTypeBase
|
||||
@@ -399,7 +399,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Person", Id = 1053)]
|
||||
[UmbracoInfo("Person")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class Person : DocTypeBase
|
||||
@@ -461,7 +461,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Inherited Folder", Id = 1059)]
|
||||
[UmbracoInfo("Inherited Folder")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class InheritedFolder : ContentFolder
|
||||
@@ -475,7 +475,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the contact form document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Contact", Id = 1079)]
|
||||
[UmbracoInfo("CWS_Contact")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsContact : DocTypeBase
|
||||
@@ -937,7 +937,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the email a friend form document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_EmailAFriend", Id = 1080)]
|
||||
[UmbracoInfo("CWS_EmailAFriend")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsEmailafriend : DocTypeBase
|
||||
@@ -1302,7 +1302,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the event document type for your site and lives beneath the News & Events List document type.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_EventItem", Id = 1081)]
|
||||
[UmbracoInfo("CWS_EventItem")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsEventitem : DocTypeBase
|
||||
@@ -1545,7 +1545,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Galleries document type for your site which stores the Gallery document type as children.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_GalleryList", Id = 1082)]
|
||||
[UmbracoInfo("CWS_GalleryList")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsGallerylist : DocTypeBase
|
||||
@@ -1806,7 +1806,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the gallery document type which stores the Photo document type as children.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Gallery", Id = 1083)]
|
||||
[UmbracoInfo("CWS_Gallery")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsGallery : DocTypeBase
|
||||
@@ -2091,7 +2091,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the homepage document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Home", Id = 1084)]
|
||||
[UmbracoInfo("CWS_Home")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsHome : DocTypeBase
|
||||
@@ -2466,7 +2466,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the News & Events List document type for your site which stores the News and Event Item document types as children.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_NewsEventsList", Id = 1085)]
|
||||
[UmbracoInfo("CWS_NewsEventsList")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsNewseventslist : DocTypeBase
|
||||
@@ -2745,7 +2745,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the news document type for your site and lives beneath the News & Events List document type.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_NewsItem", Id = 1086)]
|
||||
[UmbracoInfo("CWS_NewsItem")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsNewsitem : DocTypeBase
|
||||
@@ -2982,7 +2982,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Photo document type for your site and lives beneath the Gallery document type.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Photo", Id = 1087)]
|
||||
[UmbracoInfo("CWS_Photo")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsPhoto : DocTypeBase
|
||||
@@ -3225,7 +3225,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Textpage document type for your site.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_Textpage", Id = 1088)]
|
||||
[UmbracoInfo("CWS_Textpage")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsTextpage : DocTypeBase
|
||||
@@ -3504,7 +3504,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
/// This is the Textpage document type for your site which has two columns.
|
||||
/// </summary>
|
||||
[UmbracoInfo("CWS_TextpageTwoCol", Id = 1089)]
|
||||
[UmbracoInfo("CWS_TextpageTwoCol")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class CwsTextpagetwocol : DocTypeBase
|
||||
@@ -3831,7 +3831,7 @@ namespace umbraco.Test
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[UmbracoInfo("Textpage (Three Col)", Id = 1119)]
|
||||
[UmbracoInfo("Textpage (Three Col)")]
|
||||
[System.Runtime.Serialization.DataContractAttribute()]
|
||||
[DocType()]
|
||||
public partial class TextpageThreeCol : CwsTextpagetwocol
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var orderedContext = new MyumbracoDataContext())
|
||||
using (var orderedContext = new MyUmbracoDataContext())
|
||||
{
|
||||
var asc = orderedContext.CwsTextpages.OrderBy(p => p.CreateDate);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void ParentTest_ParentIdExists()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var p = ctx.CwsTextpages.First();
|
||||
Assert.AreNotEqual(0, p.ParentNodeId);
|
||||
@@ -73,7 +73,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void ParentTest_ParentCreated()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var page = ctx.CwsTextpages.Single(p => p.Id == 1099);
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void ParentTest_TopParentNull()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var hp = ctx.CwsHomes.First();
|
||||
Assert.IsNull(hp.Parent<CwsHome>());
|
||||
@@ -100,7 +100,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void ParentTest_InvalidParentType()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var p = ctx.CwsPhotos.First().Parent<CwsHome>();
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var homePages = from hp in ctx.CwsHomes
|
||||
select hp;
|
||||
@@ -84,7 +84,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var homePages = ctx.CwsHomes;
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var homePageText = from hp in ctx.CwsHomes
|
||||
select hp.Bodytext;
|
||||
@@ -119,7 +119,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var homePageText = ctx.CwsHomes.Select(hp => hp.Bodytext);
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var anon = from hp in ctx.CwsHomes
|
||||
select new
|
||||
@@ -159,7 +159,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var anon = ctx.CwsHomes.Select(hp => new
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var pages = from page in ctx.CwsTextpages
|
||||
where page.Bodytext.Length > 0
|
||||
@@ -82,7 +82,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var pages = from page in ctx.CwsTextpages
|
||||
where page.CreateDate > DateTime.MinValue
|
||||
@@ -97,7 +97,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void WhereTest_TwoParameter_Query()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var pages = from page in ctx.CwsTextpages
|
||||
where page.Bodytext.Length > 0
|
||||
@@ -113,7 +113,7 @@ namespace umbraco.Linq.Core.Tests
|
||||
public void WhereTest_ToAnonymous()
|
||||
{
|
||||
MockHelpers.SetupFakeHttpContext();
|
||||
using (var ctx = new MyumbracoDataContext())
|
||||
using (var ctx = new MyUmbracoDataContext())
|
||||
{
|
||||
var pages = from page in ctx.CwsTextpages
|
||||
where page.Bodytext.Length > 0
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace umbraco.Linq.Core
|
||||
public sealed class UmbracoInfoAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="umbracoInfoAttribute"/> class.
|
||||
/// Initializes a new instance of the <see cref="UmbracoInfoAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="alias">The alias for this piece of umbraco info.</param>
|
||||
public UmbracoInfoAttribute(string alias)
|
||||
@@ -32,11 +32,7 @@ namespace umbraco.Linq.Core
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if mandatory; otherwise, <c>false</c>.</value>
|
||||
public bool Mandatory { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the DocumentTypeId
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
public int Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace umbraco.Linq.Core
|
||||
}
|
||||
}
|
||||
|
||||
internal umbracoDataProvider Provider { get; set; }
|
||||
internal UmbracoDataProvider Provider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance has been modified since it was first loaded
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace umbraco.Linq.Core
|
||||
/// Gets the <see cref="umbracoDataProvider"/> Provider associated with this instance
|
||||
/// </summary>
|
||||
/// <value>The provider.</value>
|
||||
umbracoDataProvider Provider { get; }
|
||||
UmbracoDataProvider Provider { get; }
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is read only.
|
||||
/// </summary>
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace umbraco.Linq.Core.Node
|
||||
/// Gets or sets the DataProvider associated with this Tree
|
||||
/// </summary>
|
||||
/// <value>The provider.</value>
|
||||
public override umbracoDataProvider Provider { get; protected set; }
|
||||
public override UmbracoDataProvider Provider { get; protected set; }
|
||||
|
||||
public override void ReloadCache()
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace umbraco.Linq.Core.Node
|
||||
///
|
||||
/// The <see cref="umbraco.Linq.Core.Node.NodeDataProvider"/> is capable of reading the XML cache from either the path provided in the umbraco settings or from a specified location on the file system.
|
||||
/// </remarks>
|
||||
public sealed class NodeDataProvider : umbracoDataProvider
|
||||
public sealed class NodeDataProvider : UmbracoDataProvider
|
||||
{
|
||||
private string _xmlPath;
|
||||
private Dictionary<UmbracoInfoAttribute, ITree> _trees;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace umbraco.Linq.Core.Node
|
||||
/// Gets or sets the provider.
|
||||
/// </summary>
|
||||
/// <value>The provider.</value>
|
||||
public override umbracoDataProvider Provider
|
||||
public override UmbracoDataProvider Provider
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace umbraco.Linq.Core
|
||||
/// Gets the <see cref="umbracoDataProvider"/> Provider associated with this instance
|
||||
/// </summary>
|
||||
/// <value>The provider.</value>
|
||||
public abstract umbracoDataProvider Provider { get; protected set; }
|
||||
public abstract UmbracoDataProvider Provider { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is read only. The collection is not ReadOnly by default
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace umbraco.Linq.Core
|
||||
/// <summary>
|
||||
/// The umbracoDataContext which handles the interaction with an <see cref="umbracoDataProvider"/>
|
||||
/// </summary>
|
||||
public abstract class umbracoDataContext : IDisposable
|
||||
public abstract class UmbracoDataContext : IDisposable
|
||||
{
|
||||
#region Privates
|
||||
private umbracoDataProvider _dataProvider;
|
||||
private UmbracoDataProvider _dataProvider;
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
@@ -33,7 +33,7 @@ namespace umbraco.Linq.Core
|
||||
/// Gets the data provider.
|
||||
/// </summary>
|
||||
/// <value>The data provider.</value>
|
||||
public umbracoDataProvider DataProvider
|
||||
public UmbracoDataProvider DataProvider
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -46,7 +46,7 @@ namespace umbraco.Linq.Core
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="umbracoDataContext"/> class, using a <see cref="umbraco.Linq.Core.Node.NodeDataProvider"/> data provider with the connection string from the umbraco config
|
||||
/// </summary>
|
||||
protected umbracoDataContext() : this(new NodeDataProvider())
|
||||
protected UmbracoDataContext() : this(new NodeDataProvider())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace umbraco.Linq.Core
|
||||
/// Initializes a new instance of the <see cref="umbracoDataContext"/> class.
|
||||
/// </summary>
|
||||
/// <param name="dataProvider">The data provider to use within the DataContext.</param>
|
||||
protected umbracoDataContext(umbracoDataProvider dataProvider)
|
||||
protected UmbracoDataContext(UmbracoDataProvider dataProvider)
|
||||
{
|
||||
this._dataProvider = dataProvider;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace umbraco.Linq.Core
|
||||
///
|
||||
/// It provides abstractions for all the useful operations of the DataProvider
|
||||
/// </remarks>
|
||||
public abstract class umbracoDataProvider : IDisposable
|
||||
public abstract class UmbracoDataProvider : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name of the provider
|
||||
|
||||
@@ -317,9 +317,9 @@ namespace umbraco.Linq.DTMetal.CodeBuilder
|
||||
//create the custom attribute
|
||||
CodeAttributeDeclarationCollection classAttributes = new CodeAttributeDeclarationCollection(
|
||||
new CodeAttributeDeclaration[] {
|
||||
new CodeAttributeDeclaration("umbracoInfo",
|
||||
new CodeAttributeArgument(new CodePrimitiveExpression(docType.Alias)),
|
||||
new CodeAttributeArgument("Id", new CodePrimitiveExpression(docType.Id))),
|
||||
new CodeAttributeDeclaration("UmbracoInfo",
|
||||
new CodeAttributeArgument(new CodePrimitiveExpression(docType.Alias))
|
||||
),
|
||||
new CodeAttributeDeclaration(new CodeTypeReference(typeof(DataContractAttribute))),
|
||||
new CodeAttributeDeclaration("DocType")
|
||||
});
|
||||
@@ -588,7 +588,7 @@ namespace umbraco.Linq.DTMetal.CodeBuilder
|
||||
{
|
||||
List<CodeAttributeDeclaration> attrs = new List<CodeAttributeDeclaration>();
|
||||
|
||||
CodeAttributeDeclaration umbInfoAtt = new CodeAttributeDeclaration("umbracoInfo",
|
||||
CodeAttributeDeclaration umbInfoAtt = new CodeAttributeDeclaration("UmbracoInfo",
|
||||
new CodeAttributeArgument(new CodePrimitiveExpression(docTypeProperty.Alias)),
|
||||
new CodeAttributeArgument("DisplayName", new CodePrimitiveExpression(docTypeProperty.Name)),
|
||||
new CodeAttributeArgument("Mandatory", new CodePrimitiveExpression(docTypeProperty.Mandatory))
|
||||
|
||||
Reference in New Issue
Block a user