Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e8b320d7b4 |
@@ -1,4 +1,4 @@
|
|||||||
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/blob/dev-v8/.github/V8_GETTING_STARTED.md) to go to the v8 branch_
|
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/blob/temp8/.github/V8_GETTING_STARTED.md) to go to the v8 branch_
|
||||||
# Contributing to Umbraco CMS
|
# Contributing to Umbraco CMS
|
||||||
|
|
||||||
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
|
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
|
||||||
@@ -16,7 +16,7 @@ This document gives you a quick overview on how to get started, we will link to
|
|||||||
|
|
||||||
## Guidelines for contributions we welcome
|
## Guidelines for contributions we welcome
|
||||||
|
|
||||||
Not all changes are wanted, so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valuable time.
|
Not all changes are wanted, so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valueable time.
|
||||||
|
|
||||||
We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md). Make sure to talk to us before making large changes.
|
We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md). Make sure to talk to us before making large changes.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
[](https://ci.appveyor.com/project/Umbraco/umbraco-cms-b2cri/branch/dev-v7)
|
[](https://ci.appveyor.com/project/Umbraco/umbraco-cms-b2cri/branch/dev-v7)
|
||||||
[](https://pullreminders.com?ref=badge)
|
|
||||||
|
|
||||||
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/tree/temp8) to go to the v8 branch_
|
_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/tree/temp8) to go to the v8 branch_
|
||||||
|
|
||||||
|
|||||||
@@ -135,9 +135,7 @@ function Get-UmbracoBuildEnv
|
|||||||
$vsPath = ""
|
$vsPath = ""
|
||||||
$vsVer = ""
|
$vsVer = ""
|
||||||
$msBuild = $null
|
$msBuild = $null
|
||||||
$params = @()
|
&$vswhere | foreach {
|
||||||
$params += "-prerelease"
|
|
||||||
&$vswhere @params | foreach {
|
|
||||||
if ($_.StartsWith("installationPath:")) { $vsPath = $_.SubString("installationPath:".Length).Trim() }
|
if ($_.StartsWith("installationPath:")) { $vsPath = $_.SubString("installationPath:".Length).Trim() }
|
||||||
if ($_.StartsWith("installationVersion:")) { $vsVer = $_.SubString("installationVersion:".Length).Trim() }
|
if ($_.StartsWith("installationVersion:")) { $vsVer = $_.SubString("installationVersion:".Length).Trim() }
|
||||||
}
|
}
|
||||||
@@ -146,10 +144,7 @@ function Get-UmbracoBuildEnv
|
|||||||
$vsVerParts = $vsVer.Split('.')
|
$vsVerParts = $vsVer.Split('.')
|
||||||
$vsMajor = [int]::Parse($vsVerParts[0])
|
$vsMajor = [int]::Parse($vsVerParts[0])
|
||||||
$vsMinor = [int]::Parse($vsVerParts[1])
|
$vsMinor = [int]::Parse($vsVerParts[1])
|
||||||
if ($vsMajor -eq 16) {
|
if ($vsMajor -eq 15) {
|
||||||
$msBuild = "$vsPath\MSBuild\Current\Bin"
|
|
||||||
}
|
|
||||||
elseif ($vsMajor -eq 15) {
|
|
||||||
$msBuild = "$vsPath\MSBuild\$vsMajor.0\Bin"
|
$msBuild = "$vsPath\MSBuild\$vsMajor.0\Bin"
|
||||||
}
|
}
|
||||||
elseif ($vsMajor -eq 14) {
|
elseif ($vsMajor -eq 14) {
|
||||||
|
|||||||
@@ -195,10 +195,6 @@ function Compile-Umbraco
|
|||||||
{
|
{
|
||||||
$toolsVersion = "15.0"
|
$toolsVersion = "15.0"
|
||||||
}
|
}
|
||||||
if ($uenv.VisualStudio.Major -eq 16)
|
|
||||||
{
|
|
||||||
$toolsVersion = "Current"
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host ">> Compile Umbraco"
|
Write-Host ">> Compile Umbraco"
|
||||||
Write-Host "Logging to $tmp\msbuild.umbraco.log"
|
Write-Host "Logging to $tmp\msbuild.umbraco.log"
|
||||||
|
|||||||
@@ -1,116 +1,107 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata minClientVersion="3.4.4">
|
<metadata minClientVersion="3.4.4">
|
||||||
<id>UmbracoCms.Core</id>
|
<id>UmbracoCms.Core</id>
|
||||||
<version>7.0.0</version>
|
<version>7.0.0</version>
|
||||||
<title>Umbraco Cms Core Binaries</title>
|
<title>Umbraco Cms Core Binaries</title>
|
||||||
<authors>Umbraco HQ</authors>
|
<authors>Umbraco HQ</authors>
|
||||||
<owners>Umbraco HQ</owners>
|
<owners>Umbraco HQ</owners>
|
||||||
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
||||||
<projectUrl>http://umbraco.com/</projectUrl>
|
<projectUrl>http://umbraco.com/</projectUrl>
|
||||||
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<description>Contains the core assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms-package to setup Umbraco in Visual Studio as an ASP.NET project.</description>
|
<description>Contains the core assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms-package to setup Umbraco in Visual Studio as an ASP.NET project.</description>
|
||||||
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
|
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
|
||||||
<language>en-US</language>
|
<language>en-US</language>
|
||||||
<tags>umbraco</tags>
|
<tags>umbraco</tags>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<group targetFramework="net452">
|
<dependency id="log4net" version="[2.0.8,3.0.0)" />
|
||||||
<dependency id="log4net" version="[2.0.8, 3.0.0)" />
|
<dependency id="Log4Net.Async" version="[2.0.4,3.0.0)" />
|
||||||
<dependency id="Log4Net.Async" version="[2.0.4, 3.0.0)" />
|
<dependency id="Microsoft.AspNet.Mvc" version="[5.2.3,6.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.Mvc" version="[5.2.7, 6.0.0)" />
|
<dependency id="Microsoft.AspNet.WebApi" version="[5.2.3,6.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.WebApi" version="[5.2.7, 6.0.0)" />
|
<dependency id="Microsoft.AspNet.Identity.Owin" version="[2.2.1, 3.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.Identity.Owin" version="[2.2.2, 3.0.0)" />
|
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.2.1, 3.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.4.1, 3.0.0)" />
|
<dependency id="Microsoft.Owin.Security.Cookies" version="[3.1.0, 4.0.0)" />
|
||||||
<dependency id="Microsoft.Owin.Security.Cookies" version="[4.0.1, 5.0.0)" />
|
<dependency id="Microsoft.Owin.Security.OAuth" version="[3.1.0, 4.0.0)" />
|
||||||
<dependency id="Microsoft.Owin.Security.OAuth" version="[4.0.1, 5.0.0)" />
|
<dependency id="Microsoft.Owin.Host.SystemWeb" version="[3.1.0, 4.0.0)" />
|
||||||
<dependency id="Microsoft.Owin.Host.SystemWeb" version="[4.0.1, 5.0.0)" />
|
<dependency id="MiniProfiler" version="[2.1.0, 3.0.0)" />
|
||||||
<dependency id="MiniProfiler" version="[2.1.0, 3.0.0)" />
|
<dependency id="HtmlAgilityPack" version="[1.4.9.5, 2.0.0)" />
|
||||||
<dependency id="HtmlAgilityPack" version="[1.8.8, 2.0.0)" />
|
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
|
||||||
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
|
<dependency id="MySql.Data" version="[6.9.9, 7.0.0)" />
|
||||||
<dependency id="MySql.Data" version="[6.9.9, 7.0.0)" />
|
<dependency id="ClientDependency" version="[1.9.7, 2.0.0)" />
|
||||||
<dependency id="ClientDependency" version="[1.9.7, 2.0.0)" />
|
<dependency id="ClientDependency-Mvc5" version="[1.8.0.0, 2.0.0)" />
|
||||||
<dependency id="ClientDependency-Mvc5" version="[1.8.0.0, 2.0.0)" />
|
<dependency id="AutoMapper" version="[3.3.1, 4.0.0)" />
|
||||||
<dependency id="AutoMapper" version="[3.3.1, 4.0.0)" />
|
<dependency id="Newtonsoft.Json" version="[10.0.2, 11.0.0)" />
|
||||||
<dependency id="Newtonsoft.Json" version="[12.0.2, 13.0.0)" />
|
<dependency id="Examine" version="[0.1.89, 1.0.0)" />
|
||||||
<dependency id="Examine" version="[0.1.90, 1.0.0)" />
|
<dependency id="ImageProcessor" version="[2.5.6, 3.0.0)" />
|
||||||
<dependency id="ImageProcessor" version="[2.7.0.100, 3.0.0)" />
|
<dependency id="ImageProcessor.Web" version="[4.8.7, 5.0.0)" />
|
||||||
<dependency id="ImageProcessor.Web" version="[4.10.0.100, 5.0.0)" />
|
<dependency id="semver" version="[1.1.2, 3.0.0)" />
|
||||||
<dependency id="semver" version="[1.1.2, 3.0.0)" />
|
<!-- Markdown can not be updated due to: https://github.com/hey-red/markdownsharp/issues/71#issuecomment-233585487 -->
|
||||||
<!-- Markdown can not be updated due to: https://github.com/hey-red/markdownsharp/issues/71#issuecomment-233585487 -->
|
<dependency id="Markdown" version="[1.14.7, 2.0.0)" />
|
||||||
<dependency id="Markdown" version="[1.14.7, 2.0.0)" />
|
<dependency id="System.Threading.Tasks.Dataflow" version="[4.7.0, 5.0.0)" />
|
||||||
<dependency id="System.Threading.Tasks.Dataflow" version="[4.9.0, 5.0.0)" />
|
<dependency id="System.ValueTuple" version="[4.4.0, 5.0.0)" />
|
||||||
<dependency id="System.ValueTuple" version="[4.5.0, 5.0.0)" />
|
</dependencies>
|
||||||
</group>
|
</metadata>
|
||||||
</dependencies>
|
<files>
|
||||||
<frameworkAssemblies>
|
<file src="$BuildTmp$\WebApp\bin\businesslogic.dll" target="lib\net45\businesslogic.dll" />
|
||||||
<frameworkAssembly assemblyName="System.Configuration" targetFramework="net452" />
|
<file src="$BuildTmp$\WebApp\bin\businesslogic.xml" target="lib\net45\businesslogic.xml" />
|
||||||
<frameworkAssembly assemblyName="System.IO.Compression.FileSystem" targetFramework="net452" />
|
<file src="$BuildTmp$\WebApp\bin\cms.dll" target="lib\net45\cms.dll" />
|
||||||
<frameworkAssembly assemblyName="System.Web" targetFramework="net452" />
|
<file src="$BuildTmp$\WebApp\bin\cms.xml" target="lib\net45\cms.xml" />
|
||||||
<frameworkAssembly assemblyName="System.Net.Http" targetFramework="net452" />
|
<file src="$BuildTmp$\WebApp\bin\controls.dll" target="lib\net45\controls.dll" />
|
||||||
<frameworkAssembly assemblyName="System.Drawing" targetFramework="net452" />
|
<file src="$BuildTmp$\WebApp\bin\controls.xml" target="lib\net45\controls.xml" />
|
||||||
</frameworkAssemblies>
|
<file src="$BuildTmp$\WebApp\bin\interfaces.dll" target="lib\net45\interfaces.dll" />
|
||||||
</metadata>
|
<file src="$BuildTmp$\WebApp\bin\interfaces.xml" target="lib\net45\interfaces.xml" />
|
||||||
<files>
|
<file src="$BuildTmp$\WebApp\bin\log4net.dll" target="lib\net45\log4net.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\businesslogic.dll" target="lib\net452\businesslogic.dll" />
|
<file src="$BuildTmp$\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\net45\Microsoft.ApplicationBlocks.Data.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\businesslogic.xml" target="lib\net452\businesslogic.xml" />
|
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.dll" target="lib\net45\SQLCE4Umbraco.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\cms.dll" target="lib\net452\cms.dll" />
|
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.xml" target="lib\net45\SQLCE4Umbraco.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\cms.xml" target="lib\net452\cms.xml" />
|
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\net45\System.Data.SqlServerCe.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\controls.dll" target="lib\net452\controls.dll" />
|
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\net45\System.Data.SqlServerCe.Entity.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\controls.xml" target="lib\net452\controls.xml" />
|
<file src="$BuildTmp$\WebApp\bin\TidyNet.dll" target="lib\net45\TidyNet.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\interfaces.dll" target="lib\net452\interfaces.dll" />
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.dll" target="lib\net45\Umbraco.Core.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\interfaces.xml" target="lib\net452\interfaces.xml" />
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.xml" target="lib\net45\Umbraco.Core.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\log4net.dll" target="lib\net452\log4net.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.dll" target="lib\net45\umbraco.DataLayer.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\net452\Microsoft.ApplicationBlocks.Data.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.xml" target="lib\net45\umbraco.DataLayer.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.dll" target="lib\net452\SQLCE4Umbraco.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.dll" target="lib\net45\umbraco.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\SQLCE4Umbraco.xml" target="lib\net452\SQLCE4Umbraco.xml" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.xml" target="lib\net45\umbraco.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\net452\System.Data.SqlServerCe.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.dll" target="lib\net45\umbraco.editorControls.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\net452\System.Data.SqlServerCe.Entity.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.xml" target="lib\net45\umbraco.editorControls.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\TidyNet.dll" target="lib\net452\TidyNet.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.dll" target="lib\net45\umbraco.MacroEngines.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.dll" target="lib\net452\Umbraco.Core.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.xml" target="lib\net45\umbraco.MacroEngines.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Core.xml" target="lib\net452\Umbraco.Core.xml" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.dll" target="lib\net45\umbraco.providers.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.dll" target="lib\net452\umbraco.DataLayer.dll" />
|
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.xml" target="lib\net45\umbraco.providers.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.DataLayer.xml" target="lib\net452\umbraco.DataLayer.xml" />
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.dll" target="lib\net45\Umbraco.Web.UI.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.dll" target="lib\net452\umbraco.dll" />
|
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.xml" target="lib\net45\Umbraco.Web.UI.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.xml" target="lib\net452\umbraco.xml" />
|
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.dll" target="lib\net45\UmbracoExamine.dll" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.dll" target="lib\net452\umbraco.editorControls.dll" />
|
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.xml" target="lib\net45\UmbracoExamine.xml" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.editorControls.xml" target="lib\net452\umbraco.editorControls.xml" />
|
<file src="tools\install.core.ps1" target="tools\install.ps1" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.dll" target="lib\net452\umbraco.MacroEngines.dll" />
|
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.MacroEngines.xml" target="lib\net452\umbraco.MacroEngines.xml" />
|
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.dll" target="lib\net452\umbraco.providers.dll" />
|
|
||||||
<file src="$BuildTmp$\WebApp\bin\umbraco.providers.xml" target="lib\net452\umbraco.providers.xml" />
|
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.dll" target="lib\net452\Umbraco.Web.UI.dll" />
|
|
||||||
<file src="$BuildTmp$\WebApp\bin\Umbraco.Web.UI.xml" target="lib\net452\Umbraco.Web.UI.xml" />
|
|
||||||
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.dll" target="lib\net452\UmbracoExamine.dll" />
|
|
||||||
<file src="$BuildTmp$\WebApp\bin\UmbracoExamine.xml" target="lib\net452\UmbracoExamine.xml" />
|
|
||||||
<file src="tools\install.core.ps1" target="tools\install.ps1" />
|
|
||||||
|
|
||||||
<!-- Added to be able to produce a symbols package -->
|
<!-- Added to be able to produce a symbols package -->
|
||||||
<file src="$BuildTmp$\bin\SQLCE4Umbraco.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\SQLCE4Umbraco.pdb" target="lib" />
|
||||||
<file src="..\..\src\SQLCE4Umbraco\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\SQLCE4Umbraco" />
|
<file src="..\..\src\SQLCE4Umbraco\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\SQLCE4Umbraco" />
|
||||||
<file src="$BuildTmp$\bin\businesslogic.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\businesslogic.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.businesslogic\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.businesslogic" />
|
<file src="..\..\src\umbraco.businesslogic\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.businesslogic" />
|
||||||
<file src="$BuildTmp$\bin\cms.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\cms.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.cms\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.cms" />
|
<file src="..\..\src\umbraco.cms\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.cms" />
|
||||||
<file src="$BuildTmp$\bin\controls.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\controls.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.controls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.controls" />
|
<file src="..\..\src\umbraco.controls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.controls" />
|
||||||
<file src="$BuildTmp$\bin\interfaces.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\interfaces.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.interfaces\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.interfaces" />
|
<file src="..\..\src\umbraco.interfaces\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.interfaces" />
|
||||||
<file src="$BuildTmp$\bin\Umbraco.Core.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\Umbraco.Core.pdb" target="lib" />
|
||||||
<file src="..\..\src\Umbraco.Core\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Core" />
|
<file src="..\..\src\Umbraco.Core\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Core" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.DataLayer.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.DataLayer.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.datalayer\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.datalayer" />
|
<file src="..\..\src\umbraco.datalayer\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.datalayer" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.editorControls.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.editorControls.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.editorControls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.editorControls" />
|
<file src="..\..\src\umbraco.editorControls\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.editorControls" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.MacroEngines.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.MacroEngines.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.MacroEngines\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.MacroEngines" />
|
<file src="..\..\src\umbraco.MacroEngines\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.MacroEngines" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.providers.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.providers.pdb" target="lib" />
|
||||||
<file src="..\..\src\umbraco.providers\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.providers" />
|
<file src="..\..\src\umbraco.providers\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\umbraco.providers" />
|
||||||
<file src="$BuildTmp$\bin\umbraco.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\umbraco.pdb" target="lib" />
|
||||||
<file src="..\..\src\Umbraco.Web\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web" />
|
<file src="..\..\src\Umbraco.Web\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web" />
|
||||||
<file src="$BuildTmp$\bin\Umbraco.Web.UI.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\Umbraco.Web.UI.pdb" target="lib" />
|
||||||
<file src="..\..\src\Umbraco.Web.UI\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web.UI" />
|
<file src="..\..\src\Umbraco.Web.UI\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\Umbraco.Web.UI" />
|
||||||
<file src="$BuildTmp$\bin\UmbracoExamine.pdb" target="lib" />
|
<file src="$BuildTmp$\bin\UmbracoExamine.pdb" target="lib" />
|
||||||
<file src="..\..\src\UmbracoExamine\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\UmbracoExamine" />
|
<file src="..\..\src\UmbracoExamine\**\*.cs" exclude="..\..\src\**\TemporaryGeneratedFile*.cs" target="src\UmbracoExamine" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
|
|||||||
@@ -1,56 +1,54 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata minClientVersion="3.4.4">
|
<metadata minClientVersion="3.4.4">
|
||||||
<id>UmbracoCms</id>
|
<id>UmbracoCms</id>
|
||||||
<version>7.0.0</version>
|
<version>7.0.0</version>
|
||||||
<title>Umbraco Cms</title>
|
<title>Umbraco Cms</title>
|
||||||
<authors>Umbraco HQ</authors>
|
<authors>Umbraco HQ</authors>
|
||||||
<owners>Umbraco HQ</owners>
|
<owners>Umbraco HQ</owners>
|
||||||
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
||||||
<projectUrl>http://umbraco.com/</projectUrl>
|
<projectUrl>http://umbraco.com/</projectUrl>
|
||||||
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<description>Installs Umbraco Cms in your Visual Studio ASP.NET project</description>
|
<description>Installs Umbraco Cms in your Visual Studio ASP.NET project</description>
|
||||||
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET project</summary>
|
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET project</summary>
|
||||||
<language>en-US</language>
|
<language>en-US</language>
|
||||||
<tags>umbraco</tags>
|
<tags>umbraco</tags>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<group targetFramework="net452">
|
<dependency id="UmbracoCms.Core" version="[$version$]" />
|
||||||
<dependency id="UmbracoCms.Core" version="[$version$]" />
|
<dependency id="Newtonsoft.Json" version="[10.0.2, 11.0.0)" />
|
||||||
<dependency id="Newtonsoft.Json" version="[12.0.2, 13.0.0)" />
|
<dependency id="Umbraco.ModelsBuilder" version="[3.0.10, 4.0.0)" />
|
||||||
<dependency id="Umbraco.ModelsBuilder" version="[3.0.10, 4.0.0)" />
|
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.2.1, 3.0.0)" />
|
||||||
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.4.1, 3.0.0)" />
|
<dependency id="ImageProcessor.Web.Config" version="[2.3.1, 3.0.0)" />
|
||||||
<dependency id="ImageProcessor.Web.Config" version="[2.5.0.100, 3.0.0)" />
|
<dependency id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="[2.0.0, 3.0.0)" />
|
||||||
<dependency id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="[2.0.1, 3.0.0)" />
|
</dependencies>
|
||||||
</group>
|
</metadata>
|
||||||
</dependencies>
|
<files>
|
||||||
</metadata>
|
<file src="$BuildTmp$\Configs\**" target="Content\Config" exclude="$BuildTmp$\Configs\Web.config.transform" />
|
||||||
<files>
|
<file src="$BuildTmp$\WebApp\Views\**" target="Content\Views" exclude="$BuildTmp$\WebApp\Views\Web.config" />
|
||||||
<file src="$BuildTmp$\Configs\**" target="Content\Config" exclude="$BuildTmp$\Configs\Web.config.transform" />
|
<file src="$BuildTmp$\WebApp\default.aspx" target="Content\default.aspx" />
|
||||||
<file src="$BuildTmp$\WebApp\Views\**" target="Content\Views" exclude="$BuildTmp$\WebApp\Views\Web.config" />
|
<file src="$BuildTmp$\WebApp\Global.asax" target="Content\Global.asax" />
|
||||||
<file src="$BuildTmp$\WebApp\default.aspx" target="Content\default.aspx" />
|
<file src="$BuildTmp$\WebApp\Web.config" target="UmbracoFiles\Web.config" />
|
||||||
<file src="$BuildTmp$\WebApp\Global.asax" target="Content\Global.asax" />
|
<file src="$BuildTmp$\WebApp\App_Browsers\**" target="UmbracoFiles\App_Browsers" />
|
||||||
<file src="$BuildTmp$\WebApp\Web.config" target="UmbracoFiles\Web.config" />
|
<file src="$BuildTmp$\WebApp\bin\amd64\**" target="UmbracoFiles\bin\amd64" />
|
||||||
<file src="$BuildTmp$\WebApp\App_Browsers\**" target="UmbracoFiles\App_Browsers" />
|
<file src="$BuildTmp$\WebApp\bin\x86\**" target="UmbracoFiles\bin\x86" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\amd64\**" target="UmbracoFiles\bin\amd64" />
|
<file src="$BuildTmp$\WebApp\config\splashes\**" target="UmbracoFiles\Config\splashes" />
|
||||||
<file src="$BuildTmp$\WebApp\bin\x86\**" target="UmbracoFiles\bin\x86" />
|
<file src="$BuildTmp$\WebApp\config\BackOfficeTours\**" target="Content\Config\BackOfficeTours" />
|
||||||
<file src="$BuildTmp$\WebApp\config\splashes\**" target="UmbracoFiles\Config\splashes" />
|
<file src="$BuildTmp$\WebApp\umbraco\**" target="UmbracoFiles\umbraco" />
|
||||||
<file src="$BuildTmp$\WebApp\config\BackOfficeTours\**" target="Content\Config\BackOfficeTours" />
|
<file src="$BuildTmp$\WebApp\umbraco_client\**" target="UmbracoFiles\umbraco_client" />
|
||||||
<file src="$BuildTmp$\WebApp\umbraco\**" target="UmbracoFiles\umbraco" />
|
<file src="$BuildTmp$\WebApp\Media\Web.config" target="Content\Media\Web.config" />
|
||||||
<file src="$BuildTmp$\WebApp\umbraco_client\**" target="UmbracoFiles\umbraco_client" />
|
<file src="tools\install.ps1" target="tools\install.ps1" />
|
||||||
<file src="$BuildTmp$\WebApp\Media\Web.config" target="Content\Media\Web.config" />
|
<file src="tools\Readme.txt" target="tools\Readme.txt" />
|
||||||
<file src="tools\install.ps1" target="tools\install.ps1" />
|
<file src="tools\ReadmeUpgrade.txt" target="tools\ReadmeUpgrade.txt" />
|
||||||
<file src="tools\Readme.txt" target="tools\Readme.txt" />
|
<file src="tools\Web.config.install.xdt" target="Content\Web.config.install.xdt" />
|
||||||
<file src="tools\ReadmeUpgrade.txt" target="tools\ReadmeUpgrade.txt" />
|
<file src="tools\applications.config.install.xdt" target="Content\config\applications.config.install.xdt" />
|
||||||
<file src="tools\Web.config.install.xdt" target="Content\Web.config.install.xdt" />
|
<file src="tools\ClientDependency.config.install.xdt" target="Content\config\ClientDependency.config.install.xdt" />
|
||||||
<file src="tools\applications.config.install.xdt" target="Content\config\applications.config.install.xdt" />
|
<file src="tools\Dashboard.config.install.xdt" target="Content\config\Dashboard.config.install.xdt" />
|
||||||
<file src="tools\ClientDependency.config.install.xdt" target="Content\config\ClientDependency.config.install.xdt" />
|
<file src="tools\trees.config.install.xdt" target="Content\config\trees.config.install.xdt" />
|
||||||
<file src="tools\Dashboard.config.install.xdt" target="Content\config\Dashboard.config.install.xdt" />
|
<file src="tools\umbracoSettings.config.install.xdt" target="Content\config\umbracoSettings.config.install.xdt" />
|
||||||
<file src="tools\trees.config.install.xdt" target="Content\config\trees.config.install.xdt" />
|
<file src="tools\Views.Web.config.install.xdt" target="Views\Web.config.install.xdt" />
|
||||||
<file src="tools\umbracoSettings.config.install.xdt" target="Content\config\umbracoSettings.config.install.xdt" />
|
<file src="tools\processing.config.install.xdt" target="Content\Config\imageprocessor\processing.config.install.xdt" />
|
||||||
<file src="tools\Views.Web.config.install.xdt" target="Views\Web.config.install.xdt" />
|
<file src="tools\cache.config.install.xdt" target="Content\Config\imageprocessor\cache.config.install.xdt" />
|
||||||
<file src="tools\processing.config.install.xdt" target="Content\Config\imageprocessor\processing.config.install.xdt" />
|
<file src="build\**" target="build" />
|
||||||
<file src="tools\cache.config.install.xdt" target="Content\Config\imageprocessor\cache.config.install.xdt" />
|
</files>
|
||||||
<file src="build\**" target="build" />
|
|
||||||
</files>
|
|
||||||
</package>
|
</package>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</configSections>
|
</configSections>
|
||||||
|
|
||||||
<system.web.webPages.razor>
|
<system.web.webPages.razor>
|
||||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(factoryType)" xdt:Transform="SetAttributes(factoryType)" />
|
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" xdt:Locator="Match(factoryType)" xdt:Transform="SetAttributes(factoryType)" />
|
||||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||||
<namespaces>
|
<namespaces>
|
||||||
<add namespace="Umbraco.Web.PublishedContentModels" xdt:Transform="InsertIfMissing" />
|
<add namespace="Umbraco.Web.PublishedContentModels" xdt:Transform="InsertIfMissing" />
|
||||||
@@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
<system.web>
|
<system.web>
|
||||||
<pages
|
<pages
|
||||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||||
xdt:Locator="Match(pageParserFilterType,pageBaseType,userControlBaseType)"
|
xdt:Locator="Match(pageParserFilterType,pageBaseType,userControlBaseType)"
|
||||||
xdt:Transform="SetAttributes(pageParserFilterType,pageBaseType,userControlBaseType)">
|
xdt:Transform="SetAttributes(pageParserFilterType,pageBaseType,userControlBaseType)">
|
||||||
<controls>
|
<controls>
|
||||||
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" xdt:Locator="Match(namespace)" xdt:Transform="SetAttributes(assembly)" />
|
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" xdt:Locator="Match(namespace)" xdt:Transform="SetAttributes(assembly)" />
|
||||||
</controls>
|
</controls>
|
||||||
</pages>
|
</pages>
|
||||||
</system.web>
|
</system.web>
|
||||||
|
|||||||
@@ -324,6 +324,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='HtmlAgilityPack')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='HtmlAgilityPack')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='AutoMapper')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='AutoMapper')" xdt:Transform="Remove" />
|
||||||
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Net.Http')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Newtonsoft.Json')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Newtonsoft.Json')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.Mvc')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.Mvc')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.WebPages.Razor')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.WebPages.Razor')" xdt:Transform="Remove" />
|
||||||
@@ -336,9 +337,6 @@
|
|||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.CodeAnalysis.CSharp')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.CodeAnalysis.CSharp')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='log4net')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='log4net')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Data.SqlServerCe')" xdt:Transform="Remove" />
|
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Data.SqlServerCe')" xdt:Transform="Remove" />
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.CodeDom.Providers.DotNetCompilerPlatform')" xdt:Transform="Remove" />
|
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.AspNet.SignalR.Core')" xdt:Transform="Remove" />
|
|
||||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Web.Http.WebHost')" xdt:Transform="Remove" />
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|
||||||
@@ -346,7 +344,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.8.8.0" newVersion="1.8.8.0" />
|
<bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
|
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
|
||||||
@@ -358,11 +356,11 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
|
||||||
@@ -370,27 +368,27 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
<dependentAssembly xdt:Transform="Insert">
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/>
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/>
|
||||||
@@ -400,18 +398,6 @@
|
|||||||
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
|
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
|
||||||
<assemblyIdentity name="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
|
||||||
<assemblyIdentity name="Microsoft.AspNet.SignalR.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.4.1.0" newVersion="2.4.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly xdt:Transform="Insert">
|
|
||||||
<assemblyIdentity name="System.Web.Http.WebHost" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|
||||||
|
|||||||
@@ -3,57 +3,57 @@
|
|||||||
[string]$Directory
|
[string]$Directory
|
||||||
)
|
)
|
||||||
$workingDirectory = $Directory
|
$workingDirectory = $Directory
|
||||||
CD "$($workingDirectory)"
|
CD $workingDirectory
|
||||||
|
|
||||||
# Clone repo
|
# Clone repo
|
||||||
$fullGitUrl = "https://$($env:GIT_URL)/$($env:GIT_REPOSITORYNAME).git"
|
$fullGitUrl = "https://$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
|
||||||
git clone $($fullGitUrl) $($env:GIT_REPOSITORYNAME) 2>&1 | % { $_.ToString() }
|
git clone $fullGitUrl 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
# Remove everything so that unzipping the release later will update everything
|
# Remove everything so that unzipping the release later will update everything
|
||||||
# Don't remove the readme file nor the git directory
|
# Don't remove the readme file nor the git directory
|
||||||
Write-Host "Cleaning up git directory before adding new version"
|
Write-Host "Cleaning up git directory before adding new version"
|
||||||
Remove-Item -Recurse "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)\*" -Exclude README.md,.git
|
Remove-Item -Recurse $workingDirectory\$env:GIT_REPOSITORYNAME\* -Exclude README.md,.git
|
||||||
|
|
||||||
# Find release zip
|
# Find release zip
|
||||||
$zipsDir = "$($workingDirectory)\$($env:BUILD_DEFINITIONNAME)\zips"
|
$zipsDir = "$workingDirectory\$env:BUILD_DEFINITIONNAME\zips"
|
||||||
$pattern = "UmbracoCms.([0-9]{1,2}.[0-9]{1,3}.[0-9]{1,3}).zip"
|
$pattern = "UmbracoCms.([0-9]{1,2}.[0-9]{1,3}.[0-9]{1,3}).zip"
|
||||||
Write-Host "Searching for Umbraco release files in $($zipsDir) for a file with pattern $($pattern)"
|
Write-Host "Searching for Umbraco release files in $workingDirectory\$zipsDir for a file with pattern $pattern"
|
||||||
$file = (Get-ChildItem "$($zipsDir)" | Where-Object { $_.Name -match "$($pattern)" })
|
$file = (Get-ChildItem $zipsDir | Where-Object { $_.Name -match "$pattern" })
|
||||||
|
|
||||||
if($file)
|
if($file)
|
||||||
{
|
{
|
||||||
# Get release name
|
# Get release name
|
||||||
$version = [regex]::Match($($file.Name), $($pattern)).captures.groups[1].value
|
$version = [regex]::Match($file.Name, $pattern).captures.groups[1].value
|
||||||
$releaseName = "Umbraco $($version)"
|
$releaseName = "Umbraco $version"
|
||||||
Write-Host "Found $($releaseName)"
|
Write-Host "Found $releaseName"
|
||||||
|
|
||||||
# Unzip into repository to update release
|
# Unzip into repository to update release
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
Write-Host "Unzipping $($file.FullName) to $($workingDirectory)\$($env:GIT_REPOSITORYNAME)"
|
Write-Host "Unzipping $($file.FullName) to $workingDirectory\$env:GIT_REPOSITORYNAME"
|
||||||
[System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)")
|
[System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$workingDirectory\$env:GIT_REPOSITORYNAME")
|
||||||
|
|
||||||
# Telling git who we are
|
# Telling git who we are
|
||||||
git config --global user.email "coffee@umbraco.com" 2>&1 | % { $_.ToString() }
|
git config --global user.email "coffee@umbraco.com" 2>&1 | % { $_.ToString() }
|
||||||
git config --global user.name "Umbraco HQ" 2>&1 | % { $_.ToString() }
|
git config --global user.name "Umbraco HQ" 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
# Commit
|
# Commit
|
||||||
CD "$($workingDirectory)\$($env:GIT_REPOSITORYNAME)"
|
CD $env:GIT_REPOSITORYNAME
|
||||||
Write-Host "Committing Umbraco $($version) Release from Build Output"
|
Write-Host "Committing Umbraco $version Release from Build Output"
|
||||||
|
|
||||||
git add . 2>&1 | % { $_.ToString() }
|
git add . 2>&1 | % { $_.ToString() }
|
||||||
git commit -m " Release $($releaseName) from Build Output" 2>&1 | % { $_.ToString() }
|
git commit -m " Release $releaseName from Build Output" 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
# Tag the release
|
# Tag the release
|
||||||
git tag -a "v$($version)" -m "v$($version)"
|
git tag -a "v$version" -m "v$version"
|
||||||
|
|
||||||
# Push release to master
|
# Push release to master
|
||||||
$fullGitAuthUrl = "https://$($env:GIT_USERNAME):$($GitHubPersonalAccessToken)@$($env:GIT_URL)/$($env:GIT_REPOSITORYNAME).git"
|
$fullGitAuthUrl = "https://$($env:GIT_USERNAME):$GitHubPersonalAccessToken@$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
|
||||||
git push $($fullGitAuthUrl) 2>&1 | % { $_.ToString() }
|
git push $fullGitAuthUrl 2>&1 | % { $_.ToString() }
|
||||||
|
|
||||||
#Push tag to master
|
#Push tag to master
|
||||||
git push $($fullGitAuthUrl) --tags 2>&1 | % { $_.ToString() }
|
git push $fullGitAuthUrl --tags 2>&1 | % { $_.ToString() }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Error "Umbraco release file not found, searched in $($workingDirectory)\$($zipsDir) for a file with pattern $($pattern) - canceling"
|
Write-Error "Umbraco release file not found, searched in $workingDirectory\$zipsDir for a file with pattern $pattern - cancelling"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>SQLCE4Umbraco</RootNamespace>
|
<RootNamespace>SQLCE4Umbraco</RootNamespace>
|
||||||
<AssemblyName>SQLCE4Umbraco</AssemblyName>
|
<AssemblyName>SQLCE4Umbraco</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>
|
<SccProjectName>
|
||||||
</SccProjectName>
|
</SccProjectName>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -16,19 +16,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
@@ -36,4 +36,4 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
|
||||||
|
|||||||
+2
-2
@@ -11,5 +11,5 @@ using System.Resources;
|
|||||||
|
|
||||||
[assembly: AssemblyVersion("1.0.*")]
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
[assembly: AssemblyFileVersion("7.15.1")]
|
[assembly: AssemblyFileVersion("7.13.0")]
|
||||||
[assembly: AssemblyInformationalVersion("7.15.1")]
|
[assembly: AssemblyInformationalVersion("7.13.0")]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
|
|||||||
{
|
{
|
||||||
public class UmbracoVersion
|
public class UmbracoVersion
|
||||||
{
|
{
|
||||||
private static readonly Version Version = new Version("7.15.1");
|
private static readonly Version Version = new Version("7.13.0");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current version of Umbraco.
|
/// Gets the current version of Umbraco.
|
||||||
|
|||||||
@@ -1,295 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Umbraco.Core
|
|
||||||
{
|
|
||||||
public static partial class Constants
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Defines the identifiers for Umbraco data types as constants for easy centralized access/management.
|
|
||||||
/// </summary>
|
|
||||||
internal static class DataTypes
|
|
||||||
{
|
|
||||||
|
|
||||||
public static class ReservedPreValueKeys
|
|
||||||
{
|
|
||||||
public const string IgnoreUserStartNodes = "ignoreUserStartNodes";
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Content Picker as string
|
|
||||||
/// </summary>
|
|
||||||
public const string ContentPicker = "FD1E0DA5-5606-4862-B679-5D0CF3A52A59";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Content Picker
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid ContentPickerGuid = new Guid(ContentPicker);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Member Picker as string
|
|
||||||
/// </summary>
|
|
||||||
public const string MemberPicker = "1EA2E01F-EBD8-4CE1-8D71-6B1149E63548";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Member Picker
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid MemberPickerGuid = new Guid(MemberPicker);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Media Picker as string
|
|
||||||
/// </summary>
|
|
||||||
public const string MediaPicker = "135D60E0-64D9-49ED-AB08-893C9BA44AE5";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Media Picker
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid MediaPickerGuid = new Guid(MediaPicker);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Multiple Media Picker as string
|
|
||||||
/// </summary>
|
|
||||||
public const string MultipleMediaPicker = "9DBBCBBB-2327-434A-B355-AF1B84E5010A";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Multiple Media Picker
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid MultipleMediaPickerGuid = new Guid(MultipleMediaPicker);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Related Links as string
|
|
||||||
/// </summary>
|
|
||||||
public const string RelatedLinks = "B4E3535A-1753-47E2-8568-602CF8CFEE6F";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Related Links
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid RelatedLinksGuid = new Guid(RelatedLinks);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Member as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Member = "d59be02f-1df9-4228-aa1e-01917d806cda";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Member
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid MemberGuid = new Guid(Member);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Image Cropper as string
|
|
||||||
/// </summary>
|
|
||||||
public const string ImageCropper = "1df9f033-e6d4-451f-b8d2-e0cbc50a836f";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Image Cropper
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid ImageCropperGuid = new Guid(ImageCropper);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Tags as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Tags = "b6b73142-b9c1-4bf8-a16d-e1c23320b549";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Tags
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid TagsGuid = new Guid(Tags);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for List View - Content as string
|
|
||||||
/// </summary>
|
|
||||||
public const string ListViewContent = "C0808DD3-8133-4E4B-8CE8-E2BEA84A96A4";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for List View - Content
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid ListViewContentGuid = new Guid(ListViewContent);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for List View - Media as string
|
|
||||||
/// </summary>
|
|
||||||
public const string ListViewMedia = "3A0156C4-3B8C-4803-BDC1-6871FAA83FFF";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for List View - Media
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid ListViewMediaGuid = new Guid(ListViewMedia);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for List View - Members as string
|
|
||||||
/// </summary>
|
|
||||||
public const string ListViewMembers = "AA2C52A0-CE87-4E65-A47C-7DF09358585D";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for List View - Members
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid ListViewMembersGuid = new Guid(ListViewMembers);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Date Picker with time as string
|
|
||||||
/// </summary>
|
|
||||||
public const string DatePickerWithTime = "e4d66c0f-b935-4200-81f0-025f7256b89a";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Date Picker with time
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid DatePickerWithTimeGuid = new Guid(DatePickerWithTime);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Approved Color as string
|
|
||||||
/// </summary>
|
|
||||||
public const string ApprovedColor = "0225af17-b302-49cb-9176-b9f35cab9c17";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Approved Color
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid ApprovedColorGuid = new Guid(ApprovedColor);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Dropdown multiple as string
|
|
||||||
/// </summary>
|
|
||||||
public const string DropdownMultiple = "f38f0ac7-1d27-439c-9f3f-089cd8825a53";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Dropdown multiple
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid DropdownMultipleGuid = new Guid(DropdownMultiple);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Radiobox as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Radiobox = "bb5f57c9-ce2b-4bb9-b697-4caca783a805";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Radiobox
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid RadioboxGuid = new Guid(Radiobox);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Date Picker as string
|
|
||||||
/// </summary>
|
|
||||||
public const string DatePicker = "5046194e-4237-453c-a547-15db3a07c4e1";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Date Picker
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid DatePickerGuid = new Guid(DatePicker);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Dropdown as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Dropdown = "0b6a45e7-44ba-430d-9da5-4e46060b9e03";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Dropdown
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid DropdownGuid = new Guid(Dropdown);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Checkbox list as string
|
|
||||||
/// </summary>
|
|
||||||
public const string CheckboxList = "fbaf13a8-4036-41f2-93a3-974f678c312a";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Checkbox list
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid CheckboxListGuid = new Guid(CheckboxList);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Checkbox as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Checkbox = "92897bc6-a5f3-4ffe-ae27-f2e7e33dda49";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Checkbox
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid CheckboxGuid = new Guid(Checkbox);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Numeric as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Numeric = "2e6d3631-066e-44b8-aec4-96f09099b2b5";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Dropdown
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid NumericGuid = new Guid(Numeric);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Richtext editor as string
|
|
||||||
/// </summary>
|
|
||||||
public const string RichtextEditor = "ca90c950-0aff-4e72-b976-a30b1ac57dad";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Richtext editor
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid RichtextEditorGuid = new Guid(RichtextEditor);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Textstring as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Textstring = "0cc0eba1-9960-42c9-bf9b-60e150b429ae";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Textstring
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid TextstringGuid = new Guid(Textstring);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Textarea as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Textarea = "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Dropdown
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid TextareaGuid = new Guid(Textarea);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Upload as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Upload = "84c6b441-31df-4ffe-b67e-67d5bc3ae65a";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Upload
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid UploadGuid = new Guid(Upload);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Label as string
|
|
||||||
/// </summary>
|
|
||||||
public const string Label = "f0bc4bfb-b499-40d6-ba86-058885a5178c";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Guid for Label
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid LabelGuid = new Guid(Label);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -447,11 +447,6 @@ namespace Umbraco.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string NestedContentAlias = "Umbraco.NestedContent";
|
public const string NestedContentAlias = "Umbraco.NestedContent";
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Alias for the multi url picker editor.
|
|
||||||
/// </summary>
|
|
||||||
public const string MultiUrlPickerAlias = "Umbraco.MultiUrlPicker";
|
|
||||||
|
|
||||||
public static class PreValueKeys
|
public static class PreValueKeys
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ namespace Umbraco.Core.FileResources {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Files {
|
internal class Files {
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
@@ -295,12 +293,6 @@ namespace Umbraco.Core.IO
|
|||||||
{
|
{
|
||||||
var property = GetProperty(content, propertyTypeAlias);
|
var property = GetProperty(content, propertyTypeAlias);
|
||||||
var svalue = property.Value as string;
|
var svalue = property.Value as string;
|
||||||
if (svalue != null && svalue.DetectIsJson())
|
|
||||||
{
|
|
||||||
// the property value is a JSON serialized image crop data set - grab the "src" property as the file source
|
|
||||||
var jObject = JsonConvert.DeserializeObject<JObject>(svalue);
|
|
||||||
svalue = jObject != null ? jObject.GetValueAsString("src") : svalue;
|
|
||||||
}
|
|
||||||
var oldpath = svalue == null ? null : GetRelativePath(svalue);
|
var oldpath = svalue == null ? null : GetRelativePath(svalue);
|
||||||
var filepath = StoreFile(content, property.PropertyType, filename, filestream, oldpath);
|
var filepath = StoreFile(content, property.PropertyType, filename, filestream, oldpath);
|
||||||
property.Value = GetUrl(filepath);
|
property.Value = GetUrl(filepath);
|
||||||
@@ -365,8 +357,7 @@ namespace Umbraco.Core.IO
|
|||||||
{
|
{
|
||||||
var jpgInfo = ImageFile.FromStream(stream);
|
var jpgInfo = ImageFile.FromStream(stream);
|
||||||
|
|
||||||
if (jpgInfo != null
|
if (jpgInfo.Format != ImageFileFormat.Unknown
|
||||||
&& jpgInfo.Format != ImageFileFormat.Unknown
|
|
||||||
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelYDimension)
|
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelYDimension)
|
||||||
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelXDimension))
|
&& jpgInfo.Properties.ContainsKey(ExifTag.PixelXDimension))
|
||||||
{
|
{
|
||||||
@@ -377,28 +368,21 @@ namespace Umbraco.Core.IO
|
|||||||
return new Size(width, height);
|
return new Size(width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
//We will just swallow, just means we can't read exif data, we don't want to log an error either
|
|
||||||
}
|
|
||||||
|
|
||||||
//we have no choice but to try to read in via GDI
|
//we have no choice but to try to read in via GDI
|
||||||
try
|
|
||||||
{
|
|
||||||
using (var image = Image.FromStream(stream))
|
using (var image = Image.FromStream(stream))
|
||||||
{
|
{
|
||||||
|
|
||||||
var fileWidth = image.Width;
|
var fileWidth = image.Width;
|
||||||
var fileHeight = image.Height;
|
var fileHeight = image.Height;
|
||||||
return new Size(fileWidth, fileHeight);
|
return new Size(fileWidth, fileHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception)
|
||||||
{
|
{
|
||||||
//We will just swallow, just means we can't read via GDI, we don't want to log an error either
|
//We will just swallow, just means we can't read exif data, we don't want to log an error either
|
||||||
|
return new Size(Constants.Conventions.Media.DefaultSize, Constants.Conventions.Media.DefaultSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Size(Constants.Conventions.Media.DefaultSize, Constants.Conventions.Media.DefaultSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -118,9 +118,9 @@ namespace Umbraco.Core.Media.Exif
|
|||||||
/// <param name="encoding">The encoding to be used for text metadata when the source encoding is unknown.</param>
|
/// <param name="encoding">The encoding to be used for text metadata when the source encoding is unknown.</param>
|
||||||
/// <returns>The <see cref="ImageFile"/> created from the file.</returns>
|
/// <returns>The <see cref="ImageFile"/> created from the file.</returns>
|
||||||
public static ImageFile FromStream(Stream stream, Encoding encoding)
|
public static ImageFile FromStream(Stream stream, Encoding encoding)
|
||||||
{
|
{
|
||||||
// JPEG
|
// JPEG
|
||||||
if (JPEGDetector.IsOfType(stream))
|
if(JPEGDetector.IsOfType(stream))
|
||||||
{
|
{
|
||||||
return new JPEGFile(stream, encoding);
|
return new JPEGFile(stream, encoding);
|
||||||
}
|
}
|
||||||
@@ -137,9 +137,8 @@ namespace Umbraco.Core.Media.Exif
|
|||||||
return new SVGFile(stream);
|
return new SVGFile(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't know
|
throw new NotValidImageFileException ();
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ namespace Umbraco.Core.Media.TypeDetector
|
|||||||
public static bool IsOfType(Stream fileStream)
|
public static bool IsOfType(Stream fileStream)
|
||||||
{
|
{
|
||||||
var header = GetFileHeader(fileStream);
|
var header = GetFileHeader(fileStream);
|
||||||
return header != null && header[0] == 0xff && header[1] == 0xD8;
|
|
||||||
|
return header[0] == 0xff && header[1] == 0xD8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,9 @@ namespace Umbraco.Core.Media.TypeDetector
|
|||||||
public static byte[] GetFileHeader(Stream fileStream)
|
public static byte[] GetFileHeader(Stream fileStream)
|
||||||
{
|
{
|
||||||
fileStream.Seek(0, SeekOrigin.Begin);
|
fileStream.Seek(0, SeekOrigin.Begin);
|
||||||
var header = new byte[8];
|
byte[] header = new byte[8];
|
||||||
fileStream.Seek(0, SeekOrigin.Begin);
|
fileStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
// Invalid header
|
|
||||||
if (fileStream.Read(header, 0, header.Length) != header.Length)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,17 +7,17 @@ namespace Umbraco.Core.Media.TypeDetector
|
|||||||
{
|
{
|
||||||
public static bool IsOfType(Stream fileStream)
|
public static bool IsOfType(Stream fileStream)
|
||||||
{
|
{
|
||||||
var tiffHeader = GetFileHeader(fileStream);
|
string tiffHeader = GetFileHeader(fileStream);
|
||||||
return tiffHeader != null && tiffHeader == "MM\x00\x2a" || tiffHeader == "II\x2a\x00";
|
|
||||||
|
return tiffHeader == "MM\x00\x2a" || tiffHeader == "II\x2a\x00";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetFileHeader(Stream fileStream)
|
public static string GetFileHeader(Stream fileStream)
|
||||||
{
|
{
|
||||||
var header = RasterizedTypeDetector.GetFileHeader(fileStream);
|
var header = RasterizedTypeDetector.GetFileHeader(fileStream);
|
||||||
if (header == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var tiffHeader = Encoding.ASCII.GetString(header, 0, 4);
|
string tiffHeader = Encoding.ASCII.GetString(header, 0, 4);
|
||||||
|
|
||||||
return tiffHeader;
|
return tiffHeader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,219 +1,219 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Umbraco.Core.Logging;
|
using Umbraco.Core.Logging;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
using Umbraco.Core.Persistence;
|
using Umbraco.Core.Persistence;
|
||||||
using Umbraco.Core.PropertyEditors;
|
using Umbraco.Core.PropertyEditors;
|
||||||
using Umbraco.Core.Services;
|
using Umbraco.Core.Services;
|
||||||
|
|
||||||
namespace Umbraco.Core.Models
|
namespace Umbraco.Core.Models
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Definition of a DataType/PropertyEditor
|
/// Definition of a DataType/PropertyEditor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The definition exists as a database reference between an actual DataType/PropertyEditor
|
/// The definition exists as a database reference between an actual DataType/PropertyEditor
|
||||||
/// (identified by its control id), its prevalues (configuration) and the named DataType in the backoffice UI.
|
/// (identified by its control id), its prevalues (configuration) and the named DataType in the backoffice UI.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[DataContract(IsReference = true)]
|
[DataContract(IsReference = true)]
|
||||||
public class DataTypeDefinition : Entity, IDataTypeDefinition
|
public class DataTypeDefinition : Entity, IDataTypeDefinition
|
||||||
{
|
{
|
||||||
private int _parentId;
|
private int _parentId;
|
||||||
private string _name;
|
private string _name;
|
||||||
private int _sortOrder;
|
private int _sortOrder;
|
||||||
private int _level;
|
private int _level;
|
||||||
private string _path;
|
private string _path;
|
||||||
private int _creatorId;
|
private int _creatorId;
|
||||||
private bool _trashed;
|
private bool _trashed;
|
||||||
private string _propertyEditorAlias;
|
private string _propertyEditorAlias;
|
||||||
private DataTypeDatabaseType _databaseType;
|
private DataTypeDatabaseType _databaseType;
|
||||||
|
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the alternative contructor that specifies an alias")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the alternative contructor that specifies an alias")]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public DataTypeDefinition(int parentId, Guid controlId)
|
public DataTypeDefinition(int parentId, Guid controlId)
|
||||||
{
|
{
|
||||||
_parentId = parentId;
|
_parentId = parentId;
|
||||||
|
|
||||||
_propertyEditorAlias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(controlId, false);
|
_propertyEditorAlias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(controlId, false);
|
||||||
if (_propertyEditorAlias == null)
|
if (_propertyEditorAlias == null)
|
||||||
{
|
{
|
||||||
//convert to Label!
|
//convert to Label!
|
||||||
LogHelper.Warn<DataTypeDefinition>("Could not find a GUID -> Alias mapping for the legacy property editor with id " + controlId + ". The DataType has been converted to a Label.");
|
LogHelper.Warn<DataTypeDefinition>("Could not find a GUID -> Alias mapping for the legacy property editor with id " + controlId + ". The DataType has been converted to a Label.");
|
||||||
_propertyEditorAlias = Constants.PropertyEditors.NoEditAlias;
|
_propertyEditorAlias = Constants.PropertyEditors.NoEditAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
_additionalData = new Dictionary<string, object>();
|
_additionalData = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataTypeDefinition(int parentId, string propertyEditorAlias)
|
public DataTypeDefinition(int parentId, string propertyEditorAlias)
|
||||||
{
|
{
|
||||||
_parentId = parentId;
|
_parentId = parentId;
|
||||||
_propertyEditorAlias = propertyEditorAlias;
|
_propertyEditorAlias = propertyEditorAlias;
|
||||||
|
|
||||||
_additionalData = new Dictionary<string, object>();
|
_additionalData = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataTypeDefinition(string propertyEditorAlias)
|
public DataTypeDefinition(string propertyEditorAlias)
|
||||||
{
|
{
|
||||||
_parentId = -1;
|
_parentId = -1;
|
||||||
_propertyEditorAlias = propertyEditorAlias;
|
_propertyEditorAlias = propertyEditorAlias;
|
||||||
|
|
||||||
_additionalData = new Dictionary<string, object>();
|
_additionalData = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly Lazy<PropertySelectors> Ps = new Lazy<PropertySelectors>();
|
private static readonly Lazy<PropertySelectors> Ps = new Lazy<PropertySelectors>();
|
||||||
|
|
||||||
private class PropertySelectors
|
private class PropertySelectors
|
||||||
{
|
{
|
||||||
public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Name);
|
public readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Name);
|
||||||
public readonly PropertyInfo ParentIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.ParentId);
|
public readonly PropertyInfo ParentIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.ParentId);
|
||||||
public readonly PropertyInfo SortOrderSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.SortOrder);
|
public readonly PropertyInfo SortOrderSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.SortOrder);
|
||||||
public readonly PropertyInfo LevelSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.Level);
|
public readonly PropertyInfo LevelSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.Level);
|
||||||
public readonly PropertyInfo PathSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Path);
|
public readonly PropertyInfo PathSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.Path);
|
||||||
public readonly PropertyInfo UserIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.CreatorId);
|
public readonly PropertyInfo UserIdSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, int>(x => x.CreatorId);
|
||||||
public readonly PropertyInfo TrashedSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, bool>(x => x.Trashed);
|
public readonly PropertyInfo TrashedSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, bool>(x => x.Trashed);
|
||||||
public readonly PropertyInfo PropertyEditorAliasSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.PropertyEditorAlias);
|
public readonly PropertyInfo PropertyEditorAliasSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, string>(x => x.PropertyEditorAlias);
|
||||||
public readonly PropertyInfo DatabaseTypeSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, DataTypeDatabaseType>(x => x.DatabaseType);
|
public readonly PropertyInfo DatabaseTypeSelector = ExpressionHelper.GetPropertyInfo<DataTypeDefinition, DataTypeDatabaseType>(x => x.DatabaseType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Id of the Parent entity
|
/// Gets or sets the Id of the Parent entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Might not be necessary if handled as a relation?</remarks>
|
/// <remarks>Might not be necessary if handled as a relation?</remarks>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int ParentId
|
public int ParentId
|
||||||
{
|
{
|
||||||
get { return _parentId; }
|
get { return _parentId; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _parentId, Ps.Value.ParentIdSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _parentId, Ps.Value.ParentIdSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the current entity
|
/// Gets or sets the name of the current entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return _name; }
|
get { return _name; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _name, Ps.Value.NameSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the sort order of the content entity
|
/// Gets or sets the sort order of the content entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int SortOrder
|
public int SortOrder
|
||||||
{
|
{
|
||||||
get { return _sortOrder; }
|
get { return _sortOrder; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _sortOrder, Ps.Value.SortOrderSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _sortOrder, Ps.Value.SortOrderSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the level of the content entity
|
/// Gets or sets the level of the content entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int Level
|
public int Level
|
||||||
{
|
{
|
||||||
get { return _level; }
|
get { return _level; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _level, Ps.Value.LevelSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _level, Ps.Value.LevelSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the path
|
/// Gets or sets the path
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public string Path //Setting this value should be handled by the class not the user
|
public string Path //Setting this value should be handled by the class not the user
|
||||||
{
|
{
|
||||||
get { return _path; }
|
get { return _path; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _path, Ps.Value.PathSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _path, Ps.Value.PathSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Id of the user who created this entity
|
/// Id of the user who created this entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int CreatorId
|
public int CreatorId
|
||||||
{
|
{
|
||||||
get { return _creatorId; }
|
get { return _creatorId; }
|
||||||
set { SetPropertyValueAndDetectChanges(value, ref _creatorId, Ps.Value.UserIdSelector); }
|
set { SetPropertyValueAndDetectChanges(value, ref _creatorId, Ps.Value.UserIdSelector); }
|
||||||
}
|
}
|
||||||
|
|
||||||
//NOTE: SD: Why do we have this ??
|
//NOTE: SD: Why do we have this ??
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Boolean indicating whether this entity is Trashed or not.
|
/// Boolean indicating whether this entity is Trashed or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public bool Trashed
|
public bool Trashed
|
||||||
{
|
{
|
||||||
get { return _trashed; }
|
get { return _trashed; }
|
||||||
internal set
|
internal set
|
||||||
{
|
{
|
||||||
SetPropertyValueAndDetectChanges(value, ref _trashed, Ps.Value.TrashedSelector);
|
SetPropertyValueAndDetectChanges(value, ref _trashed, Ps.Value.TrashedSelector);
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["Trashed"] = value;
|
_additionalData["Trashed"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public string PropertyEditorAlias
|
public string PropertyEditorAlias
|
||||||
{
|
{
|
||||||
get { return _propertyEditorAlias; }
|
get { return _propertyEditorAlias; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetPropertyValueAndDetectChanges(value, ref _propertyEditorAlias, Ps.Value.PropertyEditorAliasSelector);
|
SetPropertyValueAndDetectChanges(value, ref _propertyEditorAlias, Ps.Value.PropertyEditorAliasSelector);
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["DatabaseType"] = value;
|
_additionalData["DatabaseType"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Id of the DataType control
|
/// Id of the DataType control
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")]
|
||||||
public Guid ControlId
|
public Guid ControlId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(
|
return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(
|
||||||
_propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value;
|
_propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true);
|
var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true);
|
||||||
PropertyEditorAlias = alias;
|
PropertyEditorAlias = alias;
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["ControlId"] = value;
|
_additionalData["ControlId"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public DataTypeDatabaseType DatabaseType
|
public DataTypeDatabaseType DatabaseType
|
||||||
{
|
{
|
||||||
get { return _databaseType; }
|
get { return _databaseType; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetPropertyValueAndDetectChanges(value, ref _databaseType, Ps.Value.DatabaseTypeSelector);
|
SetPropertyValueAndDetectChanges(value, ref _databaseType, Ps.Value.DatabaseTypeSelector);
|
||||||
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
//This is a custom property that is not exposed in IUmbracoEntity so add it to the additional data
|
||||||
_additionalData["DatabaseType"] = value;
|
_additionalData["DatabaseType"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly IDictionary<string, object> _additionalData;
|
private readonly IDictionary<string, object> _additionalData;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Some entities may expose additional data that other's might not, this custom data will be available in this collection
|
/// Some entities may expose additional data that other's might not, this custom data will be available in this collection
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
IDictionary<string, object> IUmbracoEntity.AdditionalData
|
IDictionary<string, object> IUmbracoEntity.AdditionalData
|
||||||
{
|
{
|
||||||
get { return _additionalData; }
|
get { return _additionalData; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Umbraco.Core.Models
|
|
||||||
{
|
|
||||||
internal static class DataTypeExtensions
|
|
||||||
{
|
|
||||||
private static readonly ISet<Guid> IdsOfBuildInDataTypes = new HashSet<Guid>()
|
|
||||||
{
|
|
||||||
Constants.DataTypes.ContentPickerGuid,
|
|
||||||
Constants.DataTypes.MemberPickerGuid,
|
|
||||||
Constants.DataTypes.MediaPickerGuid,
|
|
||||||
Constants.DataTypes.MultipleMediaPickerGuid,
|
|
||||||
Constants.DataTypes.RelatedLinksGuid,
|
|
||||||
Constants.DataTypes.MemberGuid,
|
|
||||||
Constants.DataTypes.ImageCropperGuid,
|
|
||||||
Constants.DataTypes.TagsGuid,
|
|
||||||
Constants.DataTypes.ListViewContentGuid,
|
|
||||||
Constants.DataTypes.ListViewMediaGuid,
|
|
||||||
Constants.DataTypes.ListViewMembersGuid,
|
|
||||||
Constants.DataTypes.DatePickerWithTimeGuid,
|
|
||||||
Constants.DataTypes.ApprovedColorGuid,
|
|
||||||
Constants.DataTypes.DropdownMultipleGuid,
|
|
||||||
Constants.DataTypes.RadioboxGuid,
|
|
||||||
Constants.DataTypes.DatePickerGuid,
|
|
||||||
Constants.DataTypes.DropdownGuid,
|
|
||||||
Constants.DataTypes.CheckboxListGuid,
|
|
||||||
Constants.DataTypes.CheckboxGuid,
|
|
||||||
Constants.DataTypes.NumericGuid,
|
|
||||||
Constants.DataTypes.RichtextEditorGuid,
|
|
||||||
Constants.DataTypes.TextstringGuid,
|
|
||||||
Constants.DataTypes.TextareaGuid,
|
|
||||||
Constants.DataTypes.UploadGuid,
|
|
||||||
Constants.DataTypes.LabelGuid,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns true if this date type is build-in/default.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dataType">The data type definition.</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static bool IsBuildInDataType(this IDataTypeDefinition dataType)
|
|
||||||
{
|
|
||||||
return IsBuildInDataType(dataType.Key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns true if this date type is build-in/default.
|
|
||||||
/// </summary>
|
|
||||||
public static bool IsBuildInDataType(Guid key)
|
|
||||||
{
|
|
||||||
return IdsOfBuildInDataTypes.Contains(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
using System;
|
using System;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
|
|
||||||
namespace Umbraco.Core.Models
|
namespace Umbraco.Core.Models
|
||||||
{
|
{
|
||||||
public interface IDataTypeDefinition : IUmbracoEntity
|
public interface IDataTypeDefinition : IUmbracoEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Property editor alias assigned to the data type
|
/// The Property editor alias assigned to the data type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string PropertyEditorAlias { get; set; }
|
string PropertyEditorAlias { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Id of the DataType control
|
/// Id of the DataType control
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")]
|
||||||
Guid ControlId { get; set; }
|
Guid ControlId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
/// Gets or Sets the DatabaseType for which the DataType's value is saved as
|
||||||
/// </summary>
|
/// </summary>
|
||||||
DataTypeDatabaseType DatabaseType { get; set; }
|
DataTypeDatabaseType DatabaseType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,8 +25,6 @@ namespace Umbraco.Core.Models.PublishedContent
|
|||||||
{
|
{
|
||||||
Id = contentType.Id;
|
Id = contentType.Id;
|
||||||
Alias = contentType.Alias;
|
Alias = contentType.Alias;
|
||||||
Name = contentType.Name;
|
|
||||||
Description = contentType.Description;
|
|
||||||
_compositionAliases = new HashSet<string>(contentType.CompositionAliases(), StringComparer.InvariantCultureIgnoreCase);
|
_compositionAliases = new HashSet<string>(contentType.CompositionAliases(), StringComparer.InvariantCultureIgnoreCase);
|
||||||
_propertyTypes = contentType.CompositionPropertyTypes
|
_propertyTypes = contentType.CompositionPropertyTypes
|
||||||
.Select(x => new PublishedPropertyType(this, x))
|
.Select(x => new PublishedPropertyType(this, x))
|
||||||
@@ -35,12 +33,10 @@ namespace Umbraco.Core.Models.PublishedContent
|
|||||||
}
|
}
|
||||||
|
|
||||||
// internal so it can be used for unit tests
|
// internal so it can be used for unit tests
|
||||||
internal PublishedContentType(int id, string alias, string name, string description, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes)
|
internal PublishedContentType(int id, string alias, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
Alias = alias;
|
Alias = alias;
|
||||||
Name = name;
|
|
||||||
Description = description;
|
|
||||||
_compositionAliases = new HashSet<string>(compositionAliases, StringComparer.InvariantCultureIgnoreCase);
|
_compositionAliases = new HashSet<string>(compositionAliases, StringComparer.InvariantCultureIgnoreCase);
|
||||||
_propertyTypes = propertyTypes.ToArray();
|
_propertyTypes = propertyTypes.ToArray();
|
||||||
foreach (var propertyType in _propertyTypes)
|
foreach (var propertyType in _propertyTypes)
|
||||||
@@ -50,7 +46,7 @@ namespace Umbraco.Core.Models.PublishedContent
|
|||||||
|
|
||||||
// create detached content type - ie does not match anything in the DB
|
// create detached content type - ie does not match anything in the DB
|
||||||
internal PublishedContentType(string alias, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes)
|
internal PublishedContentType(string alias, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes)
|
||||||
: this(0, alias, string.Empty, string.Empty, compositionAliases, propertyTypes)
|
: this(0, alias, compositionAliases, propertyTypes)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
private void InitializeIndexes()
|
private void InitializeIndexes()
|
||||||
@@ -67,8 +63,6 @@ namespace Umbraco.Core.Models.PublishedContent
|
|||||||
|
|
||||||
public int Id { get; private set; }
|
public int Id { get; private set; }
|
||||||
public string Alias { get; private set; }
|
public string Alias { get; private set; }
|
||||||
public string Name { get; private set; }
|
|
||||||
public string Description { get; private set; }
|
|
||||||
public HashSet<string> CompositionAliases { get { return _compositionAliases; } }
|
public HashSet<string> CompositionAliases { get { return _compositionAliases; } }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -225,5 +225,42 @@ namespace Umbraco.Core.Models
|
|||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A struction that can be contained in the additional data of an UmbracoEntity representing
|
||||||
|
/// a user defined property
|
||||||
|
/// </summary>
|
||||||
|
public class EntityProperty : IDeepCloneable
|
||||||
|
{
|
||||||
|
public string PropertyEditorAlias { get; set; }
|
||||||
|
public object Value { get; set; }
|
||||||
|
public object DeepClone()
|
||||||
|
{
|
||||||
|
//Memberwise clone on Entity will work since it doesn't have any deep elements
|
||||||
|
// for any sub class this will work for standard properties as well that aren't complex object's themselves.
|
||||||
|
var clone = MemberwiseClone();
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool Equals(EntityProperty other)
|
||||||
|
{
|
||||||
|
return PropertyEditorAlias.Equals(other.PropertyEditorAlias) && string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, obj)) return false;
|
||||||
|
if (ReferenceEquals(this, obj)) return true;
|
||||||
|
if (obj.GetType() != this.GetType()) return false;
|
||||||
|
return Equals((EntityProperty) obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked
|
||||||
|
{
|
||||||
|
return (PropertyEditorAlias.GetHashCode() * 397) ^ (Value != null ? Value.GetHashCode() : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,6 +193,19 @@ namespace Umbraco.Core.Models
|
|||||||
|
|
||||||
// check for a start node in the path
|
// check for a start node in the path
|
||||||
return startNodeIds.Any(x => formattedPath.Contains(string.Concat(",", x, ",")));
|
return startNodeIds.Any(x => formattedPath.Contains(string.Concat(",", x, ",")));
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static bool IsInBranchOfStartNode(this IUser user, IUmbracoEntity entity, IEntityService entityService, int recycleBinId, out bool hasPathAccess)
|
||||||
|
{
|
||||||
|
switch (recycleBinId)
|
||||||
|
{
|
||||||
|
case Constants.System.RecycleBinMedia:
|
||||||
|
return IsInBranchOfStartNode(entity.Path, user.CalculateMediaStartNodeIds(entityService), user.GetMediaStartNodePaths(entityService), out hasPathAccess);
|
||||||
|
case Constants.System.RecycleBinContent:
|
||||||
|
return IsInBranchOfStartNode(entity.Path, user.CalculateContentStartNodeIds(entityService), user.GetContentStartNodePaths(entityService), out hasPathAccess);
|
||||||
|
default:
|
||||||
|
throw new NotSupportedException("Path access is only determined on content or media");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static bool IsInBranchOfStartNode(string path, int[] startNodeIds, string[] startNodePaths, out bool hasPathAccess)
|
internal static bool IsInBranchOfStartNode(string path, int[] startNodeIds, string[] startNodePaths, out bool hasPathAccess)
|
||||||
|
|||||||
@@ -1,98 +1,98 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models;
|
||||||
using Umbraco.Core.Models.Rdbms;
|
using Umbraco.Core.Models.Rdbms;
|
||||||
|
|
||||||
namespace Umbraco.Core.Persistence.Factories
|
namespace Umbraco.Core.Persistence.Factories
|
||||||
{
|
{
|
||||||
internal class DataTypeDefinitionFactory
|
internal class DataTypeDefinitionFactory
|
||||||
{
|
{
|
||||||
private readonly Guid _nodeObjectTypeId;
|
private readonly Guid _nodeObjectTypeId;
|
||||||
private int _primaryKey;
|
private int _primaryKey;
|
||||||
|
|
||||||
public DataTypeDefinitionFactory(Guid nodeObjectTypeId)
|
public DataTypeDefinitionFactory(Guid nodeObjectTypeId)
|
||||||
{
|
{
|
||||||
_nodeObjectTypeId = nodeObjectTypeId;
|
_nodeObjectTypeId = nodeObjectTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Implementation of IEntityFactory<DataTypeDefinition,DataTypeDto>
|
#region Implementation of IEntityFactory<DataTypeDefinition,DataTypeDto>
|
||||||
|
|
||||||
public IDataTypeDefinition BuildEntity(DataTypeDto dto)
|
public IDataTypeDefinition BuildEntity(DataTypeDto dto)
|
||||||
{
|
{
|
||||||
var dataTypeDefinition = new DataTypeDefinition(dto.PropertyEditorAlias);
|
var dataTypeDefinition = new DataTypeDefinition(dto.PropertyEditorAlias);
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
dataTypeDefinition.DisableChangeTracking();
|
dataTypeDefinition.DisableChangeTracking();
|
||||||
|
|
||||||
dataTypeDefinition.CreateDate = dto.NodeDto.CreateDate;
|
dataTypeDefinition.CreateDate = dto.NodeDto.CreateDate;
|
||||||
dataTypeDefinition.DatabaseType = dto.DbType.EnumParse<DataTypeDatabaseType>(true);
|
dataTypeDefinition.DatabaseType = dto.DbType.EnumParse<DataTypeDatabaseType>(true);
|
||||||
dataTypeDefinition.Id = dto.DataTypeId;
|
dataTypeDefinition.Id = dto.DataTypeId;
|
||||||
dataTypeDefinition.Key = dto.NodeDto.UniqueId;
|
dataTypeDefinition.Key = dto.NodeDto.UniqueId;
|
||||||
dataTypeDefinition.Level = dto.NodeDto.Level;
|
dataTypeDefinition.Level = dto.NodeDto.Level;
|
||||||
dataTypeDefinition.UpdateDate = dto.NodeDto.CreateDate;
|
dataTypeDefinition.UpdateDate = dto.NodeDto.CreateDate;
|
||||||
dataTypeDefinition.Name = dto.NodeDto.Text;
|
dataTypeDefinition.Name = dto.NodeDto.Text;
|
||||||
dataTypeDefinition.ParentId = dto.NodeDto.ParentId;
|
dataTypeDefinition.ParentId = dto.NodeDto.ParentId;
|
||||||
dataTypeDefinition.Path = dto.NodeDto.Path;
|
dataTypeDefinition.Path = dto.NodeDto.Path;
|
||||||
dataTypeDefinition.SortOrder = dto.NodeDto.SortOrder;
|
dataTypeDefinition.SortOrder = dto.NodeDto.SortOrder;
|
||||||
dataTypeDefinition.Trashed = dto.NodeDto.Trashed;
|
dataTypeDefinition.Trashed = dto.NodeDto.Trashed;
|
||||||
dataTypeDefinition.CreatorId = dto.NodeDto.UserId.Value;
|
dataTypeDefinition.CreatorId = dto.NodeDto.UserId.Value;
|
||||||
|
|
||||||
//on initial construction we don't want to have dirty properties tracked
|
//on initial construction we don't want to have dirty properties tracked
|
||||||
// http://issues.umbraco.org/issue/U4-1946
|
// http://issues.umbraco.org/issue/U4-1946
|
||||||
dataTypeDefinition.ResetDirtyProperties(false);
|
dataTypeDefinition.ResetDirtyProperties(false);
|
||||||
return dataTypeDefinition;
|
return dataTypeDefinition;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
dataTypeDefinition.EnableChangeTracking();
|
dataTypeDefinition.EnableChangeTracking();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataTypeDto BuildDto(IDataTypeDefinition entity)
|
public DataTypeDto BuildDto(IDataTypeDefinition entity)
|
||||||
{
|
{
|
||||||
var dataTypeDto = new DataTypeDto
|
var dataTypeDto = new DataTypeDto
|
||||||
{
|
{
|
||||||
PropertyEditorAlias = entity.PropertyEditorAlias,
|
PropertyEditorAlias = entity.PropertyEditorAlias,
|
||||||
DataTypeId = entity.Id,
|
DataTypeId = entity.Id,
|
||||||
DbType = entity.DatabaseType.ToString(),
|
DbType = entity.DatabaseType.ToString(),
|
||||||
NodeDto = BuildNodeDto(entity)
|
NodeDto = BuildNodeDto(entity)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_primaryKey > 0)
|
if (_primaryKey > 0)
|
||||||
{
|
{
|
||||||
dataTypeDto.PrimaryKey = _primaryKey;
|
dataTypeDto.PrimaryKey = _primaryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
return dataTypeDto;
|
return dataTypeDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void SetPrimaryKey(int primaryKey)
|
public void SetPrimaryKey(int primaryKey)
|
||||||
{
|
{
|
||||||
_primaryKey = primaryKey;
|
_primaryKey = primaryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
private NodeDto BuildNodeDto(IDataTypeDefinition entity)
|
private NodeDto BuildNodeDto(IDataTypeDefinition entity)
|
||||||
{
|
{
|
||||||
var nodeDto = new NodeDto
|
var nodeDto = new NodeDto
|
||||||
{
|
{
|
||||||
CreateDate = entity.CreateDate,
|
CreateDate = entity.CreateDate,
|
||||||
NodeId = entity.Id,
|
NodeId = entity.Id,
|
||||||
Level = short.Parse(entity.Level.ToString(CultureInfo.InvariantCulture)),
|
Level = short.Parse(entity.Level.ToString(CultureInfo.InvariantCulture)),
|
||||||
NodeObjectType = _nodeObjectTypeId,
|
NodeObjectType = _nodeObjectTypeId,
|
||||||
ParentId = entity.ParentId,
|
ParentId = entity.ParentId,
|
||||||
Path = entity.Path,
|
Path = entity.Path,
|
||||||
SortOrder = entity.SortOrder,
|
SortOrder = entity.SortOrder,
|
||||||
Text = entity.Name,
|
Text = entity.Name,
|
||||||
Trashed = entity.Trashed,
|
Trashed = entity.Trashed,
|
||||||
UniqueId = entity.Key,
|
UniqueId = entity.Key,
|
||||||
UserId = entity.CreatorId
|
UserId = entity.CreatorId
|
||||||
};
|
};
|
||||||
|
|
||||||
return nodeDto;
|
return nodeDto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,18 +12,14 @@ namespace Umbraco.Core.Persistence.Factories
|
|||||||
{
|
{
|
||||||
internal class UmbracoEntityFactory
|
internal class UmbracoEntityFactory
|
||||||
{
|
{
|
||||||
private static readonly Lazy<string[]> EntityProperties = new Lazy<string[]>(() => typeof(IUmbracoEntity).GetPublicProperties().Select(x => x.Name).ToArray());
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Figure out what extra properties we have that are not on the IUmbracoEntity and add them to additional data
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="entity"></param>
|
|
||||||
/// <param name="originalEntityProperties"></param>
|
|
||||||
internal void AddAdditionalData(UmbracoEntity entity, IDictionary<string, object> originalEntityProperties)
|
internal void AddAdditionalData(UmbracoEntity entity, IDictionary<string, object> originalEntityProperties)
|
||||||
{
|
{
|
||||||
|
var entityProps = typeof(IUmbracoEntity).GetPublicProperties().Select(x => x.Name).ToArray();
|
||||||
|
|
||||||
|
//figure out what extra properties we have that are not on the IUmbracoEntity and add them to additional data
|
||||||
foreach (var k in originalEntityProperties.Keys
|
foreach (var k in originalEntityProperties.Keys
|
||||||
.Select(x => new { orig = x, title = x.ToCleanString(CleanStringType.PascalCase | CleanStringType.Ascii | CleanStringType.ConvertCase) })
|
.Select(x => new { orig = x, title = x.ToCleanString(CleanStringType.PascalCase | CleanStringType.Ascii | CleanStringType.ConvertCase) })
|
||||||
.Where(x => EntityProperties.Value.InvariantContains(x.title) == false))
|
.Where(x => entityProps.InvariantContains(x.title) == false))
|
||||||
{
|
{
|
||||||
entity.AdditionalData[k.title] = originalEntityProperties[k.orig];
|
entity.AdditionalData[k.title] = originalEntityProperties[k.orig];
|
||||||
}
|
}
|
||||||
@@ -82,4 +78,4 @@ namespace Umbraco.Core.Persistence.Factories
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,342 +1,342 @@
|
|||||||
using System;
|
using System;
|
||||||
using Umbraco.Core.Configuration;
|
using Umbraco.Core.Configuration;
|
||||||
using Umbraco.Core.Logging;
|
using Umbraco.Core.Logging;
|
||||||
using Umbraco.Core.Models.Rdbms;
|
using Umbraco.Core.Models.Rdbms;
|
||||||
|
|
||||||
namespace Umbraco.Core.Persistence.Migrations.Initial
|
namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the initial data creation by running Insert for the base data.
|
/// Represents the initial data creation by running Insert for the base data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class BaseDataCreation
|
internal class BaseDataCreation
|
||||||
{
|
{
|
||||||
private readonly Database _database;
|
private readonly Database _database;
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
public BaseDataCreation(Database database, ILogger logger)
|
public BaseDataCreation(Database database, ILogger logger)
|
||||||
{
|
{
|
||||||
_database = database;
|
_database = database;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialize the base data creation by inserting the data foundation for umbraco
|
/// Initialize the base data creation by inserting the data foundation for umbraco
|
||||||
/// specific to a table
|
/// specific to a table
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tableName">Name of the table to create base data for</param>
|
/// <param name="tableName">Name of the table to create base data for</param>
|
||||||
public void InitializeBaseData(string tableName)
|
public void InitializeBaseData(string tableName)
|
||||||
{
|
{
|
||||||
_logger.Info<BaseDataCreation>(string.Format("Creating data in table {0}", tableName));
|
_logger.Info<BaseDataCreation>(string.Format("Creating data in table {0}", tableName));
|
||||||
|
|
||||||
if(tableName.Equals("umbracoNode"))
|
if(tableName.Equals("umbracoNode"))
|
||||||
{
|
{
|
||||||
CreateUmbracoNodeData();
|
CreateUmbracoNodeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoLock"))
|
if (tableName.Equals("umbracoLock"))
|
||||||
{
|
{
|
||||||
CreateUmbracoLockData();
|
CreateUmbracoLockData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsContentType"))
|
if (tableName.Equals("cmsContentType"))
|
||||||
{
|
{
|
||||||
CreateCmsContentTypeData();
|
CreateCmsContentTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUser"))
|
if (tableName.Equals("umbracoUser"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUserData();
|
CreateUmbracoUserData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUserGroup"))
|
if (tableName.Equals("umbracoUserGroup"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUserGroupData();
|
CreateUmbracoUserGroupData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUser2UserGroup"))
|
if (tableName.Equals("umbracoUser2UserGroup"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUser2UserGroupData();
|
CreateUmbracoUser2UserGroupData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoUserGroup2App"))
|
if (tableName.Equals("umbracoUserGroup2App"))
|
||||||
{
|
{
|
||||||
CreateUmbracoUserGroup2AppData();
|
CreateUmbracoUserGroup2AppData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsPropertyTypeGroup"))
|
if (tableName.Equals("cmsPropertyTypeGroup"))
|
||||||
{
|
{
|
||||||
CreateCmsPropertyTypeGroupData();
|
CreateCmsPropertyTypeGroupData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsPropertyType"))
|
if (tableName.Equals("cmsPropertyType"))
|
||||||
{
|
{
|
||||||
CreateCmsPropertyTypeData();
|
CreateCmsPropertyTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoLanguage"))
|
if (tableName.Equals("umbracoLanguage"))
|
||||||
{
|
{
|
||||||
CreateUmbracoLanguageData();
|
CreateUmbracoLanguageData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsContentTypeAllowedContentType"))
|
if (tableName.Equals("cmsContentTypeAllowedContentType"))
|
||||||
{
|
{
|
||||||
CreateCmsContentTypeAllowedContentTypeData();
|
CreateCmsContentTypeAllowedContentTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tableName.Equals("cmsDataType"))
|
if(tableName.Equals("cmsDataType"))
|
||||||
{
|
{
|
||||||
CreateCmsDataTypeData();
|
CreateCmsDataTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsDataTypePreValues"))
|
if (tableName.Equals("cmsDataTypePreValues"))
|
||||||
{
|
{
|
||||||
CreateCmsDataTypePreValuesData();
|
CreateCmsDataTypePreValuesData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoRelationType"))
|
if (tableName.Equals("umbracoRelationType"))
|
||||||
{
|
{
|
||||||
CreateUmbracoRelationTypeData();
|
CreateUmbracoRelationTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("cmsTaskType"))
|
if (tableName.Equals("cmsTaskType"))
|
||||||
{
|
{
|
||||||
CreateCmsTaskTypeData();
|
CreateCmsTaskTypeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableName.Equals("umbracoMigration"))
|
if (tableName.Equals("umbracoMigration"))
|
||||||
{
|
{
|
||||||
CreateUmbracoMigrationData();
|
CreateUmbracoMigrationData();
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Info<BaseDataCreation>(string.Format("Done creating data in table {0}", tableName));
|
_logger.Info<BaseDataCreation>(string.Format("Done creating data in table {0}", tableName));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoNodeData()
|
private void CreateUmbracoNodeData()
|
||||||
{
|
{
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = new Guid(Constants.ObjectTypes.SystemRoot), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = new Guid(Constants.ObjectTypes.SystemRoot), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.ContentRecycleBin), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.ContentRecycleBin), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.MediaRecycleBin), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.MediaRecycleBin), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -92, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-92", SortOrder = 35, UniqueId = Constants.DataTypes.LabelGuid, Text = "Label", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -92, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-92", SortOrder = 35, UniqueId = new Guid("f0bc4bfb-b499-40d6-ba86-058885a5178c"), Text = "Label", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -90, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-90", SortOrder = 34, UniqueId = Constants.DataTypes.UploadGuid, Text = "Upload", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -90, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-90", SortOrder = 34, UniqueId = new Guid("84c6b441-31df-4ffe-b67e-67d5bc3ae65a"), Text = "Upload", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = Constants.DataTypes.TextareaGuid, Text = "Textarea", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = new Guid("c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"), Text = "Textarea", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -88, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-88", SortOrder = 32, UniqueId = Constants.DataTypes.TextstringGuid, Text = "Textstring", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -88, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-88", SortOrder = 32, UniqueId = new Guid("0cc0eba1-9960-42c9-bf9b-60e150b429ae"), Text = "Textstring", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -87, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-87", SortOrder = 4, UniqueId = Constants.DataTypes.RichtextEditorGuid, Text = "Richtext editor", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -87, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-87", SortOrder = 4, UniqueId = new Guid("ca90c950-0aff-4e72-b976-a30b1ac57dad"), Text = "Richtext editor", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = Constants.DataTypes.NumericGuid, Text = "Numeric", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = new Guid("2e6d3631-066e-44b8-aec4-96f09099b2b5"), Text = "Numeric", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -49, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-49", SortOrder = 2, UniqueId = Constants.DataTypes.CheckboxGuid, Text = "Checkbox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -49, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-49", SortOrder = 2, UniqueId = new Guid("92897bc6-a5f3-4ffe-ae27-f2e7e33dda49"), Text = "Checkbox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = Constants.DataTypes.CheckboxListGuid, Text = "Checkbox list", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = new Guid("fbaf13a8-4036-41f2-93a3-974f678c312a"), Text = "Checkbox list", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -42, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-42", SortOrder = 2, UniqueId = Constants.DataTypes.DropdownGuid, Text = "Dropdown", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -42, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-42", SortOrder = 2, UniqueId = new Guid("0b6a45e7-44ba-430d-9da5-4e46060b9e03"), Text = "Dropdown", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = Constants.DataTypes.DatePickerGuid, Text = "Date Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = new Guid("5046194e-4237-453c-a547-15db3a07c4e1"), Text = "Date Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = Constants.DataTypes.RadioboxGuid, Text = "Radiobox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = new Guid("bb5f57c9-ce2b-4bb9-b697-4caca783a805"), Text = "Radiobox", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -39, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-39", SortOrder = 2, UniqueId = Constants.DataTypes.DropdownMultipleGuid, Text = "Dropdown multiple", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -39, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-39", SortOrder = 2, UniqueId = new Guid("f38f0ac7-1d27-439c-9f3f-089cd8825a53"), Text = "Dropdown multiple", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = Constants.DataTypes.ApprovedColorGuid, Text = "Approved Color", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = new Guid("0225af17-b302-49cb-9176-b9f35cab9c17"), Text = "Approved Color", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -36, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-36", SortOrder = 2, UniqueId = Constants.DataTypes.DatePickerWithTimeGuid, Text = "Date Picker with time", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -36, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-36", SortOrder = 2, UniqueId = new Guid("e4d66c0f-b935-4200-81f0-025f7256b89a"), Text = "Date Picker with time", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultContentListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-95", SortOrder = 2, UniqueId = Constants.DataTypes.ListViewContentGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultContentListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-95", SortOrder = 2, UniqueId = new Guid("C0808DD3-8133-4E4B-8CE8-E2BEA84A96A4"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMediaListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-96", SortOrder = 2, UniqueId = Constants.DataTypes.ListViewMediaGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMediaListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-96", SortOrder = 2, UniqueId = new Guid("3A0156C4-3B8C-4803-BDC1-6871FAA83FFF"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMembersListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-97", SortOrder = 2, UniqueId = Constants.DataTypes.ListViewMembersGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = Constants.System.DefaultMembersListViewDataTypeId, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-97", SortOrder = 2, UniqueId = new Guid("AA2C52A0-CE87-4E65-A47C-7DF09358585D"), Text = Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1031, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1031", SortOrder = 2, UniqueId = new Guid("f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d"), Text = Constants.Conventions.MediaTypes.Folder, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1031, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1031", SortOrder = 2, UniqueId = new Guid("f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d"), Text = Constants.Conventions.MediaTypes.Folder, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1032, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1032", SortOrder = 2, UniqueId = new Guid("cc07b313-0843-4aa8-bbda-871c8da728c8"), Text = Constants.Conventions.MediaTypes.Image, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1032, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1032", SortOrder = 2, UniqueId = new Guid("cc07b313-0843-4aa8-bbda-871c8da728c8"), Text = Constants.Conventions.MediaTypes.Image, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1033, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1033", SortOrder = 2, UniqueId = new Guid("4c52d8ab-54e6-40cd-999c-7a5f24903e4d"), Text = Constants.Conventions.MediaTypes.File, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1033, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1033", SortOrder = 2, UniqueId = new Guid("4c52d8ab-54e6-40cd-999c-7a5f24903e4d"), Text = Constants.Conventions.MediaTypes.File, NodeObjectType = new Guid(Constants.ObjectTypes.MediaType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1041, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1041", SortOrder = 2, UniqueId = Constants.DataTypes.TagsGuid, Text = "Tags", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1041, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1041", SortOrder = 2, UniqueId = new Guid("b6b73142-b9c1-4bf8-a16d-e1c23320b549"), Text = "Tags", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1043, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1043", SortOrder = 2, UniqueId = Constants.DataTypes.ImageCropperGuid, Text = "Image Cropper", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1043, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1043", SortOrder = 2, UniqueId = new Guid("1df9f033-e6d4-451f-b8d2-e0cbc50a836f"), Text = "Image Cropper", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1044, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1044", SortOrder = 0, UniqueId = Constants.DataTypes.MemberGuid, Text = Constants.Conventions.MemberTypes.DefaultAlias, NodeObjectType = new Guid(Constants.ObjectTypes.MemberType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1044, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1044", SortOrder = 0, UniqueId = new Guid("d59be02f-1df9-4228-aa1e-01917d806cda"), Text = Constants.Conventions.MemberTypes.DefaultAlias, NodeObjectType = new Guid(Constants.ObjectTypes.MemberType), CreateDate = DateTime.Now });
|
||||||
|
|
||||||
//New UDI pickers with newer Ids
|
//New UDI pickers with newer Ids
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1046, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1046", SortOrder = 2, UniqueId = Constants.DataTypes.ContentPickerGuid, Text = "Content Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1046, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1046", SortOrder = 2, UniqueId = new Guid("FD1E0DA5-5606-4862-B679-5D0CF3A52A59"), Text = "Content Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = Constants.DataTypes.MemberPickerGuid, Text = "Member Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = new Guid("1EA2E01F-EBD8-4CE1-8D71-6B1149E63548"), Text = "Member Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = Constants.DataTypes.MediaPickerGuid, Text = "Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = new Guid("135D60E0-64D9-49ED-AB08-893C9BA44AE5"), Text = "Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = Constants.DataTypes.MultipleMediaPickerGuid, Text = "Multiple Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = new Guid("9DBBCBBB-2327-434A-B355-AF1B84E5010A"), Text = "Multiple Media Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = Constants.DataTypes.RelatedLinksGuid, Text = "Related Links", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Related Links", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoLockData()
|
private void CreateUmbracoLockData()
|
||||||
{
|
{
|
||||||
// all lock objects
|
// all lock objects
|
||||||
_database.Insert("umbracoLock", "id", false, new LockDto { Id = Constants.Locks.Servers, Name = "Servers" });
|
_database.Insert("umbracoLock", "id", false, new LockDto { Id = Constants.Locks.Servers, Name = "Servers" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsContentTypeData()
|
private void CreateCmsContentTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "icon-folder", Thumbnail = "icon-folder", IsContainer = false, AllowAtRoot = true });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = "icon-folder", Thumbnail = "icon-folder", IsContainer = false, AllowAtRoot = true });
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "icon-picture", Thumbnail = "icon-picture", AllowAtRoot = true });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = "icon-picture", Thumbnail = "icon-picture", AllowAtRoot = true });
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "icon-document", Thumbnail = "icon-document", AllowAtRoot = true });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = "icon-document", Thumbnail = "icon-document", AllowAtRoot = true });
|
||||||
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.DefaultAlias, Icon = "icon-user", Thumbnail = "icon-user" });
|
_database.Insert("cmsContentType", "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.DefaultAlias, Icon = "icon-user", Thumbnail = "icon-user" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUserData()
|
private void CreateUmbracoUserData()
|
||||||
{
|
{
|
||||||
_database.Insert("umbracoUser", "id", false, new UserDto { Id = 0, Disabled = false, NoConsole = false, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en-US", CreateDate = DateTime.Now, UpdateDate = DateTime.Now });
|
_database.Insert("umbracoUser", "id", false, new UserDto { Id = 0, Disabled = false, NoConsole = false, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en-US", CreateDate = DateTime.Now, UpdateDate = DateTime.Now });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUserGroupData()
|
private void CreateUmbracoUserGroupData()
|
||||||
{
|
{
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 1, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.AdminGroupAlias, Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-medal" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 1, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.AdminGroupAlias, Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-medal" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 2, StartMediaId = -1, StartContentId = -1, Alias = "writer", Name = "Writers", DefaultPermissions = "CAH:F", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-edit" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 2, StartMediaId = -1, StartContentId = -1, Alias = "writer", Name = "Writers", DefaultPermissions = "CAH:F", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-edit" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 3, StartMediaId = -1, StartContentId = -1, Alias = "editor", Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-tools" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 3, StartMediaId = -1, StartContentId = -1, Alias = "editor", Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-tools" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 4, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.TranslatorGroupAlias, Name = "Translators", DefaultPermissions = "AF", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-globe" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 4, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.TranslatorGroupAlias, Name = "Translators", DefaultPermissions = "AF", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-globe" });
|
||||||
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 5, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.SensitiveDataGroupAlias, Name = "Sensitive data", DefaultPermissions = "", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-lock" });
|
_database.Insert("umbracoUserGroup", "id", false, new UserGroupDto { Id = 5, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.SensitiveDataGroupAlias, Name = "Sensitive data", DefaultPermissions = "", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-lock" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUser2UserGroupData()
|
private void CreateUmbracoUser2UserGroupData()
|
||||||
{
|
{
|
||||||
_database.Insert(new User2UserGroupDto { UserGroupId = 1, UserId = 0 }); //add admin to admins
|
_database.Insert(new User2UserGroupDto { UserGroupId = 1, UserId = 0 }); //add admin to admins
|
||||||
_database.Insert(new User2UserGroupDto { UserGroupId = 5, UserId = 0 }); //add admin to sensitive data
|
_database.Insert(new User2UserGroupDto { UserGroupId = 5, UserId = 0 }); //add admin to sensitive data
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoUserGroup2AppData()
|
private void CreateUmbracoUserGroup2AppData()
|
||||||
{
|
{
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Content });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Content });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Developer });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Developer });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Media });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Media });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Members });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Members });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Settings });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Settings });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Users });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Users });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Forms });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Forms });
|
||||||
|
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 2, AppAlias = Constants.Applications.Content });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 2, AppAlias = Constants.Applications.Content });
|
||||||
|
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Content });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Content });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Media });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Media });
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Forms });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Forms });
|
||||||
|
|
||||||
_database.Insert(new UserGroup2AppDto { UserGroupId = 4, AppAlias = Constants.Applications.Translation });
|
_database.Insert(new UserGroup2AppDto { UserGroupId = 4, AppAlias = Constants.Applications.Translation });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsPropertyTypeGroupData()
|
private void CreateCmsPropertyTypeGroupData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 3, ContentTypeNodeId = 1032, Text = "Image", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Image) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 3, ContentTypeNodeId = 1032, Text = "Image", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Image) });
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 4, ContentTypeNodeId = 1033, Text = "File", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.File) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 4, ContentTypeNodeId = 1033, Text = "File", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.File) });
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 5, ContentTypeNodeId = 1031, Text = "Contents", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Contents) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 5, ContentTypeNodeId = 1031, Text = "Contents", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Contents) });
|
||||||
//membership property group
|
//membership property group
|
||||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 11, ContentTypeNodeId = 1044, Text = "Membership", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Membership) });
|
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 11, ContentTypeNodeId = 1044, Text = "Membership", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Membership) });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsPropertyTypeData()
|
private void CreateCmsPropertyTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = 1043, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = 1043, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 10, UniqueId = 10.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 10, UniqueId = 10.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = -90, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = -90, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 25, UniqueId = 25.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 25, UniqueId = 25.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 26, UniqueId = 26.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 26, UniqueId = 26.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 27, UniqueId = 27.ToGuid(), DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, ContentTypeId = 1031, PropertyTypeGroupId = 5, Alias = "contents", Name = "Contents:", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 27, UniqueId = 27.ToGuid(), DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, ContentTypeId = 1031, PropertyTypeGroupId = 5, Alias = "contents", Name = "Contents:", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
//membership property types
|
//membership property types
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = -89, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.Comments, Name = Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = -89, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.Comments, Name = Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 29, UniqueId = 29.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.FailedPasswordAttempts, Name = Constants.Conventions.Member.FailedPasswordAttemptsLabel, SortOrder = 1, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 29, UniqueId = 29.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.FailedPasswordAttempts, Name = Constants.Conventions.Member.FailedPasswordAttemptsLabel, SortOrder = 1, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsApproved, Name = Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsApproved, Name = Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsLockedOut, Name = Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = -49, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsLockedOut, Name = Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 32, UniqueId = 32.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLockoutDate, Name = Constants.Conventions.Member.LastLockoutDateLabel, SortOrder = 4, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 32, UniqueId = 32.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLockoutDate, Name = Constants.Conventions.Member.LastLockoutDateLabel, SortOrder = 4, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 33, UniqueId = 33.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLoginDate, Name = Constants.Conventions.Member.LastLoginDateLabel, SortOrder = 5, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 33, UniqueId = 33.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLoginDate, Name = Constants.Conventions.Member.LastLoginDateLabel, SortOrder = 5, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 34, UniqueId = 34.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastPasswordChangeDate, Name = Constants.Conventions.Member.LastPasswordChangeDateLabel, SortOrder = 6, Mandatory = false, ValidationRegExp = null, Description = null });
|
_database.Insert("cmsPropertyType", "id", false, new PropertyTypeDto { Id = 34, UniqueId = 34.ToGuid(), DataTypeId = -92, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastPasswordChangeDate, Name = Constants.Conventions.Member.LastPasswordChangeDateLabel, SortOrder = 6, Mandatory = false, ValidationRegExp = null, Description = null });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoLanguageData()
|
private void CreateUmbracoLanguageData()
|
||||||
{
|
{
|
||||||
_database.Insert("umbracoLanguage", "id", false, new LanguageDto { Id = 1, IsoCode = "en-US", CultureName = "en-US" });
|
_database.Insert("umbracoLanguage", "id", false, new LanguageDto { Id = 1, IsoCode = "en-US", CultureName = "en-US" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsContentTypeAllowedContentTypeData()
|
private void CreateCmsContentTypeAllowedContentTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1031 });
|
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1031 });
|
||||||
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1032 });
|
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1032 });
|
||||||
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1033 });
|
_database.Insert("cmsContentTypeAllowedContentType", "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1033 });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsDataTypeData()
|
private void CreateCmsDataTypeData()
|
||||||
{
|
{
|
||||||
//TODO Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
|
//TODO Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 1, DataTypeId = -49, PropertyEditorAlias = Constants.PropertyEditors.TrueFalseAlias, DbType = "Integer" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 1, DataTypeId = -49, PropertyEditorAlias = Constants.PropertyEditors.TrueFalseAlias, DbType = "Integer" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 2, DataTypeId = -51, PropertyEditorAlias = Constants.PropertyEditors.IntegerAlias, DbType = "Integer" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 2, DataTypeId = -51, PropertyEditorAlias = Constants.PropertyEditors.IntegerAlias, DbType = "Integer" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 3, DataTypeId = -87, PropertyEditorAlias = Constants.PropertyEditors.TinyMCEAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 3, DataTypeId = -87, PropertyEditorAlias = Constants.PropertyEditors.TinyMCEAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 4, DataTypeId = -88, PropertyEditorAlias = Constants.PropertyEditors.TextboxAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 4, DataTypeId = -88, PropertyEditorAlias = Constants.PropertyEditors.TextboxAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 5, DataTypeId = -89, PropertyEditorAlias = Constants.PropertyEditors.TextboxMultipleAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 5, DataTypeId = -89, PropertyEditorAlias = Constants.PropertyEditors.TextboxMultipleAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 6, DataTypeId = -90, PropertyEditorAlias = Constants.PropertyEditors.UploadFieldAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 6, DataTypeId = -90, PropertyEditorAlias = Constants.PropertyEditors.UploadFieldAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 7, DataTypeId = -92, PropertyEditorAlias = Constants.PropertyEditors.NoEditAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 7, DataTypeId = -92, PropertyEditorAlias = Constants.PropertyEditors.NoEditAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 8, DataTypeId = -36, PropertyEditorAlias = Constants.PropertyEditors.DateTimeAlias, DbType = "Date" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 8, DataTypeId = -36, PropertyEditorAlias = Constants.PropertyEditors.DateTimeAlias, DbType = "Date" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 9, DataTypeId = -37, PropertyEditorAlias = Constants.PropertyEditors.ColorPickerAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 9, DataTypeId = -37, PropertyEditorAlias = Constants.PropertyEditors.ColorPickerAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 11, DataTypeId = -39, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 11, DataTypeId = -39, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 12, DataTypeId = -40, PropertyEditorAlias = Constants.PropertyEditors.RadioButtonListAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 12, DataTypeId = -40, PropertyEditorAlias = Constants.PropertyEditors.RadioButtonListAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 13, DataTypeId = -41, PropertyEditorAlias = Constants.PropertyEditors.DateAlias, DbType = "Date" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 13, DataTypeId = -41, PropertyEditorAlias = Constants.PropertyEditors.DateAlias, DbType = "Date" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 14, DataTypeId = -42, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Integer" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 14, DataTypeId = -42, PropertyEditorAlias = Constants.PropertyEditors.DropDownListFlexibleAlias, DbType = "Integer" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 15, DataTypeId = -43, PropertyEditorAlias = Constants.PropertyEditors.CheckBoxListAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 15, DataTypeId = -43, PropertyEditorAlias = Constants.PropertyEditors.CheckBoxListAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 22, DataTypeId = 1041, PropertyEditorAlias = Constants.PropertyEditors.TagsAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 22, DataTypeId = 1041, PropertyEditorAlias = Constants.PropertyEditors.TagsAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 24, DataTypeId = 1043, PropertyEditorAlias = Constants.PropertyEditors.ImageCropperAlias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 24, DataTypeId = 1043, PropertyEditorAlias = Constants.PropertyEditors.ImageCropperAlias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -26, DataTypeId = Constants.System.DefaultContentListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -26, DataTypeId = Constants.System.DefaultContentListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -27, DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -27, DataTypeId = Constants.System.DefaultMediaListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -28, DataTypeId = Constants.System.DefaultMembersListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = -28, DataTypeId = Constants.System.DefaultMembersListViewDataTypeId, PropertyEditorAlias = Constants.PropertyEditors.ListViewAlias, DbType = "Nvarchar" });
|
||||||
|
|
||||||
//New UDI pickers with newer Ids
|
//New UDI pickers with newer Ids
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 26, DataTypeId = 1046, PropertyEditorAlias = Constants.PropertyEditors.ContentPicker2Alias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 26, DataTypeId = 1046, PropertyEditorAlias = Constants.PropertyEditors.ContentPicker2Alias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 27, DataTypeId = 1047, PropertyEditorAlias = Constants.PropertyEditors.MemberPicker2Alias, DbType = "Nvarchar" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 27, DataTypeId = 1047, PropertyEditorAlias = Constants.PropertyEditors.MemberPicker2Alias, DbType = "Nvarchar" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 28, DataTypeId = 1048, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 28, DataTypeId = 1048, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 29, DataTypeId = 1049, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 29, DataTypeId = 1049, PropertyEditorAlias = Constants.PropertyEditors.MediaPicker2Alias, DbType = "Ntext" });
|
||||||
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 30, DataTypeId = 1050, PropertyEditorAlias = Constants.PropertyEditors.RelatedLinks2Alias, DbType = "Ntext" });
|
_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 30, DataTypeId = 1050, PropertyEditorAlias = Constants.PropertyEditors.RelatedLinks2Alias, DbType = "Ntext" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsDataTypePreValuesData()
|
private void CreateCmsDataTypePreValuesData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 3, Alias = "", SortOrder = 0, DataTypeNodeId = -87, Value = ",code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,umbracoembed,mcecharmap,|1|1,2,3,|0|500,400|1049,|true|" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 3, Alias = "", SortOrder = 0, DataTypeNodeId = -87, Value = ",code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,umbracoembed,mcecharmap,|1|1,2,3,|0|500,400|1049,|true|" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 4, Alias = "group", SortOrder = 0, DataTypeNodeId = 1041, Value = "default" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 4, Alias = "group", SortOrder = 0, DataTypeNodeId = 1041, Value = "default" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 5, Alias = "storageType", SortOrder = 0, DataTypeNodeId = 1041, Value = "Json" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 5, Alias = "storageType", SortOrder = 0, DataTypeNodeId = 1041, Value = "Json" });
|
||||||
|
|
||||||
//defaults for the member list
|
//defaults for the member list
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -1, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "10" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -1, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "10" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -2, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "username" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -2, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "username" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -3, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "asc" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -3, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "asc" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -4, Alias = "includeProperties", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "[{\"alias\":\"username\",\"isSystem\":1},{\"alias\":\"email\",\"isSystem\":1},{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1}]" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -4, Alias = "includeProperties", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMembersListViewDataTypeId, Value = "[{\"alias\":\"username\",\"isSystem\":1},{\"alias\":\"email\",\"isSystem\":1},{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1}]" });
|
||||||
|
|
||||||
//layouts for the list view
|
//layouts for the list view
|
||||||
var cardLayout = "{\"name\": \"Grid\",\"path\": \"views/propertyeditors/listview/layouts/grid/grid.html\", \"icon\": \"icon-thumbnails-small\", \"isSystem\": 1, \"selected\": true}";
|
var cardLayout = "{\"name\": \"Grid\",\"path\": \"views/propertyeditors/listview/layouts/grid/grid.html\", \"icon\": \"icon-thumbnails-small\", \"isSystem\": 1, \"selected\": true}";
|
||||||
var listLayout = "{\"name\": \"List\",\"path\": \"views/propertyeditors/listview/layouts/list/list.html\",\"icon\": \"icon-list\", \"isSystem\": 1,\"selected\": true}";
|
var listLayout = "{\"name\": \"List\",\"path\": \"views/propertyeditors/listview/layouts/list/list.html\",\"icon\": \"icon-list\", \"isSystem\": 1,\"selected\": true}";
|
||||||
|
|
||||||
//defaults for the media list
|
//defaults for the media list
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -5, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "100" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -5, Alias = "pageSize", SortOrder = 1, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "100" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -6, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "updateDate" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -6, Alias = "orderBy", SortOrder = 2, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "updateDate" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -7, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "desc" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -7, Alias = "orderDirection", SortOrder = 3, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "desc" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -8, Alias = "layouts", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[" + cardLayout + "," + listLayout + "]" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -8, Alias = "layouts", SortOrder = 4, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[" + cardLayout + "," + listLayout + "]" });
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -9, Alias = "includeProperties", SortOrder = 5, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = -9, Alias = "includeProperties", SortOrder = 5, DataTypeNodeId = Constants.System.DefaultMediaListViewDataTypeId, Value = "[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]" });
|
||||||
|
|
||||||
//default's for MultipleMediaPickerAlias picker
|
//default's for MultipleMediaPickerAlias picker
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 6, Alias = "multiPicker", SortOrder = 0, DataTypeNodeId = 1049, Value = "1" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 6, Alias = "multiPicker", SortOrder = 0, DataTypeNodeId = 1049, Value = "1" });
|
||||||
|
|
||||||
// Defaults for single item dropdown
|
// Defaults for single item dropdown
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 7, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -42, Value = "0" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 7, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -42, Value = "0" });
|
||||||
|
|
||||||
// Defaults for multiple item dropdown
|
// Defaults for multiple item dropdown
|
||||||
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 8, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -39, Value = "1" });
|
_database.Insert("cmsDataTypePreValues", "id", false, new DataTypePreValueDto { Id = 8, Alias = "multiple", SortOrder = 0, DataTypeNodeId = -39, Value = "1" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoRelationTypeData()
|
private void CreateUmbracoRelationTypeData()
|
||||||
{
|
{
|
||||||
var relationType = new RelationTypeDto { Id = 1, Alias = Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = true, Name = Constants.Conventions.RelationTypes.RelateDocumentOnCopyName };
|
var relationType = new RelationTypeDto { Id = 1, Alias = Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = true, Name = Constants.Conventions.RelationTypes.RelateDocumentOnCopyName };
|
||||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||||
_database.Insert("umbracoRelationType", "id", false, relationType);
|
_database.Insert("umbracoRelationType", "id", false, relationType);
|
||||||
relationType = new RelationTypeDto { Id = 2, Alias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName };
|
relationType = new RelationTypeDto { Id = 2, Alias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Document), ParentObjectType = new Guid(Constants.ObjectTypes.Document), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName };
|
||||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||||
_database.Insert("umbracoRelationType", "id", false, relationType);
|
_database.Insert("umbracoRelationType", "id", false, relationType);
|
||||||
relationType = new RelationTypeDto { Id = 3, Alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Media), ParentObjectType = new Guid(Constants.ObjectTypes.Media), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName };
|
relationType = new RelationTypeDto { Id = 3, Alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias, ChildObjectType = new Guid(Constants.ObjectTypes.Media), ParentObjectType = new Guid(Constants.ObjectTypes.Media), Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName };
|
||||||
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
relationType.UniqueId = (relationType.Alias + "____" + relationType.Name).ToGuid();
|
||||||
_database.Insert("umbracoRelationType", "id", false, relationType);
|
_database.Insert("umbracoRelationType", "id", false, relationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCmsTaskTypeData()
|
private void CreateCmsTaskTypeData()
|
||||||
{
|
{
|
||||||
_database.Insert("cmsTaskType", "id", false, new TaskTypeDto { Id = 1, Alias = "toTranslate" });
|
_database.Insert("cmsTaskType", "id", false, new TaskTypeDto { Id = 1, Alias = "toTranslate" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateUmbracoMigrationData()
|
private void CreateUmbracoMigrationData()
|
||||||
{
|
{
|
||||||
var dto = new MigrationDto
|
var dto = new MigrationDto
|
||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
Name = Constants.System.UmbracoMigrationName,
|
Name = Constants.System.UmbracoMigrationName,
|
||||||
Version = UmbracoVersion.GetSemanticVersion().ToString(),
|
Version = UmbracoVersion.GetSemanticVersion().ToString(),
|
||||||
CreateDate = DateTime.Now
|
CreateDate = DateTime.Now
|
||||||
};
|
};
|
||||||
|
|
||||||
_database.Insert("umbracoMigration", "pk", false, dto);
|
_database.Insert("umbracoMigration", "pk", false, dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
using Umbraco.Core.Logging;
|
|
||||||
using Umbraco.Core.Persistence.SqlSyntax;
|
|
||||||
|
|
||||||
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFourteenZero
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Migrates member group picker properties from NVarchar to NText. See https://github.com/umbraco/Umbraco-CMS/issues/3268.
|
|
||||||
/// </summary>
|
|
||||||
[Migration("7.14.0", 1, Constants.System.UmbracoMigrationName)]
|
|
||||||
public class UpdateMemberGroupPickerData : MigrationBase
|
|
||||||
{
|
|
||||||
public UpdateMemberGroupPickerData(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Up()
|
|
||||||
{
|
|
||||||
// move the data for all member group properties from the NVarchar to the NText column and clear the NVarchar column
|
|
||||||
Execute.Sql($@"UPDATE cmsPropertyData SET dataNtext = dataNvarchar, dataNvarchar = NULL
|
|
||||||
WHERE dataNtext IS NULL AND id IN (
|
|
||||||
SELECT id FROM cmsPropertyData WHERE propertyTypeId in (
|
|
||||||
SELECT id from cmsPropertyType where dataTypeID IN (
|
|
||||||
SELECT nodeId FROM cmsDataType WHERE propertyEditorAlias = '{Constants.PropertyEditors.MemberGroupPickerAlias}'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)");
|
|
||||||
|
|
||||||
// ensure that all exising member group properties are defined as NText
|
|
||||||
Execute.Sql($"UPDATE cmsDataType SET dbType = 'Ntext' WHERE propertyEditorAlias = '{Constants.PropertyEditors.MemberGroupPickerAlias}'");
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Down()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -19,8 +19,6 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
XmlDocument BuildXmlCache();
|
XmlDocument BuildXmlCache();
|
||||||
|
|
||||||
XmlDocument BuildPreviewXmlCache();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the count of published items
|
/// Get the count of published items
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -98,4 +96,4 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
/// <param name="xml"></param>
|
/// <param name="xml"></param>
|
||||||
void AddOrUpdatePreviewXml(IContent content, Func<IContent, XElement> xml);
|
void AddOrUpdatePreviewXml(IContent content, Func<IContent, XElement> xml);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,9 +95,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
|||||||
.InnerJoin<ContentDto>(SqlSyntax)
|
.InnerJoin<ContentDto>(SqlSyntax)
|
||||||
.On<ContentVersionDto, ContentDto>(SqlSyntax, left => left.NodeId, right => right.NodeId)
|
.On<ContentVersionDto, ContentDto>(SqlSyntax, left => left.NodeId, right => right.NodeId)
|
||||||
.InnerJoin<NodeDto>(SqlSyntax)
|
.InnerJoin<NodeDto>(SqlSyntax)
|
||||||
.On<ContentDto, NodeDto>(SqlSyntax, left => left.NodeId, right => right.NodeId)
|
.On<ContentDto, NodeDto>(SqlSyntax, left => left.NodeId, right => right.NodeId);
|
||||||
.InnerJoin<ContentTypeDto>(SqlSyntax)
|
|
||||||
.On<ContentTypeDto, ContentDto>(SqlSyntax, left => left.NodeId, right => right.ContentTypeId);
|
|
||||||
|
|
||||||
if (includeFilePaths)
|
if (includeFilePaths)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -267,8 +267,8 @@ ORDER BY colName";
|
|||||||
|
|
||||||
var fromDate = DateTime.UtcNow - timespan;
|
var fromDate = DateTime.UtcNow - timespan;
|
||||||
|
|
||||||
var count = Database.ExecuteScalar<int>("SELECT COUNT(*) FROM umbracoUserLogin WHERE lastValidatedUtc<=@fromDate", new { fromDate = fromDate });
|
var count = Database.ExecuteScalar<int>("SELECT COUNT(*) FROM umbracoUserLogin WHERE lastValidatedUtc=@fromDate", new { fromDate = fromDate });
|
||||||
Database.Execute("DELETE FROM umbracoUserLogin WHERE lastValidatedUtc<=@fromDate", new { fromDate = fromDate });
|
Database.Execute("DELETE FROM umbracoUserLogin WHERE lastValidatedUtc=@fromDate", new { fromDate = fromDate });
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -703,8 +703,6 @@ ORDER BY contentNodeId, versionId, propertytypeid
|
|||||||
// Members only
|
// Members only
|
||||||
case "USERNAME":
|
case "USERNAME":
|
||||||
return "cmsMember.LoginName";
|
return "cmsMember.LoginName";
|
||||||
case "CONTENTTYPEALIAS":
|
|
||||||
return "cmsContentType.alias";
|
|
||||||
default:
|
default:
|
||||||
//ensure invalid SQL cannot be submitted
|
//ensure invalid SQL cannot be submitted
|
||||||
return Regex.Replace(orderBy, @"[^\w\.,`\[\]@-]", "");
|
return Regex.Replace(orderBy, @"[^\w\.,`\[\]@-]", "");
|
||||||
|
|||||||
@@ -53,12 +53,6 @@ namespace Umbraco.Core.PropertyEditors
|
|||||||
nestedContentEditorFromPackage.Name = "(Obsolete) " + nestedContentEditorFromPackage.Name;
|
nestedContentEditorFromPackage.Name = "(Obsolete) " + nestedContentEditorFromPackage.Name;
|
||||||
nestedContentEditorFromPackage.IsDeprecated = true;
|
nestedContentEditorFromPackage.IsDeprecated = true;
|
||||||
}
|
}
|
||||||
var multiUrlPickerEditorFromPackage = editors.FirstOrDefault(x => x.Alias == "RJP.MultiUrlPicker");
|
|
||||||
if (multiUrlPickerEditorFromPackage != null)
|
|
||||||
{
|
|
||||||
multiUrlPickerEditorFromPackage.Name = "(Obsolete) " + multiUrlPickerEditorFromPackage.Name;
|
|
||||||
multiUrlPickerEditorFromPackage.IsDeprecated = true;
|
|
||||||
}
|
|
||||||
return editors;
|
return editors;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,22 +42,16 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
|
|||||||
|
|
||||||
public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
|
public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
|
||||||
{
|
{
|
||||||
var sourceAsString = source?.ToString();
|
|
||||||
if(sourceAsString.IsNullOrWhiteSpace())
|
|
||||||
{
|
|
||||||
return new string[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
// if Json storage type deserialzie and return as string array
|
// if Json storage type deserialzie and return as string array
|
||||||
if (JsonStorageType(propertyType.DataTypeId))
|
if (JsonStorageType(propertyType.DataTypeId))
|
||||||
{
|
{
|
||||||
var jArray = JsonConvert.DeserializeObject<JArray>(sourceAsString);
|
var jArray = JsonConvert.DeserializeObject<JArray>(source.ToString());
|
||||||
return jArray.ToObject<string[]>();
|
return jArray.ToObject<string[]>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise assume CSV storage type and return as string array
|
// Otherwise assume CSV storage type and return as string array
|
||||||
var csvTags =
|
var csvTags =
|
||||||
sourceAsString
|
source.ToString()
|
||||||
.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)
|
.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
return csvTags;
|
return csvTags;
|
||||||
|
|||||||
@@ -107,11 +107,6 @@ namespace Umbraco.Core.Security
|
|||||||
|
|
||||||
await EnsureValidSessionId(context);
|
await EnsureValidSessionId(context);
|
||||||
|
|
||||||
if (context?.Identity == null)
|
|
||||||
{
|
|
||||||
context?.OwinContext.Authentication.SignOut(context.Options.AuthenticationType);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await base.ValidateIdentity(context);
|
await base.ValidateIdentity(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2885
-2945
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Umbraco.Core.Models;
|
|
||||||
|
|
||||||
namespace Umbraco.Core.Services
|
|
||||||
{
|
|
||||||
internal static class DateTypeServiceExtensions
|
|
||||||
{
|
|
||||||
public static bool IsDataTypeIgnoringUserStartNodes(this IDataTypeService dataTypeService, Guid key)
|
|
||||||
{
|
|
||||||
if (DataTypeExtensions.IsBuildInDataType(key)) return false; //built in ones can never be ignoring start nodes
|
|
||||||
|
|
||||||
var dataType = dataTypeService.GetDataTypeDefinitionById(key);
|
|
||||||
|
|
||||||
if (dataType != null)
|
|
||||||
{
|
|
||||||
var preValues = dataTypeService.GetPreValuesCollectionByDataTypeId(dataType.Id);
|
|
||||||
if (preValues.FormatAsDictionary().TryGetValue(
|
|
||||||
Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, out var preValue))
|
|
||||||
return preValue.Value.InvariantEquals("1");
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,167 +1,167 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models;
|
||||||
using umbraco.interfaces;
|
using umbraco.interfaces;
|
||||||
|
|
||||||
namespace Umbraco.Core.Services
|
namespace Umbraco.Core.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the DataType Service, which is an easy access to operations involving <see cref="IDataTypeDefinition"/>
|
/// Defines the DataType Service, which is an easy access to operations involving <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDataTypeService : IService
|
public interface IDataTypeService : IService
|
||||||
{
|
{
|
||||||
Attempt<OperationStatus<EntityContainer, OperationStatusType>> CreateContainer(int parentId, string name, int userId = 0);
|
Attempt<OperationStatus<EntityContainer, OperationStatusType>> CreateContainer(int parentId, string name, int userId = 0);
|
||||||
Attempt<OperationStatus> SaveContainer(EntityContainer container, int userId = 0);
|
Attempt<OperationStatus> SaveContainer(EntityContainer container, int userId = 0);
|
||||||
EntityContainer GetContainer(int containerId);
|
EntityContainer GetContainer(int containerId);
|
||||||
EntityContainer GetContainer(Guid containerId);
|
EntityContainer GetContainer(Guid containerId);
|
||||||
IEnumerable<EntityContainer> GetContainers(string folderName, int level);
|
IEnumerable<EntityContainer> GetContainers(string folderName, int level);
|
||||||
IEnumerable<EntityContainer> GetContainers(IDataTypeDefinition dataTypeDefinition);
|
IEnumerable<EntityContainer> GetContainers(IDataTypeDefinition dataTypeDefinition);
|
||||||
IEnumerable<EntityContainer> GetContainers(int[] containerIds);
|
IEnumerable<EntityContainer> GetContainers(int[] containerIds);
|
||||||
Attempt<OperationStatus> DeleteContainer(int containerId, int userId = 0);
|
Attempt<OperationStatus> DeleteContainer(int containerId, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Name
|
/// Gets a <see cref="IDataTypeDefinition"/> by its Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">Name of the <see cref="IDataTypeDefinition"/></param>
|
/// <param name="name">Name of the <see cref="IDataTypeDefinition"/></param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
IDataTypeDefinition GetDataTypeDefinitionByName(string name);
|
IDataTypeDefinition GetDataTypeDefinitionByName(string name);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/></param>
|
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/></param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
IDataTypeDefinition GetDataTypeDefinitionById(int id);
|
IDataTypeDefinition GetDataTypeDefinitionById(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its unique guid Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its unique guid Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Unique guid Id of the DataType</param>
|
/// <param name="id">Unique guid Id of the DataType</param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
IDataTypeDefinition GetDataTypeDefinitionById(Guid id);
|
IDataTypeDefinition GetDataTypeDefinitionById(Guid id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all <see cref="IDataTypeDefinition"/> objects or those with the ids passed in
|
/// Gets all <see cref="IDataTypeDefinition"/> objects or those with the ids passed in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ids">Optional array of Ids</param>
|
/// <param name="ids">Optional array of Ids</param>
|
||||||
/// <returns>An enumerable list of <see cref="IDataTypeDefinition"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IDataTypeDefinition"/> objects</returns>
|
||||||
IEnumerable<IDataTypeDefinition> GetAllDataTypeDefinitions(params int[] ids);
|
IEnumerable<IDataTypeDefinition> GetAllDataTypeDefinitions(params int[] ids);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves an <see cref="IDataTypeDefinition"/>
|
/// Saves an <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to save</param>
|
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to save</param>
|
||||||
/// <param name="userId">Id of the user issueing the save</param>
|
/// <param name="userId">Id of the user issueing the save</param>
|
||||||
void Save(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
void Save(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
||||||
/// <param name="userId">Id of the user issueing the save</param>
|
/// <param name="userId">Id of the user issueing the save</param>
|
||||||
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId = 0);
|
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
/// Saves a collection of <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
/// <param name="dataTypeDefinitions"><see cref="IDataTypeDefinition"/> to save</param>
|
||||||
/// <param name="userId">Id of the user issueing the save</param>
|
/// <param name="userId">Id of the user issueing the save</param>
|
||||||
/// <param name="raiseEvents">Boolean indicating whether or not to raise events</param>
|
/// <param name="raiseEvents">Boolean indicating whether or not to raise events</param>
|
||||||
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId, bool raiseEvents);
|
void Save(IEnumerable<IDataTypeDefinition> dataTypeDefinitions, int userId, bool raiseEvents);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes an <see cref="IDataTypeDefinition"/>
|
/// Deletes an <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Please note that deleting a <see cref="IDataTypeDefinition"/> will remove
|
/// Please note that deleting a <see cref="IDataTypeDefinition"/> will remove
|
||||||
/// all the <see cref="PropertyType"/> data that references this <see cref="IDataTypeDefinition"/>.
|
/// all the <see cref="PropertyType"/> data that references this <see cref="IDataTypeDefinition"/>.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to delete</param>
|
/// <param name="dataTypeDefinition"><see cref="IDataTypeDefinition"/> to delete</param>
|
||||||
/// <param name="userId">Id of the user issueing the deletion</param>
|
/// <param name="userId">Id of the user issueing the deletion</param>
|
||||||
void Delete(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
void Delete(IDataTypeDefinition dataTypeDefinition, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="IDataType"/> specified by it's unique ID
|
/// Gets the <see cref="IDataType"/> specified by it's unique ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the DataType, which corresponds to the Guid Id of the control</param>
|
/// <param name="id">Id of the DataType, which corresponds to the Guid Id of the control</param>
|
||||||
/// <returns><see cref="IDataType"/> object</returns>
|
/// <returns><see cref="IDataType"/> object</returns>
|
||||||
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
||||||
IDataType GetDataTypeById(Guid id);
|
IDataType GetDataTypeById(Guid id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a complete list of all registered <see cref="IDataType"/>'s
|
/// Gets a complete list of all registered <see cref="IDataType"/>'s
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An enumerable list of <see cref="IDataType"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IDataType"/> objects</returns>
|
||||||
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
[Obsolete("IDataType is obsolete and is no longer used, it will be removed from the codebase in future versions")]
|
||||||
IEnumerable<IDataType> GetAllDataTypes();
|
IEnumerable<IDataType> GetAllDataTypes();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the DataType control</param>
|
/// <param name="id">Id of the DataType control</param>
|
||||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||||
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the overload GetDataTypeDefinitionByPropertyEditorAlias instead")]
|
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the overload GetDataTypeDefinitionByPropertyEditorAlias instead")]
|
||||||
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByControlId(Guid id);
|
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByControlId(Guid id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
/// Gets a <see cref="IDataTypeDefinition"/> by its control Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="propertyEditorAlias">Alias of the property editor</param>
|
/// <param name="propertyEditorAlias">Alias of the property editor</param>
|
||||||
/// <returns>Collection of <see cref="IDataTypeDefinition"/> objects with a matching contorl id</returns>
|
/// <returns>Collection of <see cref="IDataTypeDefinition"/> objects with a matching contorl id</returns>
|
||||||
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByPropertyEditorAlias(string propertyEditorAlias);
|
IEnumerable<IDataTypeDefinition> GetDataTypeDefinitionByPropertyEditorAlias(string propertyEditorAlias);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all values for an <see cref="IDataTypeDefinition"/>
|
/// Gets all values for an <see cref="IDataTypeDefinition"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/> to retrieve prevalues from</param>
|
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/> to retrieve prevalues from</param>
|
||||||
/// <returns>An enumerable list of string values</returns>
|
/// <returns>An enumerable list of string values</returns>
|
||||||
IEnumerable<string> GetPreValuesByDataTypeId(int id);
|
IEnumerable<string> GetPreValuesByDataTypeId(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a pre-value collection by data type id
|
/// Gets a pre-value collection by data type id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
PreValueCollection GetPreValuesCollectionByDataTypeId(int id);
|
PreValueCollection GetPreValuesCollectionByDataTypeId(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a list of PreValues for a given DataTypeDefinition
|
/// Saves a list of PreValues for a given DataTypeDefinition
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
||||||
/// <param name="values">List of string values to save</param>
|
/// <param name="values">List of string values to save</param>
|
||||||
[Obsolete("This should no longer be used, use the alternative SavePreValues or SaveDataTypeAndPreValues methods instead. This will only insert pre-values without keys")]
|
[Obsolete("This should no longer be used, use the alternative SavePreValues or SaveDataTypeAndPreValues methods instead. This will only insert pre-values without keys")]
|
||||||
void SavePreValues(int dataTypeId, IEnumerable<string> values);
|
void SavePreValues(int dataTypeId, IEnumerable<string> values);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a list of PreValues for a given DataTypeDefinition
|
/// Saves a list of PreValues for a given DataTypeDefinition
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
/// <param name="dataTypeId">Id of the DataTypeDefinition to save PreValues for</param>
|
||||||
/// <param name="values">List of key/value pairs to save</param>
|
/// <param name="values">List of key/value pairs to save</param>
|
||||||
void SavePreValues(int dataTypeId, IDictionary<string, PreValue> values);
|
void SavePreValues(int dataTypeId, IDictionary<string, PreValue> values);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves a list of PreValues for a given DataTypeDefinition
|
/// Saves a list of PreValues for a given DataTypeDefinition
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinition">The DataTypeDefinition to save PreValues for</param>
|
/// <param name="dataTypeDefinition">The DataTypeDefinition to save PreValues for</param>
|
||||||
/// <param name="values">List of key/value pairs to save</param>
|
/// <param name="values">List of key/value pairs to save</param>
|
||||||
void SavePreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values);
|
void SavePreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves the data type and it's prevalues
|
/// Saves the data type and it's prevalues
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataTypeDefinition"></param>
|
/// <param name="dataTypeDefinition"></param>
|
||||||
/// <param name="values"></param>
|
/// <param name="values"></param>
|
||||||
/// <param name="userId"></param>
|
/// <param name="userId"></param>
|
||||||
void SaveDataTypeAndPreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values, int userId = 0);
|
void SaveDataTypeAndPreValues(IDataTypeDefinition dataTypeDefinition, IDictionary<string, PreValue> values, int userId = 0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a specific PreValue by its Id
|
/// Gets a specific PreValue by its Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the PreValue to retrieve the value from</param>
|
/// <param name="id">Id of the PreValue to retrieve the value from</param>
|
||||||
/// <returns>PreValue as a string</returns>
|
/// <returns>PreValue as a string</returns>
|
||||||
string GetPreValueAsString(int id);
|
string GetPreValueAsString(int id);
|
||||||
|
|
||||||
Attempt<OperationStatus<MoveOperationStatusType>> Move(IDataTypeDefinition toMove, int parentId);
|
Attempt<OperationStatus<MoveOperationStatusType>> Move(IDataTypeDefinition toMove, int parentId);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,306 +1,298 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using Umbraco.Core.Models;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
|
||||||
|
namespace Umbraco.Core.Services
|
||||||
namespace Umbraco.Core.Services
|
{
|
||||||
{
|
public interface IEntityService
|
||||||
public interface IEntityService
|
{
|
||||||
{
|
/// <summary>
|
||||||
/// <summary>
|
/// Returns true if the entity exists
|
||||||
/// Returns true if the entity exists
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="key"></param>
|
||||||
/// <param name="key"></param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
bool Exists(Guid key);
|
||||||
bool Exists(Guid key);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Returns true if the entity exists
|
||||||
/// Returns true if the entity exists
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id"></param>
|
||||||
/// <param name="id"></param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
bool Exists(int id);
|
||||||
bool Exists(int id);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Returns the integer id for a given GUID
|
||||||
/// Returns the integer id for a given GUID
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="key"></param>
|
||||||
/// <param name="key"></param>
|
/// <param name="umbracoObjectType"></param>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
|
||||||
Attempt<int> GetIdForKey(Guid key, UmbracoObjectTypes umbracoObjectType);
|
Attempt<int> GetIdForKey(Guid key, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the integer id for a given Udi
|
/// Returns the integer id for a given Udi
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="udi"></param>
|
/// <param name="udi"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Attempt<int> GetIdForUdi(Udi udi);
|
Attempt<int> GetIdForUdi(Udi udi);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the GUID for a given integer id
|
/// Returns the GUID for a given integer id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <param name="umbracoObjectType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Attempt<Guid> GetKeyForId(int id, UmbracoObjectTypes umbracoObjectType);
|
Attempt<Guid> GetKeyForId(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <param name="key">Unique Id of the object to retrieve</param>
|
/// <param name="key">Unique Id of the object to retrieve</param>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
||||||
IUmbracoEntity GetByKey(Guid key);
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true);
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// <summary>
|
||||||
IUmbracoEntity GetByKey(Guid key, bool loadBaseType = true);
|
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
/// <returns>
|
||||||
/// Gets an UmbracoEntity by its Id, and optionally loads the complete object graph.
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// </summary>
|
/// </returns>
|
||||||
/// <returns>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
||||||
/// </returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
IUmbracoEntity Get(int id, bool loadBaseType = true);
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
|
||||||
IUmbracoEntity Get(int id);
|
/// <summary>
|
||||||
|
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// </summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// <returns>
|
||||||
IUmbracoEntity Get(int id, bool loadBaseType = true);
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
|
/// </returns>
|
||||||
/// <summary>
|
/// <param name="key">Unique Id of the object to retrieve</param>
|
||||||
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
||||||
/// </summary>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
||||||
/// <returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
||||||
/// </returns>
|
|
||||||
/// <param name="key">Unique Id of the object to retrieve</param>
|
/// <summary>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// </summary>
|
||||||
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType);
|
/// <returns>
|
||||||
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// </returns>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
IUmbracoEntity GetByKey(Guid key, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
||||||
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
||||||
IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity;
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
||||||
/// Gets an UmbracoEntity by its Id and UmbracoObjectType, and optionally loads the complete object graph.
|
/// </summary>
|
||||||
/// </summary>
|
/// <returns>
|
||||||
/// <returns>
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// </returns>
|
||||||
/// </returns>
|
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
/// <param name="key">Unique Id of the object to retrieve</param>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entity to retrieve</param>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType);
|
IUmbracoEntity GetByKey<T>(Guid key, bool loadBaseType = true) where T : IUmbracoEntity;
|
||||||
|
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// <summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
||||||
IUmbracoEntity Get(int id, UmbracoObjectTypes umbracoObjectType, bool loadBaseType = true);
|
/// </summary>
|
||||||
|
/// <returns>
|
||||||
/// <summary>
|
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
||||||
/// Gets an UmbracoEntity by its Id and specified Type. Optionally loads the complete object graph.
|
/// </returns>
|
||||||
/// </summary>
|
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
||||||
/// <returns>
|
/// <param name="id">Id of the object to retrieve</param>
|
||||||
/// By default this will load the base type <see cref="IUmbracoEntity"/> with a minimum set of properties.
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c>.</param>
|
||||||
/// </returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// <typeparam name="T">Type of the model to retrieve. Must be based on an <see cref="IUmbracoEntity"/></typeparam>
|
IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity;
|
||||||
/// <param name="id">Id of the object to retrieve</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <summary>
|
||||||
IUmbracoEntity Get<T>(int id) where T : IUmbracoEntity;
|
/// Gets the parent of entity by its id
|
||||||
|
/// </summary>
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
IUmbracoEntity Get<T>(int id, bool loadBaseType = true) where T : IUmbracoEntity;
|
IUmbracoEntity GetParent(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the parent of entity by its id
|
/// Gets the parent of entity by its id and UmbracoObjectType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the parent to retrieve</param>
|
||||||
IUmbracoEntity GetParent(int id);
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
|
IUmbracoEntity GetParent(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
/// <summary>
|
|
||||||
/// Gets the parent of entity by its id and UmbracoObjectType
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a collection of children by the parents Id
|
||||||
/// <param name="id">Id of the entity to retrieve the Parent for</param>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the parent to retrieve</param>
|
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
IUmbracoEntity GetParent(int id, UmbracoObjectTypes umbracoObjectType);
|
IEnumerable<IUmbracoEntity> GetChildren(int parentId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of children by the parents Id
|
/// Gets a collection of children by the parents Id and UmbracoObjectType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the children to retrieve</param>
|
||||||
IEnumerable<IUmbracoEntity> GetChildren(int parentId);
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
|
IEnumerable<IUmbracoEntity> GetChildren(int parentId, UmbracoObjectTypes umbracoObjectType);
|
||||||
/// <summary>
|
|
||||||
/// Gets a collection of children by the parents Id and UmbracoObjectType
|
/// <summary>
|
||||||
/// </summary>
|
/// Returns a paged collection of children
|
||||||
/// <param name="parentId">Id of the parent to retrieve children for</param>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the children to retrieve</param>
|
/// <param name="parentId">The parent id to return children for</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <param name="umbracoObjectType"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetChildren(int parentId, UmbracoObjectTypes umbracoObjectType);
|
/// <param name="pageIndex"></param>
|
||||||
|
/// <param name="pageSize"></param>
|
||||||
/// <summary>
|
/// <param name="totalRecords"></param>
|
||||||
/// Returns a paged collection of children
|
/// <param name="orderBy"></param>
|
||||||
/// </summary>
|
/// <param name="orderDirection"></param>
|
||||||
/// <param name="parentId">The parent id to return children for</param>
|
/// <param name="filter"></param>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <returns></returns>
|
||||||
/// <param name="pageIndex"></param>
|
IEnumerable<IUmbracoEntity> GetPagedChildren(int parentId, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
/// <param name="pageSize"></param>
|
string orderBy = "SortOrder", Direction orderDirection = Direction.Ascending, string filter = "");
|
||||||
/// <param name="totalRecords"></param>
|
|
||||||
/// <param name="orderBy"></param>
|
/// <summary>
|
||||||
/// <param name="orderDirection"></param>
|
/// Returns a paged collection of descendants
|
||||||
/// <param name="filter"></param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="id"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetPagedChildren(int parentId, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
/// <param name="umbracoObjectType"></param>
|
||||||
string orderBy = "SortOrder", Direction orderDirection = Direction.Ascending, string filter = "");
|
/// <param name="pageIndex"></param>
|
||||||
|
/// <param name="pageSize"></param>
|
||||||
/// <summary>
|
/// <param name="totalRecords"></param>
|
||||||
/// Returns a paged collection of descendants
|
/// <param name="orderBy"></param>
|
||||||
/// </summary>
|
/// <param name="orderDirection"></param>
|
||||||
/// <param name="id"></param>
|
/// <param name="filter"></param>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <returns></returns>
|
||||||
/// <param name="pageIndex"></param>
|
IEnumerable<IUmbracoEntity> GetPagedDescendants(int id, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
/// <param name="pageSize"></param>
|
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
||||||
/// <param name="totalRecords"></param>
|
|
||||||
/// <param name="orderBy"></param>
|
/// <summary>
|
||||||
/// <param name="orderDirection"></param>
|
/// Returns a paged collection of descendants
|
||||||
/// <param name="filter"></param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
IEnumerable<IUmbracoEntity> GetPagedDescendants(IEnumerable<int> ids, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
IEnumerable<IUmbracoEntity> GetPagedDescendants(int id, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
||||||
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Returns a paged collection of descendants from the root
|
||||||
/// Returns a paged collection of descendants
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="umbracoObjectType"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetPagedDescendants(IEnumerable<int> ids, UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
/// <param name="pageIndex"></param>
|
||||||
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "");
|
/// <param name="pageSize"></param>
|
||||||
|
/// <param name="totalRecords"></param>
|
||||||
/// <summary>
|
/// <param name="orderBy"></param>
|
||||||
/// Returns a paged collection of descendants from the root
|
/// <param name="orderDirection"></param>
|
||||||
/// </summary>
|
/// <param name="filter"></param>
|
||||||
/// <param name="umbracoObjectType"></param>
|
/// <param name="includeTrashed">true/false to include trashed objects</param>
|
||||||
/// <param name="pageIndex"></param>
|
/// <returns></returns>
|
||||||
/// <param name="pageSize"></param>
|
IEnumerable<IUmbracoEntity> GetPagedDescendantsFromRoot(UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
||||||
/// <param name="totalRecords"></param>
|
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "", bool includeTrashed = true);
|
||||||
/// <param name="orderBy"></param>
|
|
||||||
/// <param name="orderDirection"></param>
|
/// <summary>
|
||||||
/// <param name="filter"></param>
|
/// Gets a collection of descendents by the parents Id
|
||||||
/// <param name="includeTrashed">true/false to include trashed objects</param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="id">Id of entity to retrieve descendents for</param>
|
||||||
IEnumerable<IUmbracoEntity> GetPagedDescendantsFromRoot(UmbracoObjectTypes umbracoObjectType, long pageIndex, int pageSize, out long totalRecords,
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
string orderBy = "path", Direction orderDirection = Direction.Ascending, string filter = "", bool includeTrashed = true);
|
IEnumerable<IUmbracoEntity> GetDescendents(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of descendents by the parents Id
|
/// Gets a collection of descendents by the parents Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of entity to retrieve descendents for</param>
|
/// <param name="id">Id of entity to retrieve descendents for</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the descendents to retrieve</param>
|
||||||
IEnumerable<IUmbracoEntity> GetDescendents(int id);
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
|
IEnumerable<IUmbracoEntity> GetDescendents(int id, UmbracoObjectTypes umbracoObjectType);
|
||||||
/// <summary>
|
|
||||||
/// Gets a collection of descendents by the parents Id
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a collection of the entities at the root, which corresponds to the entities with a Parent Id of -1.
|
||||||
/// <param name="id">Id of entity to retrieve descendents for</param>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the descendents to retrieve</param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the root entities to retrieve</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
IEnumerable<IUmbracoEntity> GetDescendents(int id, UmbracoObjectTypes umbracoObjectType);
|
IEnumerable<IUmbracoEntity> GetRootEntities(UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of the entities at the root, which corresponds to the entities with a Parent Id of -1.
|
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the root entities to retrieve</param>
|
/// <typeparam name="T">Type of the entities to retrieve</typeparam>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
IEnumerable<IUmbracoEntity> GetRootEntities(UmbracoObjectTypes umbracoObjectType);
|
IEnumerable<IUmbracoEntity> GetAll<T>(params int[] ids) where T : IUmbracoEntity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">Type of the entities to retrieve</typeparam>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <param name="ids"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetAll<T>(params int[] ids) where T : IUmbracoEntity;
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
|
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
||||||
/// <summary>
|
|
||||||
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
/// </summary>
|
||||||
/// <param name="ids"></param>
|
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <param name="keys"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
|
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, Guid[] keys);
|
||||||
/// <summary>
|
|
||||||
/// Gets a collection of all <see cref="IUmbracoEntity"/> of a given type.
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets a collection of <see cref="IUmbracoEntity"/>
|
||||||
/// <param name="umbracoObjectType">UmbracoObjectType of the entities to return</param>
|
/// </summary>
|
||||||
/// <param name="keys"></param>
|
/// <param name="objectTypeId">Guid id of the UmbracoObjectType</param>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
/// <param name="ids"></param>
|
||||||
IEnumerable<IUmbracoEntity> GetAll(UmbracoObjectTypes umbracoObjectType, Guid[] keys);
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
||||||
|
IEnumerable<IUmbracoEntity> GetAll(Guid objectTypeId, params int[] ids);
|
||||||
/// <summary>
|
|
||||||
/// Gets a collection of <see cref="IUmbracoEntity"/>
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets paths for entities.
|
||||||
/// <param name="objectTypeId">Guid id of the UmbracoObjectType</param>
|
/// </summary>
|
||||||
/// <param name="ids"></param>
|
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/> objects</returns>
|
|
||||||
IEnumerable<IUmbracoEntity> GetAll(Guid objectTypeId, params int[] ids);
|
/// <summary>
|
||||||
|
/// Gets paths for entities.
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// Gets paths for entities.
|
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params Guid[] keys);
|
||||||
/// </summary>
|
|
||||||
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params int[] ids);
|
/// <summary>
|
||||||
|
/// Gets the UmbracoObjectType from the integer id of an IUmbracoEntity.
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// Gets paths for entities.
|
/// <param name="id">Id of the entity</param>
|
||||||
/// </summary>
|
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
||||||
IEnumerable<EntityPath> GetAllPaths(UmbracoObjectTypes umbracoObjectType, params Guid[] keys);
|
UmbracoObjectTypes GetObjectType(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the UmbracoObjectType from the integer id of an IUmbracoEntity.
|
/// Gets the UmbracoObjectType from an IUmbracoEntity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the entity</param>
|
/// <param name="entity"><see cref="IUmbracoEntity"/></param>
|
||||||
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
||||||
UmbracoObjectTypes GetObjectType(int id);
|
UmbracoObjectTypes GetObjectType(IUmbracoEntity entity);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the UmbracoObjectType from an IUmbracoEntity.
|
/// Gets the Type of an entity by its Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entity"><see cref="IUmbracoEntity"/></param>
|
/// <param name="id">Id of the entity</param>
|
||||||
/// <returns><see cref="UmbracoObjectTypes"/></returns>
|
/// <returns>Type of the entity</returns>
|
||||||
UmbracoObjectTypes GetObjectType(IUmbracoEntity entity);
|
Type GetEntityType(int id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Type of an entity by its Id
|
/// Gets the Type of an entity by its <see cref="UmbracoObjectTypes"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Id of the entity</param>
|
/// <param name="umbracoObjectType"><see cref="UmbracoObjectTypes"/></param>
|
||||||
/// <returns>Type of the entity</returns>
|
/// <returns>Type of the entity</returns>
|
||||||
Type GetEntityType(int id);
|
Type GetEntityType(UmbracoObjectTypes umbracoObjectType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Type of an entity by its <see cref="UmbracoObjectTypes"/>
|
/// Reserves an identifier for a key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="umbracoObjectType"><see cref="UmbracoObjectTypes"/></param>
|
/// <param name="key">They key.</param>
|
||||||
/// <returns>Type of the entity</returns>
|
/// <returns>The identifier.</returns>
|
||||||
Type GetEntityType(UmbracoObjectTypes umbracoObjectType);
|
/// <remarks>When a new content or a media is saved with the key, it will have the reserved identifier.</remarks>
|
||||||
|
int ReserveId(Guid key);
|
||||||
/// <summary>
|
}
|
||||||
/// Reserves an identifier for a key.
|
}
|
||||||
/// </summary>
|
|
||||||
/// <param name="key">They key.</param>
|
|
||||||
/// <returns>The identifier.</returns>
|
|
||||||
/// <remarks>When a new content or a media is saved with the key, it will have the reserved identifier.</remarks>
|
|
||||||
int ReserveId(Guid key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -289,16 +289,8 @@ namespace Umbraco.Core.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Empties the Recycle Bin by deleting all <see cref="IMedia"/> that resides in the bin
|
/// Empties the Recycle Bin by deleting all <see cref="IMedia"/> that resides in the bin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
||||||
[Obsolete("Use EmptyRecycleBin with explicit indication of user ID instead")]
|
|
||||||
void EmptyRecycleBin();
|
void EmptyRecycleBin();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Empties the Recycle Bin by deleting all <see cref="IMedia"/> that resides in the bin
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userId">Optional Id of the User emptying the Recycle Bin</param>
|
|
||||||
void EmptyRecycleBin(int userId = 0);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes all media of specified type. All children of deleted media is moved to Recycle Bin.
|
/// Deletes all media of specified type. All children of deleted media is moved to Recycle Bin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,325 +1,306 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using Umbraco.Core.Models;
|
||||||
using Umbraco.Core.Models;
|
using Umbraco.Core.Models.EntityBase;
|
||||||
using Umbraco.Core.Models.EntityBase;
|
|
||||||
|
namespace Umbraco.Core.Services
|
||||||
namespace Umbraco.Core.Services
|
{
|
||||||
{
|
public interface IRelationService : IService
|
||||||
public interface IRelationService : IService
|
{
|
||||||
{
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a <see cref="Relation"/> by its Id
|
||||||
/// Gets a <see cref="Relation"/> by its Id
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of the <see cref="Relation"/></param>
|
||||||
/// <param name="id">Id of the <see cref="Relation"/></param>
|
/// <returns>A <see cref="Relation"/> object</returns>
|
||||||
/// <returns>A <see cref="Relation"/> object</returns>
|
IRelation GetById(int id);
|
||||||
IRelation GetById(int id);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a <see cref="RelationType"/> by its Id
|
||||||
/// Gets a <see cref="RelationType"/> by its Id
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
||||||
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
/// <returns>A <see cref="RelationType"/> object</returns>
|
||||||
/// <returns>A <see cref="RelationType"/> object</returns>
|
IRelationType GetRelationTypeById(int id);
|
||||||
IRelationType GetRelationTypeById(int id);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a <see cref="RelationType"/> by its Id
|
||||||
/// Gets a <see cref="RelationType"/> by its Id
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
||||||
/// <param name="id">Id of the <see cref="RelationType"/></param>
|
/// <returns>A <see cref="RelationType"/> object</returns>
|
||||||
/// <returns>A <see cref="RelationType"/> object</returns>
|
IRelationType GetRelationTypeById(Guid id);
|
||||||
IRelationType GetRelationTypeById(Guid id);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a <see cref="RelationType"/> by its Alias
|
||||||
/// Gets a <see cref="RelationType"/> by its Alias
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="alias">Alias of the <see cref="RelationType"/></param>
|
||||||
/// <param name="alias">Alias of the <see cref="RelationType"/></param>
|
/// <returns>A <see cref="RelationType"/> object</returns>
|
||||||
/// <returns>A <see cref="RelationType"/> object</returns>
|
IRelationType GetRelationTypeByAlias(string alias);
|
||||||
IRelationType GetRelationTypeByAlias(string alias);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets all <see cref="Relation"/> objects
|
||||||
/// Gets all <see cref="Relation"/> objects
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="ids">Optional array of integer ids to return relations for</param>
|
||||||
/// <param name="ids">Optional array of integer ids to return relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetAllRelations(params int[] ids);
|
||||||
IEnumerable<IRelation> GetAllRelations(params int[] ids);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>
|
||||||
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationType"><see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
/// <param name="relationType"><see cref="RelationType"/> to retrieve Relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetAllRelationsByRelationType(RelationType relationType);
|
||||||
IEnumerable<IRelation> GetAllRelationsByRelationType(RelationType relationType);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>'s Id
|
||||||
/// Gets all <see cref="Relation"/> objects by their <see cref="RelationType"/>'s Id
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetAllRelationsByRelationType(int relationTypeId);
|
||||||
IEnumerable<IRelation> GetAllRelationsByRelationType(int relationTypeId);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets all <see cref="Relation"/> objects
|
||||||
/// Gets all <see cref="Relation"/> objects
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="ids">Optional array of integer ids to return relationtypes for</param>
|
||||||
/// <param name="ids">Optional array of integer ids to return relationtypes for</param>
|
/// <returns>An enumerable list of <see cref="RelationType"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="RelationType"/> objects</returns>
|
IEnumerable<IRelationType> GetAllRelationTypes(params int[] ids);
|
||||||
IEnumerable<IRelationType> GetAllRelationTypes(params int[] ids);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by their parent Id
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their parent Id
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of the parent to retrieve relations for</param>
|
||||||
/// <param name="id">Id of the parent to retrieve relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByParentId(int id);
|
||||||
IEnumerable<IRelation> GetByParentId(int id);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
||||||
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent);
|
||||||
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their parent entity
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
||||||
/// <param name="parent">Parent Entity to retrieve relations for</param>
|
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent, string relationTypeAlias);
|
||||||
IEnumerable<IRelation> GetByParent(IUmbracoEntity parent, string relationTypeAlias);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by their child Id
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child Id
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of the child to retrieve relations for</param>
|
||||||
/// <param name="id">Id of the child to retrieve relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByChildId(int id);
|
||||||
IEnumerable<IRelation> GetByChildId(int id);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="child">Child Entity to retrieve relations for</param>
|
||||||
/// <param name="child">Child Entity to retrieve relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByChild(IUmbracoEntity child);
|
||||||
IEnumerable<IRelation> GetByChild(IUmbracoEntity child);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child Entity
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="child">Child Entity to retrieve relations for</param>
|
||||||
/// <param name="child">Child Entity to retrieve relations for</param>
|
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to retrieve</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByChild(IUmbracoEntity child, string relationTypeAlias);
|
||||||
IEnumerable<IRelation> GetByChild(IUmbracoEntity child, string relationTypeAlias);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by their child or parent Id.
|
||||||
/// Gets a list of <see cref="Relation"/> objects by their child or parent Id.
|
/// Using this method will get you all relations regards of it being a child or parent relation.
|
||||||
/// Using this method will get you all relations regards of it being a child or parent relation.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">Id of the child or parent to retrieve relations for</param>
|
||||||
/// <param name="id">Id of the child or parent to retrieve relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByParentOrChildId(int id);
|
||||||
IEnumerable<IRelation> GetByParentOrChildId(int id);
|
|
||||||
|
IEnumerable<IRelation> GetByParentOrChildId(int id, string relationTypeAlias);
|
||||||
IEnumerable<IRelation> GetByParentOrChildId(int id, string relationTypeAlias);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by the Name of the <see cref="RelationType"/>
|
||||||
/// Gets a list of <see cref="Relation"/> objects by the Name of the <see cref="RelationType"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationTypeName">Name of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
/// <param name="relationTypeName">Name of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByRelationTypeName(string relationTypeName);
|
||||||
IEnumerable<IRelation> GetByRelationTypeName(string relationTypeName);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by the Alias of the <see cref="RelationType"/>
|
||||||
/// Gets a list of <see cref="Relation"/> objects by the Alias of the <see cref="RelationType"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationTypeAlias">Alias of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
/// <param name="relationTypeAlias">Alias of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByRelationTypeAlias(string relationTypeAlias);
|
||||||
IEnumerable<IRelation> GetByRelationTypeAlias(string relationTypeAlias);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets a list of <see cref="Relation"/> objects by the Id of the <see cref="RelationType"/>
|
||||||
/// Gets a list of <see cref="Relation"/> objects by the Id of the <see cref="RelationType"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
||||||
/// <param name="relationTypeId">Id of the <see cref="RelationType"/> to retrieve Relations for</param>
|
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
||||||
/// <returns>An enumerable list of <see cref="Relation"/> objects</returns>
|
IEnumerable<IRelation> GetByRelationTypeId(int relationTypeId);
|
||||||
IEnumerable<IRelation> GetByRelationTypeId(int relationTypeId);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
/// Gets the Child object from a Relation as an <see cref="IUmbracoEntity"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relation">Relation to retrieve child object from</param>
|
||||||
/// <param name="relation">Relation to retrieve child object from</param>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
IUmbracoEntity GetChildEntityFromRelation(IRelation relation);
|
IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
|
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// <summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
||||||
IUmbracoEntity GetChildEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
/// </summary>
|
||||||
|
/// <param name="relation">Relation to retrieve parent object from</param>
|
||||||
/// <summary>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
/// Gets the Parent object from a Relation as an <see cref="IUmbracoEntity"/>
|
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
||||||
/// </summary>
|
IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
/// <param name="relation">Relation to retrieve parent object from</param>
|
|
||||||
/// <returns>An <see cref="IUmbracoEntity"/></returns>
|
/// <summary>
|
||||||
IUmbracoEntity GetParentEntityFromRelation(IRelation relation);
|
/// Gets the Parent and Child objects from a Relation as a <see cref="Tuple"/>"/> with <see cref="IUmbracoEntity"/>.
|
||||||
|
/// </summary>
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
IUmbracoEntity GetParentEntityFromRelation(IRelation relation, bool loadBaseType = false);
|
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
||||||
|
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation, bool loadBaseType = false);
|
||||||
/// <summary>
|
|
||||||
/// Gets the Parent and Child objects from a Relation as a <see cref="Tuple"/>"/> with <see cref="IUmbracoEntity"/>.
|
/// <summary>
|
||||||
/// </summary>
|
/// Gets the Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// <param name="relation">Relation to retrieve parent and child object from</param>
|
/// </summary>
|
||||||
/// <returns>Returns a Tuple with Parent (item1) and Child (item2)</returns>
|
/// <param name="relations">List of relations to retrieve child objects from</param>
|
||||||
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation);
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
||||||
Tuple<IUmbracoEntity, IUmbracoEntity> GetEntitiesFromRelation(IRelation relation, bool loadBaseType = false);
|
/// <summary>
|
||||||
|
/// Gets the Parent objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// Gets the Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// <param name="relations">List of relations to retrieve parent objects from</param>
|
||||||
/// </summary>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
/// <param name="relations">List of relations to retrieve child objects from</param>
|
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations,
|
||||||
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations);
|
bool loadBaseType = false);
|
||||||
|
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// <summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
||||||
IEnumerable<IUmbracoEntity> GetChildEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
/// </summary>
|
||||||
|
/// <param name="relations">List of relations to retrieve parent and child objects from</param>
|
||||||
/// <summary>
|
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
||||||
/// Gets the Parent objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// <returns>An enumerable list of <see cref="Tuple"/> with <see cref="IUmbracoEntity"/></returns>
|
||||||
/// </summary>
|
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
||||||
/// <param name="relations">List of relations to retrieve parent objects from</param>
|
IEnumerable<IRelation> relations,
|
||||||
/// <returns>An enumerable list of <see cref="IUmbracoEntity"/></returns>
|
bool loadBaseType = false);
|
||||||
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations);
|
|
||||||
|
/// <summary>
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// Relates two objects by their entity Ids.
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// </summary>
|
||||||
IEnumerable<IUmbracoEntity> GetParentEntitiesFromRelations(IEnumerable<IRelation> relations, bool loadBaseType = false);
|
/// <param name="parentId">Id of the parent</param>
|
||||||
|
/// <param name="childId">Id of the child</param>
|
||||||
/// <summary>
|
/// <param name="relationType">The type of relation to create</param>
|
||||||
/// Gets the Parent and Child objects from a list of Relations as a list of <see cref="IUmbracoEntity"/> objects.
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
/// </summary>
|
IRelation Relate(int parentId, int childId, IRelationType relationType);
|
||||||
/// <param name="relations">List of relations to retrieve parent and child objects from</param>
|
|
||||||
/// <param name="loadBaseType">Optional bool to load the complete object graph when set to <c>False</c></param>
|
/// <summary>
|
||||||
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
||||||
IEnumerable<IRelation> relations);
|
/// </summary>
|
||||||
|
/// <param name="parent">Parent entity</param>
|
||||||
[Obsolete("Use the overload that doesn't specify loadBaseType instead, loadBaseType will not affect any results")]
|
/// <param name="child">Child entity</param>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
/// <param name="relationType">The type of relation to create</param>
|
||||||
IEnumerable<Tuple<IUmbracoEntity, IUmbracoEntity>> GetEntitiesFromRelations(
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
IEnumerable<IRelation> relations,
|
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, IRelationType relationType);
|
||||||
bool loadBaseType = false);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Relates two objects by their entity Ids.
|
||||||
/// Relates two objects by their entity Ids.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="parentId">Id of the parent</param>
|
||||||
/// <param name="parentId">Id of the parent</param>
|
/// <param name="childId">Id of the child</param>
|
||||||
/// <param name="childId">Id of the child</param>
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
/// <param name="relationType">The type of relation to create</param>
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
IRelation Relate(int parentId, int childId, string relationTypeAlias);
|
||||||
IRelation Relate(int parentId, int childId, IRelationType relationType);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
||||||
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="parent">Parent entity</param>
|
||||||
/// <param name="parent">Parent entity</param>
|
/// <param name="child">Child entity</param>
|
||||||
/// <param name="child">Child entity</param>
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
/// <param name="relationType">The type of relation to create</param>
|
/// <returns>The created <see cref="Relation"/></returns>
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
||||||
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, IRelationType relationType);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Checks whether any relations exists for the passed in <see cref="RelationType"/>.
|
||||||
/// Relates two objects by their entity Ids.
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationType"><see cref="RelationType"/> to check for relations</param>
|
||||||
/// <param name="parentId">Id of the parent</param>
|
/// <returns>Returns <c>True</c> if any relations exists for the given <see cref="RelationType"/>, otherwise <c>False</c></returns>
|
||||||
/// <param name="childId">Id of the child</param>
|
bool HasRelations(IRelationType relationType);
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
/// <summary>
|
||||||
IRelation Relate(int parentId, int childId, string relationTypeAlias);
|
/// Checks whether any relations exists for the passed in Id.
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
/// <param name="id">Id of an object to check relations for</param>
|
||||||
/// Relates two objects that are based on the <see cref="IUmbracoEntity"/> interface.
|
/// <returns>Returns <c>True</c> if any relations exists with the given Id, otherwise <c>False</c></returns>
|
||||||
/// </summary>
|
bool IsRelated(int id);
|
||||||
/// <param name="parent">Parent entity</param>
|
|
||||||
/// <param name="child">Child entity</param>
|
/// <summary>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
/// Checks whether two items are related
|
||||||
/// <returns>The created <see cref="Relation"/></returns>
|
/// </summary>
|
||||||
IRelation Relate(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
/// <param name="parentId">Id of the Parent relation</param>
|
||||||
|
/// <param name="childId">Id of the Child relation</param>
|
||||||
/// <summary>
|
/// <returns>Returns <c>True</c> if any relations exists with the given Ids, otherwise <c>False</c></returns>
|
||||||
/// Checks whether any relations exists for the passed in <see cref="RelationType"/>.
|
bool AreRelated(int parentId, int childId);
|
||||||
/// </summary>
|
|
||||||
/// <param name="relationType"><see cref="RelationType"/> to check for relations</param>
|
/// <summary>
|
||||||
/// <returns>Returns <c>True</c> if any relations exists for the given <see cref="RelationType"/>, otherwise <c>False</c></returns>
|
/// Checks whether two items are related
|
||||||
bool HasRelations(IRelationType relationType);
|
/// </summary>
|
||||||
|
/// <param name="parent">Parent entity</param>
|
||||||
/// <summary>
|
/// <param name="child">Child entity</param>
|
||||||
/// Checks whether any relations exists for the passed in Id.
|
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
||||||
/// </summary>
|
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child);
|
||||||
/// <param name="id">Id of an object to check relations for</param>
|
|
||||||
/// <returns>Returns <c>True</c> if any relations exists with the given Id, otherwise <c>False</c></returns>
|
/// <summary>
|
||||||
bool IsRelated(int id);
|
/// Checks whether two items are related
|
||||||
|
/// </summary>
|
||||||
/// <summary>
|
/// <param name="parent">Parent entity</param>
|
||||||
/// Checks whether two items are related
|
/// <param name="child">Child entity</param>
|
||||||
/// </summary>
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
/// <param name="parentId">Id of the Parent relation</param>
|
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
||||||
/// <param name="childId">Id of the Child relation</param>
|
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
||||||
/// <returns>Returns <c>True</c> if any relations exists with the given Ids, otherwise <c>False</c></returns>
|
|
||||||
bool AreRelated(int parentId, int childId);
|
/// <summary>
|
||||||
|
/// Checks whether two items are related
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// Checks whether two items are related
|
/// <param name="parentId">Id of the Parent relation</param>
|
||||||
/// </summary>
|
/// <param name="childId">Id of the Child relation</param>
|
||||||
/// <param name="parent">Parent entity</param>
|
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
||||||
/// <param name="child">Child entity</param>
|
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
||||||
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
bool AreRelated(int parentId, int childId, string relationTypeAlias);
|
||||||
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Saves a <see cref="Relation"/>
|
||||||
/// Checks whether two items are related
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relation">Relation to save</param>
|
||||||
/// <param name="parent">Parent entity</param>
|
void Save(IRelation relation);
|
||||||
/// <param name="child">Child entity</param>
|
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
/// <summary>
|
||||||
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
/// Saves a <see cref="RelationType"/>
|
||||||
bool AreRelated(IUmbracoEntity parent, IUmbracoEntity child, string relationTypeAlias);
|
/// </summary>
|
||||||
|
/// <param name="relationType">RelationType to Save</param>
|
||||||
/// <summary>
|
void Save(IRelationType relationType);
|
||||||
/// Checks whether two items are related
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
/// <param name="parentId">Id of the Parent relation</param>
|
/// Deletes a <see cref="Relation"/>
|
||||||
/// <param name="childId">Id of the Child relation</param>
|
/// </summary>
|
||||||
/// <param name="relationTypeAlias">Alias of the type of relation to create</param>
|
/// <param name="relation">Relation to Delete</param>
|
||||||
/// <returns>Returns <c>True</c> if any relations exist between the entities, otherwise <c>False</c></returns>
|
void Delete(IRelation relation);
|
||||||
bool AreRelated(int parentId, int childId, string relationTypeAlias);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Deletes a <see cref="RelationType"/>
|
||||||
/// Saves a <see cref="Relation"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationType">RelationType to Delete</param>
|
||||||
/// <param name="relation">Relation to save</param>
|
void Delete(IRelationType relationType);
|
||||||
void Save(IRelation relation);
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Deletes all <see cref="Relation"/> objects based on the passed in <see cref="RelationType"/>
|
||||||
/// Saves a <see cref="RelationType"/>
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="relationType"><see cref="RelationType"/> to Delete Relations for</param>
|
||||||
/// <param name="relationType">RelationType to Save</param>
|
void DeleteRelationsOfType(IRelationType relationType);
|
||||||
void Save(IRelationType relationType);
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
|
||||||
/// Deletes a <see cref="Relation"/>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="relation">Relation to Delete</param>
|
|
||||||
void Delete(IRelation relation);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Deletes a <see cref="RelationType"/>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="relationType">RelationType to Delete</param>
|
|
||||||
void Delete(IRelationType relationType);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Deletes all <see cref="Relation"/> objects based on the passed in <see cref="RelationType"/>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="relationType"><see cref="RelationType"/> to Delete Relations for</param>
|
|
||||||
void DeleteRelationsOfType(IRelationType relationType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -509,7 +509,7 @@ namespace Umbraco.Core.Services
|
|||||||
public IEnumerable<IMedia> GetPagedChildren(int id, long pageIndex, int pageSize, out long totalChildren,
|
public IEnumerable<IMedia> GetPagedChildren(int id, long pageIndex, int pageSize, out long totalChildren,
|
||||||
string orderBy, Direction orderDirection, bool orderBySystemField, string filter)
|
string orderBy, Direction orderDirection, bool orderBySystemField, string filter)
|
||||||
{
|
{
|
||||||
return GetPagedChildren(id, pageIndex, pageSize, out totalChildren, orderBy, orderDirection, orderBySystemField, filter, null);
|
return GetPagedChildren(id, pageIndex, pageSize, out totalChildren, orderBy, orderDirection, true, filter, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -981,15 +981,7 @@ namespace Umbraco.Core.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Empties the Recycle Bin by deleting all <see cref="IMedia"/> that resides in the bin
|
/// Empties the Recycle Bin by deleting all <see cref="IMedia"/> that resides in the bin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
public void EmptyRecycleBin()
|
||||||
[Obsolete("Use EmptyRecycleBin with explicit indication of user ID instead")]
|
|
||||||
public void EmptyRecycleBin() => EmptyRecycleBin(0);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Empties the Recycle Bin by deleting all <see cref="IMedia"/> that resides in the bin
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userId">Optional Id of the User emptying the Recycle Bin</param>
|
|
||||||
public void EmptyRecycleBin(int userId = 0)
|
|
||||||
{
|
{
|
||||||
using (new WriteLock(Locker))
|
using (new WriteLock(Locker))
|
||||||
{
|
{
|
||||||
@@ -1014,7 +1006,7 @@ namespace Umbraco.Core.Services
|
|||||||
recycleBinEventArgs.RecycleBinEmptiedSuccessfully = success;
|
recycleBinEventArgs.RecycleBinEmptiedSuccessfully = success;
|
||||||
uow.Events.Dispatch(EmptiedRecycleBin, this, recycleBinEventArgs);
|
uow.Events.Dispatch(EmptiedRecycleBin, this, recycleBinEventArgs);
|
||||||
|
|
||||||
Audit(uow, AuditType.Delete, "Empty Media Recycle Bin performed by user", userId, Constants.System.RecycleBinMedia);
|
Audit(uow, AuditType.Delete, "Empty Media Recycle Bin performed by user", 0, Constants.System.RecycleBinMedia);
|
||||||
uow.Commit();
|
uow.Commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Umbraco.Core.Events;
|
using Umbraco.Core.Events;
|
||||||
using Umbraco.Core.Logging;
|
using Umbraco.Core.Logging;
|
||||||
@@ -70,11 +69,6 @@ namespace Umbraco.Core.Services
|
|||||||
|
|
||||||
public void Save(IMemberGroup memberGroup, bool raiseEvents = true)
|
public void Save(IMemberGroup memberGroup, bool raiseEvents = true)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(memberGroup.Name))
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("The name of a MemberGroup can not be empty");
|
|
||||||
}
|
|
||||||
|
|
||||||
using (var uow = UowProvider.GetUnitOfWork())
|
using (var uow = UowProvider.GetUnitOfWork())
|
||||||
{
|
{
|
||||||
var saveEventArgs = new SaveEventArgs<IMemberGroup>(memberGroup);
|
var saveEventArgs = new SaveEventArgs<IMemberGroup>(memberGroup);
|
||||||
@@ -139,4 +133,4 @@ namespace Umbraco.Core.Services
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static event TypedEventHandler<IMemberGroupService, SaveEventArgs<IMemberGroup>> Saved;
|
public static event TypedEventHandler<IMemberGroupService, SaveEventArgs<IMemberGroup>> Saved;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,52 +124,40 @@ namespace Umbraco.Core.Services
|
|||||||
var notifications = GetUsersNotifications(users.Select(x => x.Id), action, Enumerable.Empty<int>(), Constants.ObjectTypes.DocumentGuid).ToList();
|
var notifications = GetUsersNotifications(users.Select(x => x.Id), action, Enumerable.Empty<int>(), Constants.ObjectTypes.DocumentGuid).ToList();
|
||||||
if (notifications.Count == 0) break;
|
if (notifications.Count == 0) break;
|
||||||
|
|
||||||
while (notifications.Count > 0)
|
var i = 0;
|
||||||
{
|
foreach (var user in users)
|
||||||
var notification = notifications[0];
|
{
|
||||||
var isMatched = false;
|
// continue if there's no notification for this user
|
||||||
|
if (notifications[i].UserId != user.Id) continue; // next user
|
||||||
// grab user whose associated to the notification
|
|
||||||
var user = users.Where(x => x.Id == notification.UserId).FirstOrDefault();
|
for (var j = 0; j < entitiesL.Count; j++)
|
||||||
|
{
|
||||||
if (user == null)
|
var content = entitiesL[j];
|
||||||
{
|
var path = paths[j];
|
||||||
notifications.RemoveAll(x => x.UserId == notification.UserId);
|
|
||||||
}
|
// test if the notification applies to the path ie to this entity
|
||||||
|
if (path.Contains(notifications[i].EntityId) == false) continue; // next entity
|
||||||
for (var j = 0; j < entitiesL.Count; j++)
|
|
||||||
{
|
if (prevVersionDictionary.ContainsKey(content.Id) == false)
|
||||||
var content = entitiesL[j];
|
{
|
||||||
var path = paths[j];
|
prevVersionDictionary[content.Id] = GetPreviousVersion(content.Id);
|
||||||
|
}
|
||||||
// test if the notification applies to the path ie to this entity
|
|
||||||
if (path.Contains(notification.EntityId) == false) continue; // next entity
|
// queue notification
|
||||||
|
var req = CreateNotificationRequest(operatingUser, user, content, prevVersionDictionary[content.Id], actionName, http, createSubject, createBody);
|
||||||
isMatched = true;
|
Enqueue(req);
|
||||||
|
}
|
||||||
if (prevVersionDictionary.ContainsKey(content.Id) == false)
|
|
||||||
{
|
// skip other notifications for this user, essentially this means moving i to the next index of notifications
|
||||||
prevVersionDictionary[content.Id] = GetPreviousVersion(content.Id);
|
// for the next user.
|
||||||
}
|
do
|
||||||
|
{
|
||||||
// queue notification
|
i++;
|
||||||
var req = CreateNotificationRequest(operatingUser, user, content, prevVersionDictionary[content.Id], actionName, http, createSubject, createBody);
|
} while (i < notifications.Count && notifications[i].UserId == user.Id);
|
||||||
Enqueue(req);
|
|
||||||
|
if (i >= notifications.Count) break; // break if no more notifications
|
||||||
// don't process any further entities as a notification has been sent
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// when a match has been found, skip other notifications for user.
|
|
||||||
if (isMatched)
|
|
||||||
{
|
|
||||||
notifications.RemoveAll(x => x.UserId == notification.UserId);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
notifications.Remove(notification);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load more users if any
|
// load more users if any
|
||||||
id = users.Count == pagesz ? users.Last().Id + 1 : -1;
|
id = users.Count == pagesz ? users.Last().Id + 1 : -1;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -189,6 +189,7 @@ namespace Umbraco.Core
|
|||||||
outputArray[i] = char.IsLetterOrDigit(inputArray[i]) ? inputArray[i] : replacement;
|
outputArray[i] = char.IsLetterOrDigit(inputArray[i]) ? inputArray[i] : replacement;
|
||||||
return new string(outputArray);
|
return new string(outputArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly char[] CleanForXssChars = "*?(){}[];:%<>/\\|&'\"".ToCharArray();
|
private static readonly char[] CleanForXssChars = "*?(){}[];:%<>/\\|&'\"".ToCharArray();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -541,7 +542,7 @@ namespace Umbraco.Core
|
|||||||
public static string StripHtml(this string text)
|
public static string StripHtml(this string text)
|
||||||
{
|
{
|
||||||
const string pattern = @"<(.|\n)*?>";
|
const string pattern = @"<(.|\n)*?>";
|
||||||
return Regex.Replace(text, pattern, string.Empty);
|
return Regex.Replace(text, pattern, String.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -731,7 +732,6 @@ namespace Umbraco.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="stringToConvert">Referrs to itself</param>
|
/// <param name="stringToConvert">Referrs to itself</param>
|
||||||
/// <returns>The MD5 hashed string</returns>
|
/// <returns>The MD5 hashed string</returns>
|
||||||
[Obsolete("Please use the GenerateHash method instead. This may be removed in future versions")]
|
|
||||||
public static string ToMd5(this string stringToConvert)
|
public static string ToMd5(this string stringToConvert)
|
||||||
{
|
{
|
||||||
return stringToConvert.GenerateHash("MD5");
|
return stringToConvert.GenerateHash("MD5");
|
||||||
@@ -742,7 +742,6 @@ namespace Umbraco.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="stringToConvert">referrs to itself</param>
|
/// <param name="stringToConvert">referrs to itself</param>
|
||||||
/// <returns>The SHA1 hashed string</returns>
|
/// <returns>The SHA1 hashed string</returns>
|
||||||
[Obsolete("Please use the GenerateHash method instead. This may be removed in future versions")]
|
|
||||||
public static string ToSHA1(this string stringToConvert)
|
public static string ToSHA1(this string stringToConvert)
|
||||||
{
|
{
|
||||||
return stringToConvert.GenerateHash("SHA1");
|
return stringToConvert.GenerateHash("SHA1");
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Umbraco.Core</RootNamespace>
|
<RootNamespace>Umbraco.Core</RootNamespace>
|
||||||
<AssemblyName>Umbraco.Core</AssemblyName>
|
<AssemblyName>Umbraco.Core</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
<RestorePackages>true</RestorePackages>
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
<Reference Include="ClientDependency.Core, Version=1.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ClientDependency.Core, Version=1.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll</HintPath>
|
<HintPath>..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HtmlAgilityPack, Version=1.8.8.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\HtmlAgilityPack.1.8.8\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImageProcessor, Version=2.7.0.100, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ImageProcessor, Version=2.5.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll</HintPath>
|
<HintPath>..\packages\ImageProcessor.2.5.6\lib\net45\ImageProcessor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||||
@@ -61,22 +61,22 @@
|
|||||||
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
|
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security.Cookies, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security.Cookies, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.3.1.0\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security.OAuth, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MiniProfiler, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
|
<Reference Include="MiniProfiler, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
|
<HintPath>..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll</HintPath>
|
||||||
@@ -85,14 +85,14 @@
|
|||||||
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath>
|
<HintPath>..\packages\semver.1.1.2\lib\net45\Semver.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
@@ -115,8 +115,8 @@
|
|||||||
<Reference Include="System.Runtime.Caching" />
|
<Reference Include="System.Runtime.Caching" />
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Transactions" />
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
@@ -324,9 +324,6 @@
|
|||||||
<Compile Include="Configuration\UmbracoSettings\WebRoutingElement.cs" />
|
<Compile Include="Configuration\UmbracoSettings\WebRoutingElement.cs" />
|
||||||
<Compile Include="Configuration\UmbracoVersion.cs" />
|
<Compile Include="Configuration\UmbracoVersion.cs" />
|
||||||
<Compile Include="Attempt.cs" />
|
<Compile Include="Attempt.cs" />
|
||||||
<Compile Include="Constants-DataTypes.cs">
|
|
||||||
<DependentUpon>Constants.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Constants-DeploySelector.cs" />
|
<Compile Include="Constants-DeploySelector.cs" />
|
||||||
<Compile Include="Constants-Examine.cs" />
|
<Compile Include="Constants-Examine.cs" />
|
||||||
<Compile Include="Constants-Icons.cs" />
|
<Compile Include="Constants-Icons.cs" />
|
||||||
@@ -377,7 +374,6 @@
|
|||||||
<Compile Include="Models\Consent.cs" />
|
<Compile Include="Models\Consent.cs" />
|
||||||
<Compile Include="Models\ConsentExtensions.cs" />
|
<Compile Include="Models\ConsentExtensions.cs" />
|
||||||
<Compile Include="Models\ConsentState.cs" />
|
<Compile Include="Models\ConsentState.cs" />
|
||||||
<Compile Include="Models\DataTypeExtensions.cs" />
|
|
||||||
<Compile Include="Models\EntityBase\EntityPath.cs" />
|
<Compile Include="Models\EntityBase\EntityPath.cs" />
|
||||||
<Compile Include="Models\EntityBase\IDeletableEntity.cs" />
|
<Compile Include="Models\EntityBase\IDeletableEntity.cs" />
|
||||||
<Compile Include="Models\IAuditEntry.cs" />
|
<Compile Include="Models\IAuditEntry.cs" />
|
||||||
@@ -576,7 +572,6 @@
|
|||||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddInstructionCountColumn.cs" />
|
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddInstructionCountColumn.cs" />
|
||||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddCmsMediaTable.cs" />
|
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddCmsMediaTable.cs" />
|
||||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddUserLoginTable.cs" />
|
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenEightZero\AddUserLoginTable.cs" />
|
||||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenFourteenZero\UpdateMemberGroupPickerData.cs" />
|
|
||||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\RenameTrueFalseField.cs" />
|
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\RenameTrueFalseField.cs" />
|
||||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\SetDefaultTagsStorageType.cs" />
|
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwelveZero\SetDefaultTagsStorageType.cs" />
|
||||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenNineZero\AddUmbracoAuditTable.cs" />
|
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenNineZero\AddUmbracoAuditTable.cs" />
|
||||||
@@ -768,7 +763,6 @@
|
|||||||
<Compile Include="Services\ConsentService.cs" />
|
<Compile Include="Services\ConsentService.cs" />
|
||||||
<Compile Include="Services\ContentTypeServiceExtensions.cs" />
|
<Compile Include="Services\ContentTypeServiceExtensions.cs" />
|
||||||
<Compile Include="Models\RedirectUrl.cs" />
|
<Compile Include="Models\RedirectUrl.cs" />
|
||||||
<Compile Include="Services\DateTypeServiceExtensions.cs" />
|
|
||||||
<Compile Include="Services\IConsentService.cs" />
|
<Compile Include="Services\IConsentService.cs" />
|
||||||
<Compile Include="Services\IContentServiceBase.cs" />
|
<Compile Include="Services\IContentServiceBase.cs" />
|
||||||
<Compile Include="Services\IdkMap.cs" />
|
<Compile Include="Services\IdkMap.cs" />
|
||||||
|
|||||||
+323
-323
@@ -1,323 +1,323 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Umbraco.Core.Configuration;
|
using Umbraco.Core.Configuration;
|
||||||
using Umbraco.Core.IO;
|
using Umbraco.Core.IO;
|
||||||
using Umbraco.Core.Logging;
|
using Umbraco.Core.Logging;
|
||||||
|
|
||||||
namespace Umbraco.Core
|
namespace Umbraco.Core
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides extension methods to <see cref="Uri"/>.
|
/// Provides extension methods to <see cref="Uri"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class UriExtensions
|
public static class UriExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the current uri is a back office request
|
/// Checks if the current uri is a back office request
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
/// <param name="applicationPath">
|
/// <param name="applicationPath">
|
||||||
/// The current application path or VirtualPath
|
/// The current application path or VirtualPath
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// There are some special routes we need to check to properly determine this:
|
/// There are some special routes we need to check to properly determine this:
|
||||||
///
|
///
|
||||||
/// If any route has an extension in the path like .aspx = back office
|
/// If any route has an extension in the path like .aspx = back office
|
||||||
///
|
///
|
||||||
/// These are def back office:
|
/// These are def back office:
|
||||||
/// /Umbraco/RestServices = back office
|
/// /Umbraco/RestServices = back office
|
||||||
/// /Umbraco/BackOffice = back office
|
/// /Umbraco/BackOffice = back office
|
||||||
/// If it's not any of the above, and there's no extension then we cannot determine if it's back office or front-end
|
/// If it's not any of the above, and there's no extension then we cannot determine if it's back office or front-end
|
||||||
/// so we can only assume that it is not back office. This will occur if people use an UmbracoApiController for the backoffice
|
/// so we can only assume that it is not back office. This will occur if people use an UmbracoApiController for the backoffice
|
||||||
/// but do not inherit from UmbracoAuthorizedApiController and do not use [IsBackOffice] attribute.
|
/// but do not inherit from UmbracoAuthorizedApiController and do not use [IsBackOffice] attribute.
|
||||||
///
|
///
|
||||||
/// These are def front-end:
|
/// These are def front-end:
|
||||||
/// /Umbraco/Surface = front-end
|
/// /Umbraco/Surface = front-end
|
||||||
/// /Umbraco/Api = front-end
|
/// /Umbraco/Api = front-end
|
||||||
/// But if we've got this far we'll just have to assume it's front-end anyways.
|
/// But if we've got this far we'll just have to assume it's front-end anyways.
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal static bool IsBackOfficeRequest(this Uri url, string applicationPath)
|
internal static bool IsBackOfficeRequest(this Uri url, string applicationPath)
|
||||||
{
|
{
|
||||||
applicationPath = applicationPath ?? string.Empty;
|
applicationPath = applicationPath ?? string.Empty;
|
||||||
|
|
||||||
var fullUrlPath = url.AbsolutePath.TrimStart(new[] {'/'});
|
var fullUrlPath = url.AbsolutePath.TrimStart(new[] {'/'});
|
||||||
var appPath = applicationPath.TrimStart(new[] {'/'});
|
var appPath = applicationPath.TrimStart(new[] {'/'});
|
||||||
var urlPath = fullUrlPath.TrimStart(appPath).EnsureStartsWith('/');
|
var urlPath = fullUrlPath.TrimStart(appPath).EnsureStartsWith('/');
|
||||||
|
|
||||||
//check if this is in the umbraco back office
|
//check if this is in the umbraco back office
|
||||||
var isUmbracoPath = urlPath.InvariantStartsWith(GlobalSettings.Path.EnsureStartsWith('/').TrimStart(appPath.EnsureStartsWith('/')).EnsureStartsWith('/'));
|
var isUmbracoPath = urlPath.InvariantStartsWith(GlobalSettings.Path.EnsureStartsWith('/').TrimStart(appPath.EnsureStartsWith('/')).EnsureStartsWith('/'));
|
||||||
//if not, then def not back office
|
//if not, then def not back office
|
||||||
if (isUmbracoPath == false) return false;
|
if (isUmbracoPath == false) return false;
|
||||||
|
|
||||||
//if its the normal /umbraco path
|
//if its the normal /umbraco path
|
||||||
if (urlPath.InvariantEquals("/" + GlobalSettings.UmbracoMvcArea)
|
if (urlPath.InvariantEquals("/" + GlobalSettings.UmbracoMvcArea)
|
||||||
|| urlPath.InvariantEquals("/" + GlobalSettings.UmbracoMvcArea + "/"))
|
|| urlPath.InvariantEquals("/" + GlobalSettings.UmbracoMvcArea + "/"))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//check for a file extension
|
//check for a file extension
|
||||||
var extension = Path.GetExtension(url.LocalPath);
|
var extension = Path.GetExtension(url.LocalPath);
|
||||||
//has an extension, def back office
|
//has an extension, def back office
|
||||||
if (extension.IsNullOrWhiteSpace() == false) return true;
|
if (extension.IsNullOrWhiteSpace() == false) return true;
|
||||||
//check for special case asp.net calls like:
|
//check for special case asp.net calls like:
|
||||||
// /umbraco/webservices/legacyAjaxCalls.asmx/js which will return a null file extension but are still considered extension'd requests
|
// /umbraco/webservices/legacyAjaxCalls.asmx/js which will return a null file extension but are still considered extension'd requests
|
||||||
if (urlPath.InvariantContains(".asmx/")
|
if (urlPath.InvariantContains(".asmx/")
|
||||||
|| urlPath.InvariantContains(".aspx/")
|
|| urlPath.InvariantContains(".aspx/")
|
||||||
|| urlPath.InvariantContains(".ashx/")
|
|| urlPath.InvariantContains(".ashx/")
|
||||||
|| urlPath.InvariantContains(".axd/")
|
|| urlPath.InvariantContains(".axd/")
|
||||||
|| urlPath.InvariantContains(".svc/"))
|
|| urlPath.InvariantContains(".svc/"))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//check for special back office paths
|
//check for special back office paths
|
||||||
if (urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/BackOffice/")
|
if (urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/BackOffice/")
|
||||||
|| urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/RestServices/"))
|
|| urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/RestServices/"))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//check for special front-end paths
|
//check for special front-end paths
|
||||||
if (urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/Surface/")
|
if (urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/Surface/")
|
||||||
|| urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/Api/"))
|
|| urlPath.InvariantStartsWith("/" + GlobalSettings.UmbracoMvcArea + "/Api/"))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if its none of the above, we will have to try to detect if it's a PluginController route, we can detect this by
|
//if its none of the above, we will have to try to detect if it's a PluginController route, we can detect this by
|
||||||
// checking how many parts the route has, for example, all PluginController routes will be routed like
|
// checking how many parts the route has, for example, all PluginController routes will be routed like
|
||||||
// Umbraco/MYPLUGINAREA/MYCONTROLLERNAME/{action}/{id}
|
// Umbraco/MYPLUGINAREA/MYCONTROLLERNAME/{action}/{id}
|
||||||
// so if the path contains at a minimum 3 parts: Umbraco + MYPLUGINAREA + MYCONTROLLERNAME then we will have to assume it is a
|
// so if the path contains at a minimum 3 parts: Umbraco + MYPLUGINAREA + MYCONTROLLERNAME then we will have to assume it is a
|
||||||
// plugin controller for the front-end.
|
// plugin controller for the front-end.
|
||||||
if (urlPath.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries).Length >= 3)
|
if (urlPath.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries).Length >= 3)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if its anything else we can assume it's back office
|
//if its anything else we can assume it's back office
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the current uri is an install request
|
/// Checks if the current uri is an install request
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool IsInstallerRequest(this Uri url)
|
internal static bool IsInstallerRequest(this Uri url)
|
||||||
{
|
{
|
||||||
var authority = url.GetLeftPart(UriPartial.Authority);
|
var authority = url.GetLeftPart(UriPartial.Authority);
|
||||||
var afterAuthority = url.GetLeftPart(UriPartial.Query)
|
var afterAuthority = url.GetLeftPart(UriPartial.Query)
|
||||||
.TrimStart(authority)
|
.TrimStart(authority)
|
||||||
.TrimStart("/");
|
.TrimStart("/");
|
||||||
|
|
||||||
//check if this is in the umbraco back office
|
//check if this is in the umbraco back office
|
||||||
return afterAuthority.InvariantStartsWith(IOHelper.ResolveUrl("~/install").TrimStart("/"));
|
return afterAuthority.InvariantStartsWith(IOHelper.ResolveUrl("~/install").TrimStart("/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the uri is a request for the default back office page
|
/// Checks if the uri is a request for the default back office page
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool IsDefaultBackOfficeRequest(this Uri url)
|
internal static bool IsDefaultBackOfficeRequest(this Uri url)
|
||||||
{
|
{
|
||||||
if (url.AbsolutePath.InvariantEquals(GlobalSettings.Path.TrimEnd("/"))
|
if (url.AbsolutePath.InvariantEquals(GlobalSettings.Path.TrimEnd("/"))
|
||||||
|| url.AbsolutePath.InvariantEquals(GlobalSettings.Path.EnsureEndsWith('/'))
|
|| url.AbsolutePath.InvariantEquals(GlobalSettings.Path.EnsureEndsWith('/'))
|
||||||
|| url.AbsolutePath.InvariantEquals(GlobalSettings.Path.EnsureEndsWith('/') + "Default")
|
|| url.AbsolutePath.InvariantEquals(GlobalSettings.Path.EnsureEndsWith('/') + "Default")
|
||||||
|| url.AbsolutePath.InvariantEquals(GlobalSettings.Path.EnsureEndsWith('/') + "Default/"))
|
|| url.AbsolutePath.InvariantEquals(GlobalSettings.Path.EnsureEndsWith('/') + "Default/"))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is a performance tweak to check if this not an ASP.Net server file
|
/// This is a performance tweak to check if this not an ASP.Net server file
|
||||||
/// .Net will pass these requests through to the module when in integrated mode.
|
/// .Net will pass these requests through to the module when in integrated mode.
|
||||||
/// We want to ignore all of these requests immediately.
|
/// We want to ignore all of these requests immediately.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool IsClientSideRequest(this Uri url)
|
internal static bool IsClientSideRequest(this Uri url)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var ext = Path.GetExtension(url.LocalPath);
|
var ext = Path.GetExtension(url.LocalPath);
|
||||||
if (ext.IsNullOrWhiteSpace()) return false;
|
if (ext.IsNullOrWhiteSpace()) return false;
|
||||||
var toInclude = new[] {".aspx", ".ashx", ".asmx", ".axd", ".svc"};
|
var toInclude = new[] {".aspx", ".ashx", ".asmx", ".axd", ".svc"};
|
||||||
return toInclude.Any(ext.InvariantEquals) == false;
|
return toInclude.Any(ext.InvariantEquals) == false;
|
||||||
}
|
}
|
||||||
catch (ArgumentException)
|
catch (ArgumentException ex)
|
||||||
{
|
{
|
||||||
LogHelper.Debug(typeof(UriExtensions), "Failed to determine if request was client side. Due to invalid characters in path: {0}", () => url.LocalPath);
|
LogHelper.Error(typeof(UriExtensions), "Failed to determine if request was client side", ex);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rewrites the path of uri.
|
/// Rewrites the path of uri.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <param name="path">The new path, which must begin with a slash.</param>
|
/// <param name="path">The new path, which must begin with a slash.</param>
|
||||||
/// <returns>The rewritten uri.</returns>
|
/// <returns>The rewritten uri.</returns>
|
||||||
/// <remarks>Everything else remains unchanged, except for the fragment which is removed.</remarks>
|
/// <remarks>Everything else remains unchanged, except for the fragment which is removed.</remarks>
|
||||||
public static Uri Rewrite(this Uri uri, string path)
|
public static Uri Rewrite(this Uri uri, string path)
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/") == false)
|
if (path.StartsWith("/") == false)
|
||||||
throw new ArgumentException("Path must start with a slash.", "path");
|
throw new ArgumentException("Path must start with a slash.", "path");
|
||||||
|
|
||||||
return uri.IsAbsoluteUri
|
return uri.IsAbsoluteUri
|
||||||
? new Uri(uri.GetLeftPart(UriPartial.Authority) + path + uri.Query)
|
? new Uri(uri.GetLeftPart(UriPartial.Authority) + path + uri.Query)
|
||||||
: new Uri(path + uri.GetSafeQuery(), UriKind.Relative);
|
: new Uri(path + uri.GetSafeQuery(), UriKind.Relative);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rewrites the path and query of a uri.
|
/// Rewrites the path and query of a uri.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <param name="path">The new path, which must begin with a slash.</param>
|
/// <param name="path">The new path, which must begin with a slash.</param>
|
||||||
/// <param name="query">The new query, which must be empty or begin with a question mark.</param>
|
/// <param name="query">The new query, which must be empty or begin with a question mark.</param>
|
||||||
/// <returns>The rewritten uri.</returns>
|
/// <returns>The rewritten uri.</returns>
|
||||||
/// <remarks>Everything else remains unchanged, except for the fragment which is removed.</remarks>
|
/// <remarks>Everything else remains unchanged, except for the fragment which is removed.</remarks>
|
||||||
public static Uri Rewrite(this Uri uri, string path, string query)
|
public static Uri Rewrite(this Uri uri, string path, string query)
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/") == false)
|
if (path.StartsWith("/") == false)
|
||||||
throw new ArgumentException("Path must start with a slash.", "path");
|
throw new ArgumentException("Path must start with a slash.", "path");
|
||||||
if (query.Length > 0 && query.StartsWith("?") == false)
|
if (query.Length > 0 && query.StartsWith("?") == false)
|
||||||
throw new ArgumentException("Query must start with a question mark.", "query");
|
throw new ArgumentException("Query must start with a question mark.", "query");
|
||||||
if (query == "?")
|
if (query == "?")
|
||||||
query = "";
|
query = "";
|
||||||
|
|
||||||
return uri.IsAbsoluteUri
|
return uri.IsAbsoluteUri
|
||||||
? new Uri(uri.GetLeftPart(UriPartial.Authority) + path + query)
|
? new Uri(uri.GetLeftPart(UriPartial.Authority) + path + query)
|
||||||
: new Uri(path + query, UriKind.Relative);
|
: new Uri(path + query, UriKind.Relative);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the absolute path of the uri, even if the uri is relative.
|
/// Gets the absolute path of the uri, even if the uri is relative.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <returns>The absolute path of the uri.</returns>
|
/// <returns>The absolute path of the uri.</returns>
|
||||||
/// <remarks>Default uri.AbsolutePath does not support relative uris.</remarks>
|
/// <remarks>Default uri.AbsolutePath does not support relative uris.</remarks>
|
||||||
public static string GetSafeAbsolutePath(this Uri uri)
|
public static string GetSafeAbsolutePath(this Uri uri)
|
||||||
{
|
{
|
||||||
if (uri.IsAbsoluteUri)
|
if (uri.IsAbsoluteUri)
|
||||||
return uri.AbsolutePath;
|
return uri.AbsolutePath;
|
||||||
|
|
||||||
// cannot get .AbsolutePath on relative uri (InvalidOperation)
|
// cannot get .AbsolutePath on relative uri (InvalidOperation)
|
||||||
var s = uri.OriginalString;
|
var s = uri.OriginalString;
|
||||||
var posq = s.IndexOf("?", StringComparison.Ordinal);
|
var posq = s.IndexOf("?", StringComparison.Ordinal);
|
||||||
var posf = s.IndexOf("#", StringComparison.Ordinal);
|
var posf = s.IndexOf("#", StringComparison.Ordinal);
|
||||||
var pos = posq > 0 ? posq : (posf > 0 ? posf : 0);
|
var pos = posq > 0 ? posq : (posf > 0 ? posf : 0);
|
||||||
var path = pos > 0 ? s.Substring(0, pos) : s;
|
var path = pos > 0 ? s.Substring(0, pos) : s;
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the decoded, absolute path of the uri.
|
/// Gets the decoded, absolute path of the uri.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <returns>The absolute path of the uri.</returns>
|
/// <returns>The absolute path of the uri.</returns>
|
||||||
/// <remarks>Only for absolute uris.</remarks>
|
/// <remarks>Only for absolute uris.</remarks>
|
||||||
public static string GetAbsolutePathDecoded(this Uri uri)
|
public static string GetAbsolutePathDecoded(this Uri uri)
|
||||||
{
|
{
|
||||||
return System.Web.HttpUtility.UrlDecode(uri.AbsolutePath);
|
return System.Web.HttpUtility.UrlDecode(uri.AbsolutePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the decoded, absolute path of the uri, even if the uri is relative.
|
/// Gets the decoded, absolute path of the uri, even if the uri is relative.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <returns>The absolute path of the uri.</returns>
|
/// <returns>The absolute path of the uri.</returns>
|
||||||
/// <remarks>Default uri.AbsolutePath does not support relative uris.</remarks>
|
/// <remarks>Default uri.AbsolutePath does not support relative uris.</remarks>
|
||||||
public static string GetSafeAbsolutePathDecoded(this Uri uri)
|
public static string GetSafeAbsolutePathDecoded(this Uri uri)
|
||||||
{
|
{
|
||||||
return System.Web.HttpUtility.UrlDecode(uri.GetSafeAbsolutePath());
|
return System.Web.HttpUtility.UrlDecode(uri.GetSafeAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rewrites the path of the uri so it ends with a slash.
|
/// Rewrites the path of the uri so it ends with a slash.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <returns>The rewritten uri.</returns>
|
/// <returns>The rewritten uri.</returns>
|
||||||
/// <remarks>Everything else remains unchanged.</remarks>
|
/// <remarks>Everything else remains unchanged.</remarks>
|
||||||
public static Uri EndPathWithSlash(this Uri uri)
|
public static Uri EndPathWithSlash(this Uri uri)
|
||||||
{
|
{
|
||||||
var path = uri.GetSafeAbsolutePath();
|
var path = uri.GetSafeAbsolutePath();
|
||||||
if (uri.IsAbsoluteUri)
|
if (uri.IsAbsoluteUri)
|
||||||
{
|
{
|
||||||
if (path != "/" && path.EndsWith("/") == false)
|
if (path != "/" && path.EndsWith("/") == false)
|
||||||
uri = new Uri(uri.GetLeftPart(UriPartial.Authority) + path + "/" + uri.Query);
|
uri = new Uri(uri.GetLeftPart(UriPartial.Authority) + path + "/" + uri.Query);
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path != "/" && path.EndsWith("/") == false)
|
if (path != "/" && path.EndsWith("/") == false)
|
||||||
uri = new Uri(path + "/" + uri.Query, UriKind.Relative);
|
uri = new Uri(path + "/" + uri.Query, UriKind.Relative);
|
||||||
|
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rewrites the path of the uri so it does not end with a slash.
|
/// Rewrites the path of the uri so it does not end with a slash.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <returns>The rewritten uri.</returns>
|
/// <returns>The rewritten uri.</returns>
|
||||||
/// <remarks>Everything else remains unchanged.</remarks>
|
/// <remarks>Everything else remains unchanged.</remarks>
|
||||||
public static Uri TrimPathEndSlash(this Uri uri)
|
public static Uri TrimPathEndSlash(this Uri uri)
|
||||||
{
|
{
|
||||||
var path = uri.GetSafeAbsolutePath();
|
var path = uri.GetSafeAbsolutePath();
|
||||||
if (uri.IsAbsoluteUri)
|
if (uri.IsAbsoluteUri)
|
||||||
{
|
{
|
||||||
if (path != "/")
|
if (path != "/")
|
||||||
uri = new Uri(uri.GetLeftPart(UriPartial.Authority) + path.TrimEnd('/') + uri.Query);
|
uri = new Uri(uri.GetLeftPart(UriPartial.Authority) + path.TrimEnd('/') + uri.Query);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (path != "/")
|
if (path != "/")
|
||||||
uri = new Uri(path.TrimEnd('/') + uri.Query, UriKind.Relative);
|
uri = new Uri(path.TrimEnd('/') + uri.Query, UriKind.Relative);
|
||||||
}
|
}
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms a relative uri into an absolute uri.
|
/// Transforms a relative uri into an absolute uri.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The relative uri.</param>
|
/// <param name="uri">The relative uri.</param>
|
||||||
/// <param name="baseUri">The base absolute uri.</param>
|
/// <param name="baseUri">The base absolute uri.</param>
|
||||||
/// <returns>The absolute uri.</returns>
|
/// <returns>The absolute uri.</returns>
|
||||||
public static Uri MakeAbsolute(this Uri uri, Uri baseUri)
|
public static Uri MakeAbsolute(this Uri uri, Uri baseUri)
|
||||||
{
|
{
|
||||||
if (uri.IsAbsoluteUri)
|
if (uri.IsAbsoluteUri)
|
||||||
throw new ArgumentException("Uri is already absolute.", "uri");
|
throw new ArgumentException("Uri is already absolute.", "uri");
|
||||||
|
|
||||||
return new Uri(baseUri.GetLeftPart(UriPartial.Authority) + uri.GetSafeAbsolutePath() + uri.GetSafeQuery());
|
return new Uri(baseUri.GetLeftPart(UriPartial.Authority) + uri.GetSafeAbsolutePath() + uri.GetSafeQuery());
|
||||||
}
|
}
|
||||||
|
|
||||||
static string GetSafeQuery(this Uri uri)
|
static string GetSafeQuery(this Uri uri)
|
||||||
{
|
{
|
||||||
if (uri.IsAbsoluteUri)
|
if (uri.IsAbsoluteUri)
|
||||||
return uri.Query;
|
return uri.Query;
|
||||||
|
|
||||||
// cannot get .Query on relative uri (InvalidOperation)
|
// cannot get .Query on relative uri (InvalidOperation)
|
||||||
var s = uri.OriginalString;
|
var s = uri.OriginalString;
|
||||||
var posq = s.IndexOf("?", StringComparison.Ordinal);
|
var posq = s.IndexOf("?", StringComparison.Ordinal);
|
||||||
var posf = s.IndexOf("#", StringComparison.Ordinal);
|
var posf = s.IndexOf("#", StringComparison.Ordinal);
|
||||||
var query = posq < 0 ? null : (posf < 0 ? s.Substring(posq) : s.Substring(posq, posf - posq));
|
var query = posq < 0 ? null : (posf < 0 ? s.Substring(posq) : s.Substring(posq, posf - posq));
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes the port from the uri.
|
/// Removes the port from the uri.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uri">The uri.</param>
|
/// <param name="uri">The uri.</param>
|
||||||
/// <returns>The same uri, without its port.</returns>
|
/// <returns>The same uri, without its port.</returns>
|
||||||
public static Uri WithoutPort(this Uri uri)
|
public static Uri WithoutPort(this Uri uri)
|
||||||
{
|
{
|
||||||
return new Uri(uri.GetComponents(UriComponents.AbsoluteUri & ~UriComponents.Port, UriFormat.UriEscaped));
|
return new Uri(uri.GetComponents(UriComponents.AbsoluteUri & ~UriComponents.Port, UriFormat.UriEscaped));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -16,19 +16,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup><system.data>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup><system.data>
|
||||||
<DbProviderFactories>
|
<DbProviderFactories>
|
||||||
<remove invariant="MySql.Data.MySqlClient" />
|
<remove invariant="MySql.Data.MySqlClient" />
|
||||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||||
|
|||||||
@@ -2,21 +2,21 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||||
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
|
<package id="ClientDependency" version="1.9.7" targetFramework="net45" />
|
||||||
<package id="HtmlAgilityPack" version="1.8.8" targetFramework="net452" />
|
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
|
||||||
<package id="ImageProcessor" version="2.7.0.100" targetFramework="net452" />
|
<package id="ImageProcessor" version="2.5.6" targetFramework="net45" />
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||||
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.2" targetFramework="net452" />
|
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Security" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Security" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Security.Cookies" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Security.Cookies" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Security.OAuth" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Security.OAuth" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
||||||
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
<package id="MySql.Data" version="6.9.9" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="semver" version="1.1.2" targetFramework="net452" />
|
<package id="semver" version="1.1.2" targetFramework="net45" />
|
||||||
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
<package id="System.ValueTuple" version="4.4.0" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props" Condition="Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -10,7 +9,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Umbraco.Tests.Benchmarks</RootNamespace>
|
<RootNamespace>Umbraco.Tests.Benchmarks</RootNamespace>
|
||||||
<AssemblyName>Umbraco.Tests.Benchmarks</AssemblyName>
|
<AssemblyName>Umbraco.Tests.Benchmarks</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>
|
||||||
</NuGetPackageImportStamp>
|
</NuGetPackageImportStamp>
|
||||||
@@ -40,8 +39,8 @@
|
|||||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BenchmarkDotNet, Version=0.10.3.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.0.10.3\lib\net45\BenchmarkDotNet.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.0.10.12\lib\net46\BenchmarkDotNet.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="BenchmarkDotNet.Core, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet.Core, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.Core.0.10.12\lib\net46\BenchmarkDotNet.Core.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.Core.0.10.12\lib\net46\BenchmarkDotNet.Core.dll</HintPath>
|
||||||
@@ -49,27 +48,20 @@
|
|||||||
<Reference Include="BenchmarkDotNet.Diagnostics.Windows, Version=0.9.9.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet.Diagnostics.Windows, Version=0.9.9.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.Diagnostics.Windows.0.9.9\lib\net45\BenchmarkDotNet.Diagnostics.Windows.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.Diagnostics.Windows.0.9.9\lib\net45\BenchmarkDotNet.Diagnostics.Windows.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="BenchmarkDotNet.Toolchains.Roslyn, Version=0.10.3.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
<Reference Include="BenchmarkDotNet.Toolchains.Roslyn, Version=0.10.12.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\BenchmarkDotNet.Toolchains.Roslyn.0.10.3\lib\net45\BenchmarkDotNet.Toolchains.Roslyn.dll</HintPath>
|
<HintPath>..\packages\BenchmarkDotNet.Toolchains.Roslyn.0.10.12\lib\net46\BenchmarkDotNet.Toolchains.Roslyn.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll</HintPath>
|
<HintPath>..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Dia2Lib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeAnalysis, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\Dia2Lib.dll</HintPath>
|
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.2.4.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CodeAnalysis, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.2.9.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath>
|
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.2.4.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Diagnostics.Tracing.TraceEvent, Version=1.0.41.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.2.9.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\lib\net40\Microsoft.Diagnostics.Tracing.TraceEvent.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Diagnostics.FastSerialization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\Microsoft.Diagnostics.FastSerialization.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.26.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\Microsoft.Diagnostics.Tracing.TraceEvent.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.DotNet.InternalAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.DotNet.InternalAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.DotNet.InternalAbstractions.1.0.0\lib\net451\Microsoft.DotNet.InternalAbstractions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.DotNet.InternalAbstractions.1.0.0\lib\net451\Microsoft.DotNet.InternalAbstractions.dll</HintPath>
|
||||||
@@ -77,28 +69,24 @@
|
|||||||
<Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.DotNet.PlatformAbstractions.1.1.1\lib\net451\Microsoft.DotNet.PlatformAbstractions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.DotNet.PlatformAbstractions.1.1.1\lib\net451\Microsoft.DotNet.PlatformAbstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Win32.Registry, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Win32.Registry, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Win32.Registry.4.3.0\lib\net46\Microsoft.Win32.Registry.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="OSExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\OSExtensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
|
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Console, Version=4.0.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Console.4.3.1\lib\net46\System.Console.dll</HintPath>
|
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
@@ -125,33 +113,11 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
<Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
|
<HintPath>..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
|
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net46\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.Extensions, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.InteropServices, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.InteropServices.4.3.0\lib\net462\System.Runtime.InteropServices.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.AccessControl, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
@@ -160,25 +126,21 @@
|
|||||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
<HintPath>..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Threading.Thread, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Thread, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll</HintPath>
|
<HintPath>..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@@ -187,9 +149,7 @@
|
|||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.XmlDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Xml.XmlDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll</HintPath>
|
<HintPath>..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll</HintPath>
|
||||||
@@ -200,10 +160,6 @@
|
|||||||
<Reference Include="System.Xml.XPath.XDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Xml.XPath.XDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll</HintPath>
|
<HintPath>..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="TraceReloggerLib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\lib\net45\TraceReloggerLib.dll</HintPath>
|
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ConcurrentDictionaryBenchmarks.cs" />
|
<Compile Include="ConcurrentDictionaryBenchmarks.cs" />
|
||||||
@@ -239,10 +195,6 @@
|
|||||||
<Name>Umbraco.Web</Name>
|
<Name>Umbraco.Web</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.6.2\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
|
|
||||||
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.6.2\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
@@ -255,11 +207,12 @@
|
|||||||
<PreBuildEvent>xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\amd64\*.* "$(TargetDir)amd64\" /Y /F /E /I /C /D
|
<PreBuildEvent>xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\amd64\*.* "$(TargetDir)amd64\" /Y /F /E /I /C /D
|
||||||
xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" /Y /F /E /I /C /D</PreBuildEvent>
|
xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" /Y /F /E /I /C /D</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<Import Project="..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets" Condition="Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.2.0.26\build\Microsoft.Diagnostics.Tracing.TraceEvent.props'))" />
|
<Error Condition="!Exists('..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||||
@@ -16,27 +16,27 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -64,60 +64,8 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.4.3.0" newVersion="1.4.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Diagnostics.Tracing.TraceEvent" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.26.0" newVersion="2.0.26.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Win32.Registry" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
|
</configuration>
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="BenchmarkDotNet" version="0.10.3" targetFramework="net462" />
|
<package id="BenchmarkDotNet" version="0.10.12" targetFramework="net46" />
|
||||||
<package id="BenchmarkDotNet.Core" version="0.10.12" targetFramework="net46" />
|
<package id="BenchmarkDotNet.Core" version="0.10.12" targetFramework="net46" />
|
||||||
<package id="BenchmarkDotNet.Diagnostics.Windows" version="0.9.9" targetFramework="net45" />
|
<package id="BenchmarkDotNet.Diagnostics.Windows" version="0.9.9" targetFramework="net45" />
|
||||||
<package id="BenchmarkDotNet.Toolchains.Roslyn" version="0.10.3" targetFramework="net462" />
|
<package id="BenchmarkDotNet.Toolchains.Roslyn" version="0.10.12" targetFramework="net46" />
|
||||||
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="2.6.2" targetFramework="net462" developmentDependency="true" />
|
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.CodeAnalysis.Common" version="2.9.0" targetFramework="net462" />
|
<package id="Microsoft.CodeAnalysis.Common" version="2.4.0" targetFramework="net46" />
|
||||||
<package id="Microsoft.CodeAnalysis.CSharp" version="2.9.0" targetFramework="net462" />
|
<package id="Microsoft.CodeAnalysis.CSharp" version="2.4.0" targetFramework="net46" />
|
||||||
<package id="Microsoft.Diagnostics.Tracing.TraceEvent" version="2.0.26" targetFramework="net462" />
|
<package id="Microsoft.Diagnostics.Tracing.TraceEvent" version="1.0.41" targetFramework="net45" />
|
||||||
<package id="Microsoft.DotNet.InternalAbstractions" version="1.0.0" targetFramework="net46" />
|
<package id="Microsoft.DotNet.InternalAbstractions" version="1.0.0" targetFramework="net46" />
|
||||||
<package id="Microsoft.DotNet.PlatformAbstractions" version="1.1.1" targetFramework="net46" />
|
<package id="Microsoft.DotNet.PlatformAbstractions" version="1.1.1" targetFramework="net46" />
|
||||||
<package id="Microsoft.SqlServer.Compact" version="4.0.8854.1" targetFramework="net45" />
|
<package id="Microsoft.SqlServer.Compact" version="4.0.8854.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.Win32.Registry" version="4.5.0" targetFramework="net462" />
|
<package id="Microsoft.Win32.Registry" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
||||||
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
||||||
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
|
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
|
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
|
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net462" />
|
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
|
||||||
<package id="System.Console" version="4.3.1" targetFramework="net462" />
|
<package id="System.Console" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net46" />
|
||||||
@@ -31,32 +31,28 @@
|
|||||||
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
|
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
|
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="net462" />
|
<package id="System.Reflection" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net462" />
|
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net46" />
|
||||||
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net462" />
|
<package id="System.Reflection.Primitives" version="4.0.1" targetFramework="net45" />
|
||||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
|
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime" version="4.3.1" targetFramework="net462" />
|
<package id="System.Runtime" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.1" targetFramework="net462" />
|
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net462" />
|
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net462" />
|
|
||||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net462" />
|
|
||||||
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.AccessControl" version="4.5.0" targetFramework="net462" />
|
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" />
|
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" />
|
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
|
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" />
|
|
||||||
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net462" />
|
|
||||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Text.Encoding.CodePages" version="4.5.0" targetFramework="net462" />
|
<package id="System.Text.Encoding.CodePages" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net462" />
|
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Thread" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Thread" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
<package id="System.ValueTuple" version="4.4.0" targetFramework="net46" />
|
||||||
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net462" />
|
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Xml.XmlSerializer" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.XmlSerializer" version="4.3.0" targetFramework="net46" />
|
||||||
|
|||||||
@@ -102,14 +102,14 @@
|
|||||||
</system.web>
|
</system.web>
|
||||||
|
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
</startup>
|
</startup>
|
||||||
<runtime>
|
<runtime>
|
||||||
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
|
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||||
|
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
@@ -141,19 +141,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace Umbraco.Tests.CodeFirst
|
|||||||
new PublishedPropertyType("articleDate", 0, "?"),
|
new PublishedPropertyType("articleDate", 0, "?"),
|
||||||
new PublishedPropertyType("pageTitle", 0, "?"),
|
new PublishedPropertyType("pageTitle", 0, "?"),
|
||||||
};
|
};
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes);
|
var type = new AutoPublishedContentType(0, "anything", propertyTypes);
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
Debug.Print("INIT STRONG {0}",
|
Debug.Print("INIT STRONG {0}",
|
||||||
PublishedContentType.Get(PublishedItemType.Content, "anything")
|
PublishedContentType.Get(PublishedItemType.Content, "anything")
|
||||||
@@ -148,4 +148,4 @@ namespace Umbraco.Tests.CodeFirst
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ namespace Umbraco.Tests
|
|||||||
// AutoPublishedContentType will auto-generate other properties
|
// AutoPublishedContentType will auto-generate other properties
|
||||||
new PublishedPropertyType("content", 0, "?"),
|
new PublishedPropertyType("content", 0, "?"),
|
||||||
};
|
};
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes);
|
var type = new AutoPublishedContentType(0, "anything", propertyTypes);
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
Debug.Print("INIT LIB {0}",
|
Debug.Print("INIT LIB {0}",
|
||||||
PublishedContentType.Get(PublishedItemType.Content, "anything")
|
PublishedContentType.Get(PublishedItemType.Content, "anything")
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace Umbraco.Tests.Membership
|
|||||||
new PublishedPropertyType("bodyText", 0, "?"),
|
new PublishedPropertyType("bodyText", 0, "?"),
|
||||||
new PublishedPropertyType("author", 0, "?")
|
new PublishedPropertyType("author", 0, "?")
|
||||||
};
|
};
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes);
|
var type = new AutoPublishedContentType(0, "anything", propertyTypes);
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.Migrations.SqlScripts {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class SqlResources {
|
internal class SqlResources {
|
||||||
|
|||||||
@@ -177,7 +177,18 @@ namespace Umbraco.Tests.Models
|
|||||||
};
|
};
|
||||||
item.AdditionalData.Add("test1", 3);
|
item.AdditionalData.Add("test1", 3);
|
||||||
item.AdditionalData.Add("test2", "valuie");
|
item.AdditionalData.Add("test2", "valuie");
|
||||||
|
|
||||||
|
item.AdditionalData.Add("test3", new UmbracoEntity.EntityProperty()
|
||||||
|
{
|
||||||
|
Value = "test",
|
||||||
|
PropertyEditorAlias = "TestPropertyEditor"
|
||||||
|
});
|
||||||
|
item.AdditionalData.Add("test4", new UmbracoEntity.EntityProperty()
|
||||||
|
{
|
||||||
|
Value = "test2",
|
||||||
|
PropertyEditorAlias = "TestPropertyEditor2"
|
||||||
|
});
|
||||||
|
|
||||||
var clone = (UmbracoEntity)item.DeepClone();
|
var clone = (UmbracoEntity)item.DeepClone();
|
||||||
|
|
||||||
Assert.AreNotSame(clone, item);
|
Assert.AreNotSame(clone, item);
|
||||||
@@ -239,10 +250,20 @@ namespace Umbraco.Tests.Models
|
|||||||
};
|
};
|
||||||
item.AdditionalData.Add("test1", 3);
|
item.AdditionalData.Add("test1", 3);
|
||||||
item.AdditionalData.Add("test2", "valuie");
|
item.AdditionalData.Add("test2", "valuie");
|
||||||
|
item.AdditionalData.Add("test3", new UmbracoEntity.EntityProperty()
|
||||||
|
{
|
||||||
|
Value = "test",
|
||||||
|
PropertyEditorAlias = "TestPropertyEditor"
|
||||||
|
});
|
||||||
|
item.AdditionalData.Add("test4", new UmbracoEntity.EntityProperty()
|
||||||
|
{
|
||||||
|
Value = "test2",
|
||||||
|
PropertyEditorAlias = "TestPropertyEditor2"
|
||||||
|
});
|
||||||
|
|
||||||
var result = ss.ToStream(item);
|
var result = ss.ToStream(item);
|
||||||
var json = result.ResultStream.ToJsonString();
|
var json = result.ResultStream.ToJsonString();
|
||||||
Debug.Print(json);
|
Debug.Print(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -327,7 +327,7 @@ AnotherContentFinder
|
|||||||
public void Resolves_RestExtensions()
|
public void Resolves_RestExtensions()
|
||||||
{
|
{
|
||||||
var types = _manager.ResolveRestExtensions();
|
var types = _manager.ResolveRestExtensions();
|
||||||
Assert.AreEqual(2, types.Count());
|
Assert.AreEqual(3, types.Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
new PublishedPropertyType("creatorName", 0, "?"),
|
new PublishedPropertyType("creatorName", 0, "?"),
|
||||||
new PublishedPropertyType("blah", 0, "?"), // ugly error when that one is missing...
|
new PublishedPropertyType("blah", 0, "?"), // ugly error when that one is missing...
|
||||||
};
|
};
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes);
|
var type = new AutoPublishedContentType(0, "anything", propertyTypes);
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -729,4 +729,4 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
return s.Contains(val.ToString());
|
return s.Contains(val.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
|
|
||||||
// need to specify a custom callback for unit tests
|
// need to specify a custom callback for unit tests
|
||||||
// AutoPublishedContentTypes generates properties automatically
|
// AutoPublishedContentTypes generates properties automatically
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", new PublishedPropertyType[] {});
|
var type = new AutoPublishedContentType(0, "anything", new PublishedPropertyType[] {});
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
|
|
||||||
// need to specify a different callback for testing
|
// need to specify a different callback for testing
|
||||||
@@ -251,4 +251,4 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -234,9 +234,9 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
new PublishedPropertyType("prop1", 1, "?"),
|
new PublishedPropertyType("prop1", 1, "?"),
|
||||||
};
|
};
|
||||||
|
|
||||||
var contentType1 = new PublishedContentType(1, "ContentType1", "ContentType1", "ContentType1", Enumerable.Empty<string>(), props);
|
var contentType1 = new PublishedContentType(1, "ContentType1", Enumerable.Empty<string>(), props);
|
||||||
var contentType2 = new PublishedContentType(2, "ContentType2", "ContentType2", "ContentType2", Enumerable.Empty<string>(), props);
|
var contentType2 = new PublishedContentType(2, "ContentType2", Enumerable.Empty<string>(), props);
|
||||||
var contentType2s = new PublishedContentType(3, "ContentType2Sub", "ContentType2Sub", "ContentType2Sub", Enumerable.Empty<string>(), props);
|
var contentType2s = new PublishedContentType(3, "ContentType2Sub", Enumerable.Empty<string>(), props);
|
||||||
|
|
||||||
cache.Add(new SolidPublishedContent(contentType1)
|
cache.Add(new SolidPublishedContent(contentType1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
// AutoPublishedContentType will auto-generate other properties
|
// AutoPublishedContentType will auto-generate other properties
|
||||||
new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias),
|
new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias),
|
||||||
};
|
};
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", propertyTypes);
|
var type = new AutoPublishedContentType(0, "anything", propertyTypes);
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
|
|
||||||
var rCtx = GetRoutingContext("/test", 1234);
|
var rCtx = GetRoutingContext("/test", 1234);
|
||||||
@@ -65,4 +65,4 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
UmbracoContext.Current = null;
|
UmbracoContext.Current = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -354,12 +354,12 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
{
|
{
|
||||||
private static readonly PublishedPropertyType Default = new PublishedPropertyType("*", 0, "?");
|
private static readonly PublishedPropertyType Default = new PublishedPropertyType("*", 0, "?");
|
||||||
|
|
||||||
public AutoPublishedContentType(int id, string alias, string name, string description, IEnumerable<PublishedPropertyType> propertyTypes)
|
public AutoPublishedContentType(int id, string alias, IEnumerable<PublishedPropertyType> propertyTypes)
|
||||||
: base(id, alias, name, description, Enumerable.Empty<string>(), propertyTypes)
|
: base(id, alias, Enumerable.Empty<string>(), propertyTypes)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
public AutoPublishedContentType(int id, string alias, string name, string description, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes)
|
public AutoPublishedContentType(int id, string alias, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes)
|
||||||
: base(id, alias, name, description, compositionAliases, propertyTypes)
|
: base(id, alias, compositionAliases, propertyTypes)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
public override PublishedPropertyType GetPropertyType(string alias)
|
public override PublishedPropertyType GetPropertyType(string alias)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace Umbraco.Tests.PublishedContent
|
|||||||
new PublishedPropertyType("testRecursive", 0, "?"),
|
new PublishedPropertyType("testRecursive", 0, "?"),
|
||||||
};
|
};
|
||||||
var compositionAliases = new[] { "MyCompositionAlias" };
|
var compositionAliases = new[] { "MyCompositionAlias" };
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", compositionAliases, propertyTypes);
|
var type = new AutoPublishedContentType(0, "anything", compositionAliases, propertyTypes);
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.Services.Importing {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class ImportResources {
|
internal class ImportResources {
|
||||||
@@ -322,7 +322,7 @@ namespace Umbraco.Tests.Services.Importing {
|
|||||||
/// </package>
|
/// </package>
|
||||||
/// <author>
|
/// <author>
|
||||||
/// <name>Morten Christensen</name>
|
/// <name>Morten Christensen</name>
|
||||||
/// [rest of string was truncated]";.
|
/// [rest of string was truncated]";.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string TemplateOnly_Package {
|
internal static string TemplateOnly_Package {
|
||||||
get {
|
get {
|
||||||
@@ -348,7 +348,7 @@ namespace Umbraco.Tests.Services.Importing {
|
|||||||
/// </package>
|
/// </package>
|
||||||
/// <author>
|
/// <author>
|
||||||
/// <name>Morten Christensen</name>
|
/// <name>Morten Christensen</name>
|
||||||
/// [rest of string was truncated]";.
|
/// [rest of string was truncated]";.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string TemplateOnly_Updated_Package {
|
internal static string TemplateOnly_Updated_Package {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using Umbraco.Core;
|
|
||||||
using Umbraco.Core.Models;
|
|
||||||
using Umbraco.Core.Models.Rdbms;
|
|
||||||
using Umbraco.Tests.TestHelpers;
|
|
||||||
using Umbraco.Tests.TestHelpers.Entities;
|
|
||||||
|
|
||||||
namespace Umbraco.Tests.Services
|
|
||||||
{
|
|
||||||
[DatabaseTestBehavior(DatabaseBehavior.NewDbFileAndSchemaPerTest)]
|
|
||||||
[TestFixture, RequiresSTA]
|
|
||||||
public class MemberGroupServiceTests : BaseServiceTest
|
|
||||||
{
|
|
||||||
[SetUp]
|
|
||||||
public override void Initialize()
|
|
||||||
{
|
|
||||||
base.Initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TearDown]
|
|
||||||
public override void TearDown()
|
|
||||||
{
|
|
||||||
base.TearDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
[ExpectedException("System.InvalidOperationException")]
|
|
||||||
public void New_MemberGroup_Is_Not_Allowed_With_Empty_Name()
|
|
||||||
{
|
|
||||||
var service = ServiceContext.MemberGroupService;
|
|
||||||
|
|
||||||
service.Save(new MemberGroup {Name = ""});
|
|
||||||
|
|
||||||
Assert.Fail("An exception should have been thrown");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -61,17 +61,6 @@ namespace Umbraco.Tests.Strings
|
|||||||
Assert.AreEqual(stripped, result);
|
Assert.AreEqual(stripped, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("'+alert(1234)+'", "+alert1234+")]
|
|
||||||
[TestCase("'+alert(56+78)+'", "+alert56+78+")]
|
|
||||||
[TestCase("{{file}}", "file")]
|
|
||||||
[TestCase("'+alert('hello')+'", "+alerthello+")]
|
|
||||||
[TestCase("Test", "Test")]
|
|
||||||
public void Clean_From_XSS(string input, string result)
|
|
||||||
{
|
|
||||||
var cleaned = input.CleanForXss();
|
|
||||||
Assert.AreEqual(cleaned, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCase("This is a string to encrypt")]
|
[TestCase("This is a string to encrypt")]
|
||||||
[TestCase("This is a string to encrypt\nThis is a second line")]
|
[TestCase("This is a string to encrypt\nThis is a second line")]
|
||||||
[TestCase(" White space is preserved ")]
|
[TestCase(" White space is preserved ")]
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Umbraco.Tests.TestHelpers
|
|||||||
|
|
||||||
// need to specify a custom callback for unit tests
|
// need to specify a custom callback for unit tests
|
||||||
// AutoPublishedContentTypes generates properties automatically
|
// AutoPublishedContentTypes generates properties automatically
|
||||||
var type = new AutoPublishedContentType(0, "anything", "anything", "anything", new PublishedPropertyType[] {});
|
var type = new AutoPublishedContentType(0, "anything", new PublishedPropertyType[] {});
|
||||||
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.TreesAndSections {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class ResourceFiles {
|
internal class ResourceFiles {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Umbraco.Tests</RootNamespace>
|
<RootNamespace>Umbraco.Tests</RootNamespace>
|
||||||
<AssemblyName>Umbraco.Tests</AssemblyName>
|
<AssemblyName>Umbraco.Tests</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
<RestorePackages>true</RestorePackages>
|
||||||
@@ -65,12 +65,6 @@
|
|||||||
<Reference Include="Examine, Version=0.1.89.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Examine, Version=0.1.89.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Examine.0.1.89\lib\net45\Examine.dll</HintPath>
|
<HintPath>..\packages\Examine.0.1.89\lib\net45\Examine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HtmlAgilityPack, Version=1.8.8.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\HtmlAgilityPack.1.8.8\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Examine, Version=0.1.90.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Examine.0.1.90\lib\net45\Examine.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -84,25 +78,25 @@
|
|||||||
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.4.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Hosting, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Hosting, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Hosting.4.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Security, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Testing, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Testing, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Testing.4.0.1\lib\net45\Microsoft.Owin.Testing.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Testing.3.1.0\lib\net45\Microsoft.Owin.Testing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
@@ -113,8 +107,8 @@
|
|||||||
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.1.1309.919, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
|
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
|
||||||
@@ -123,7 +117,7 @@
|
|||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Semver, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath>
|
<HintPath>..\packages\semver.1.1.2\lib\net45\Semver.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
@@ -139,8 +133,8 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="System.Runtime.Caching" />
|
<Reference Include="System.Runtime.Caching" />
|
||||||
@@ -148,38 +142,38 @@
|
|||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.Owin, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.SelfHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.SelfHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.SelfHost.5.2.7\lib\net45\System.Web.Http.SelfHost.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.SelfHost.5.2.3\lib\net45\System.Web.Http.SelfHost.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.Tracing, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.Tracing, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.7\lib\net45\System.Web.Http.Tracing.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.3\lib\net45\System.Web.Http.Tracing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.Services" />
|
<Reference Include="System.Web.Services" />
|
||||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@@ -199,7 +193,6 @@
|
|||||||
<Compile Include="PublishedContent\StronglyTypedModels\Home.cs" />
|
<Compile Include="PublishedContent\StronglyTypedModels\Home.cs" />
|
||||||
<Compile Include="Services\AuditServiceTests.cs" />
|
<Compile Include="Services\AuditServiceTests.cs" />
|
||||||
<Compile Include="Services\ConsentServiceTests.cs" />
|
<Compile Include="Services\ConsentServiceTests.cs" />
|
||||||
<Compile Include="Services\MemberGroupServiceTests.cs" />
|
|
||||||
<Compile Include="TestHelpers\ControllerTesting\AuthenticateEverythingExtensions.cs" />
|
<Compile Include="TestHelpers\ControllerTesting\AuthenticateEverythingExtensions.cs" />
|
||||||
<Compile Include="TestHelpers\ControllerTesting\AuthenticateEverythingMiddleware.cs" />
|
<Compile Include="TestHelpers\ControllerTesting\AuthenticateEverythingMiddleware.cs" />
|
||||||
<Compile Include="TestHelpers\ControllerTesting\SpecificAssemblyResolver.cs" />
|
<Compile Include="TestHelpers\ControllerTesting\SpecificAssemblyResolver.cs" />
|
||||||
@@ -398,7 +391,6 @@
|
|||||||
<Compile Include="Models\ContentExtensionsTests.cs" />
|
<Compile Include="Models\ContentExtensionsTests.cs" />
|
||||||
<Compile Include="Models\UserExtensionsTests.cs" />
|
<Compile Include="Models\UserExtensionsTests.cs" />
|
||||||
<Compile Include="Web\Mvc\MergeParentContextViewDataAttributeTests.cs" />
|
<Compile Include="Web\Mvc\MergeParentContextViewDataAttributeTests.cs" />
|
||||||
<Compile Include="Web\Mvc\ValidateUmbracoFormRouteStringAttributeTests.cs" />
|
|
||||||
<Compile Include="Web\Mvc\ViewDataDictionaryExtensionTests.cs" />
|
<Compile Include="Web\Mvc\ViewDataDictionaryExtensionTests.cs" />
|
||||||
<Compile Include="Persistence\PetaPocoExtensionsTest.cs" />
|
<Compile Include="Persistence\PetaPocoExtensionsTest.cs" />
|
||||||
<Compile Include="Persistence\Querying\ContentTypeSqlMappingTests.cs" />
|
<Compile Include="Persistence\Querying\ContentTypeSqlMappingTests.cs" />
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ namespace Umbraco.Tests.UmbracoExamine {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class TestFiles {
|
internal class TestFiles {
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ using Umbraco.Web;
|
|||||||
|
|
||||||
namespace Umbraco.Tests.Web.Mvc
|
namespace Umbraco.Tests.Web.Mvc
|
||||||
{
|
{
|
||||||
|
[TestFixture]
|
||||||
[TestFixture]
|
|
||||||
public class HtmlHelperExtensionMethodsTests
|
public class HtmlHelperExtensionMethodsTests
|
||||||
{
|
{
|
||||||
[SetUp]
|
[SetUp]
|
||||||
@@ -30,30 +29,5 @@ namespace Umbraco.Tests.Web.Mvc
|
|||||||
var output = _htmlHelper.Wrap("div", "hello world", new {style = "color:red;", onclick = "void();"});
|
var output = _htmlHelper.Wrap("div", "hello world", new {style = "color:red;", onclick = "void();"});
|
||||||
Assert.AreEqual("<div style=\"color:red;\" onclick=\"void();\">hello world</div>", output.ToHtmlString());
|
Assert.AreEqual("<div style=\"color:red;\" onclick=\"void();\">hello world</div>", output.ToHtmlString());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
[Test]
|
}
|
||||||
public void GetRelatedLinkHtml_Simple()
|
|
||||||
{
|
|
||||||
var relatedLink = new Umbraco.Web.Models.RelatedLink {
|
|
||||||
Caption = "Link Caption",
|
|
||||||
NewWindow = true,
|
|
||||||
Link = "https://www.google.com/"
|
|
||||||
};
|
|
||||||
var output = _htmlHelper.GetRelatedLinkHtml(relatedLink);
|
|
||||||
Assert.AreEqual("<a href=\"https://www.google.com/\" target=\"_blank\">Link Caption</a>", output.ToHtmlString());
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void GetRelatedLinkHtml_HtmlAttributes()
|
|
||||||
{
|
|
||||||
var relatedLink = new Umbraco.Web.Models.RelatedLink
|
|
||||||
{
|
|
||||||
Caption = "Link Caption",
|
|
||||||
NewWindow = true,
|
|
||||||
Link = "https://www.google.com/"
|
|
||||||
};
|
|
||||||
var output = _htmlHelper.GetRelatedLinkHtml(relatedLink, new { @class = "test-class"});
|
|
||||||
Assert.AreEqual("<a class=\"test-class\" href=\"https://www.google.com/\" target=\"_blank\">Link Caption</a>", output.ToHtmlString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
using NUnit.Framework;
|
|
||||||
using Umbraco.Web;
|
|
||||||
using Umbraco.Web.Mvc;
|
|
||||||
|
|
||||||
namespace Umbraco.Tests.Web.Mvc
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class ValidateUmbracoFormRouteStringAttributeTests
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void Validate_Route_String()
|
|
||||||
{
|
|
||||||
var attribute = new ValidateUmbracoFormRouteStringAttribute();
|
|
||||||
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(null, null, null, null));
|
|
||||||
|
|
||||||
const string ControllerName = "Test";
|
|
||||||
const string ControllerAction = "Index";
|
|
||||||
const string Area = "MyArea";
|
|
||||||
var validUfprt = UmbracoHelper.CreateEncryptedRouteString(ControllerName, ControllerAction, Area);
|
|
||||||
|
|
||||||
var invalidUfprt = validUfprt + "z";
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(invalidUfprt, null, null, null));
|
|
||||||
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, ControllerAction, "doesntMatch"));
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, ControllerAction, null));
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, "doesntMatch", Area));
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, ControllerName, null, Area));
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, "doesntMatch", ControllerAction, Area));
|
|
||||||
Assert.Throws<HttpUmbracoFormRouteStringException>(() => attribute.ValidateRouteString(validUfprt, null, ControllerAction, Area));
|
|
||||||
|
|
||||||
Assert.DoesNotThrow(() => attribute.ValidateRouteString(validUfprt, ControllerName, ControllerAction, Area));
|
|
||||||
Assert.DoesNotThrow(() => attribute.ValidateRouteString(validUfprt, ControllerName.ToLowerInvariant(), ControllerAction.ToLowerInvariant(), Area.ToLowerInvariant()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,42 +2,41 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||||
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
||||||
<package id="Examine" version="0.1.90" targetFramework="net45" />
|
<package id="Examine" version="0.1.89" targetFramework="net45" />
|
||||||
<package id="HtmlAgilityPack" version="1.8.8" targetFramework="net452" />
|
|
||||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||||
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
||||||
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi.SelfHost" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.SelfHost" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Hosting" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Hosting" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Security" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Security" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Testing" version="4.0.1" targetFramework="net452" />
|
<package id="Microsoft.Owin.Testing" version="3.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||||
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
|
||||||
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
<package id="Moq" version="4.1.1309.0919" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
|
||||||
<package id="NUnit" version="2.6.2" targetFramework="net45" />
|
<package id="NUnit" version="2.6.2" targetFramework="net45" />
|
||||||
<package id="NUnitTestAdapter" version="2.1.1" targetFramework="net45" />
|
<package id="NUnitTestAdapter" version="2.1.1" targetFramework="net45" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="Selenium.WebDriver" version="2.32.0" targetFramework="net45" />
|
<package id="Selenium.WebDriver" version="2.32.0" targetFramework="net45" />
|
||||||
<package id="semver" version="1.1.2" targetFramework="net452" />
|
<package id="semver" version="1.1.2" targetFramework="net45" />
|
||||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
|
<package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
|
||||||
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
<package id="SqlServerCE" version="4.0.0.1" targetFramework="net45" />
|
||||||
<package id="System.Runtime" version="4.3.1" targetFramework="net452" />
|
<package id="System.Runtime" version="4.3.0" targetFramework="net45" />
|
||||||
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net452" />
|
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net45" />
|
||||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net452" />
|
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net45" />
|
||||||
<package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="net452" />
|
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"jquery-migrate": "1.4.0",
|
"jquery-migrate": "1.4.0",
|
||||||
"angular-dynamic-locale": "0.1.28",
|
"angular-dynamic-locale": "0.1.28",
|
||||||
"ng-file-upload": "~7.3.8",
|
"ng-file-upload": "~7.3.8",
|
||||||
"tinymce": "~4.9.4",
|
"tinymce": "~4.7.1",
|
||||||
"codemirror": "~5.3.0",
|
"codemirror": "~5.3.0",
|
||||||
"angular-local-storage": "~0.2.3",
|
"angular-local-storage": "~0.2.3",
|
||||||
"moment": "~2.10.3",
|
"moment": "~2.10.3",
|
||||||
|
|||||||
+30
-11
@@ -4146,7 +4146,8 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@@ -4167,12 +4168,14 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@@ -4187,17 +4190,20 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -4314,7 +4320,8 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@@ -4326,6 +4333,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -4340,6 +4348,7 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@@ -4347,12 +4356,14 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@@ -4371,6 +4382,7 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@@ -4451,7 +4463,8 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@@ -4463,6 +4476,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@@ -4548,7 +4562,8 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@@ -4584,6 +4599,7 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@@ -4603,6 +4619,7 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -4646,12 +4663,14 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ LazyLoad.js([
|
|||||||
'../js/umbraco.security.js',
|
'../js/umbraco.security.js',
|
||||||
'../ServerVariables',
|
'../ServerVariables',
|
||||||
'../lib/spectrum/spectrum.js',
|
'../lib/spectrum/spectrum.js',
|
||||||
'../js/umbraco.canvasdesigner.js'
|
'../js/umbraco.canvasdesigner.js',
|
||||||
|
'../js/canvasdesigner.panel.js'
|
||||||
], function () {
|
], function () {
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
angular.bootstrap(document, ['Umbraco.canvasdesigner']);
|
angular.bootstrap(document, ['Umbraco.canvasdesigner']);
|
||||||
|
|||||||
-4
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
<umb-toggle
|
<umb-toggle
|
||||||
checked="vm.checked"
|
checked="vm.checked"
|
||||||
disabled="vm.disabled"
|
|
||||||
on-click="vm.toggle()"
|
on-click="vm.toggle()"
|
||||||
show-labels="true"
|
show-labels="true"
|
||||||
label-on="Start"
|
label-on="Start"
|
||||||
@@ -39,7 +38,6 @@
|
|||||||
|
|
||||||
var vm = this;
|
var vm = this;
|
||||||
vm.checked = false;
|
vm.checked = false;
|
||||||
vm.disabled = false;
|
|
||||||
|
|
||||||
vm.toggle = toggle;
|
vm.toggle = toggle;
|
||||||
|
|
||||||
@@ -54,7 +52,6 @@
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@param {boolean} checked Set to <code>true</code> or <code>false</code> to toggle the switch.
|
@param {boolean} checked Set to <code>true</code> or <code>false</code> to toggle the switch.
|
||||||
@param {boolean} disabled Set to <code>true</code> or <code>false</code> to disable/enable the switch.
|
|
||||||
@param {callback} onClick The function which should be called when the toggle is clicked.
|
@param {callback} onClick The function which should be called when the toggle is clicked.
|
||||||
@param {string=} showLabels Set to <code>true</code> or <code>false</code> to show a "On" or "Off" label next to the switch.
|
@param {string=} showLabels Set to <code>true</code> or <code>false</code> to show a "On" or "Off" label next to the switch.
|
||||||
@param {string=} labelOn Set a custom label for when the switched is turned on. It will default to "On".
|
@param {string=} labelOn Set a custom label for when the switched is turned on. It will default to "On".
|
||||||
@@ -118,7 +115,6 @@
|
|||||||
templateUrl: 'views/components/buttons/umb-toggle.html',
|
templateUrl: 'views/components/buttons/umb-toggle.html',
|
||||||
scope: {
|
scope: {
|
||||||
checked: "=",
|
checked: "=",
|
||||||
disabled: "=",
|
|
||||||
onClick: "&",
|
onClick: "&",
|
||||||
labelOn: "@?",
|
labelOn: "@?",
|
||||||
labelOff: "@?",
|
labelOff: "@?",
|
||||||
|
|||||||
+1
-12
@@ -53,16 +53,6 @@
|
|||||||
if (scope.documentType !== null) {
|
if (scope.documentType !== null) {
|
||||||
scope.previewOpenUrl = '#/settings/documenttypes/edit/' + scope.documentType.id;
|
scope.previewOpenUrl = '#/settings/documenttypes/edit/' + scope.documentType.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// only allow configuring scheduled publishing if the user has publish ("U") and unpublish ("Z") permissions on this node
|
|
||||||
scope.allowScheduledPublishing = _.contains(scope.node.allowedActions, "U") && _.contains(scope.node.allowedActions, "Z");
|
|
||||||
|
|
||||||
ensureUniqueUrls();
|
|
||||||
}
|
|
||||||
|
|
||||||
// make sure we don't show duplicate URLs in case multiple URL providers assign the same URLs to the content (see issue 3842 for details)
|
|
||||||
function ensureUniqueUrls() {
|
|
||||||
scope.node.urls = _.uniq(scope.node.urls);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.auditTrailPageChange = function (pageNumber) {
|
scope.auditTrailPageChange = function (pageNumber) {
|
||||||
@@ -303,12 +293,11 @@
|
|||||||
if (!newValue) { return; }
|
if (!newValue) { return; }
|
||||||
if (newValue === oldValue) { return; }
|
if (newValue === oldValue) { return; }
|
||||||
|
|
||||||
if (isInfoTab) {
|
if(isInfoTab) {
|
||||||
loadAuditTrail();
|
loadAuditTrail();
|
||||||
loadRedirectUrls();
|
loadRedirectUrls();
|
||||||
formatDatesToLocal();
|
formatDatesToLocal();
|
||||||
setNodePublishStatus(scope.node);
|
setNodePublishStatus(scope.node);
|
||||||
ensureUniqueUrls();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
-55
@@ -1,55 +0,0 @@
|
|||||||
/**
|
|
||||||
@ngdoc directive
|
|
||||||
@name umbraco.directives.directive:umbCheckbox
|
|
||||||
@restrict E
|
|
||||||
@scope
|
|
||||||
|
|
||||||
@description
|
|
||||||
<b>Added in Umbraco version 7.14.0</b> Use this directive to render an umbraco checkbox.
|
|
||||||
|
|
||||||
<h3>Markup example</h3>
|
|
||||||
<pre>
|
|
||||||
<div ng-controller="My.Controller as vm">
|
|
||||||
|
|
||||||
<umb-checkbox
|
|
||||||
name="checkboxlist"
|
|
||||||
value="{{key}}"
|
|
||||||
model="true"
|
|
||||||
text="{{text}}">
|
|
||||||
</umb-checkbox>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
@param {boolean} model Set to <code>true</code> or <code>false</code> to set the checkbox to checked or unchecked.
|
|
||||||
@param {string} value Set the value of the checkbox.
|
|
||||||
@param {string} name Set the name of the checkbox.
|
|
||||||
@param {string} text Set the text for the checkbox label.
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function CheckboxDirective() {
|
|
||||||
var directive = {
|
|
||||||
restrict: 'E',
|
|
||||||
replace: true,
|
|
||||||
templateUrl: 'views/components/forms/umb-checkbox.html',
|
|
||||||
scope: {
|
|
||||||
model: "=",
|
|
||||||
value: "@",
|
|
||||||
name: "@",
|
|
||||||
text: "@",
|
|
||||||
required: "="
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return directive;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
angular.module('umbraco.directives').directive('umbCheckbox', CheckboxDirective);
|
|
||||||
|
|
||||||
})();
|
|
||||||
-54
@@ -1,54 +0,0 @@
|
|||||||
/**
|
|
||||||
@ngdoc directive
|
|
||||||
@name umbraco.directives.directive:umbRadiobutton
|
|
||||||
@restrict E
|
|
||||||
@scope
|
|
||||||
|
|
||||||
@description
|
|
||||||
<b>Added in Umbraco version 7.14.0</b> Use this directive to render an umbraco radio button.
|
|
||||||
|
|
||||||
<h3>Markup example</h3>
|
|
||||||
<pre>
|
|
||||||
<div ng-controller="My.Controller as vm">
|
|
||||||
|
|
||||||
<umb-radiobutton
|
|
||||||
name="checkboxlist"
|
|
||||||
value="{{key}}"
|
|
||||||
model="true"
|
|
||||||
text="{{text}}">
|
|
||||||
</umb-radiobutton>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
@param {boolean} model Set to <code>true</code> or <code>false</code> to set the radiobutton to checked or unchecked.
|
|
||||||
@param {string} value Set the value of the radiobutton.
|
|
||||||
@param {string} name Set the name of the radiobutton.
|
|
||||||
@param {string} text Set the text for the radiobutton label.
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function RadiobuttonDirective() {
|
|
||||||
var directive = {
|
|
||||||
restrict: 'E',
|
|
||||||
replace: true,
|
|
||||||
templateUrl: 'views/components/forms/umb-radiobutton.html',
|
|
||||||
scope: {
|
|
||||||
model: "=",
|
|
||||||
value: "@",
|
|
||||||
name: "@",
|
|
||||||
text: "@"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return directive;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
angular.module('umbraco.directives').directive('umbRadiobutton', RadiobuttonDirective);
|
|
||||||
|
|
||||||
})();
|
|
||||||
+35
-14
@@ -103,6 +103,34 @@ angular.module("umbraco.directives")
|
|||||||
scope.dimensions.cropper.height = _viewPortH; // scope.dimensions.viewport.height - 2 * scope.dimensions.margin;
|
scope.dimensions.cropper.height = _viewPortH; // scope.dimensions.viewport.height - 2 * scope.dimensions.margin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//when loading an image without any crop info, we center and fit it
|
||||||
|
var resizeImageToEditor = function(){
|
||||||
|
//returns size fitting the cropper
|
||||||
|
var size = cropperHelper.calculateAspectRatioFit(
|
||||||
|
scope.dimensions.image.width,
|
||||||
|
scope.dimensions.image.height,
|
||||||
|
scope.dimensions.cropper.width,
|
||||||
|
scope.dimensions.cropper.height,
|
||||||
|
true);
|
||||||
|
|
||||||
|
//sets the image size and updates the scope
|
||||||
|
scope.dimensions.image.width = size.width;
|
||||||
|
scope.dimensions.image.height = size.height;
|
||||||
|
|
||||||
|
//calculate the best suited ratios
|
||||||
|
scope.dimensions.scale.min = size.ratio;
|
||||||
|
scope.dimensions.scale.max = 2;
|
||||||
|
scope.dimensions.scale.current = size.ratio;
|
||||||
|
|
||||||
|
//center the image
|
||||||
|
var position = cropperHelper.centerInsideViewPort(scope.dimensions.image, scope.dimensions.cropper);
|
||||||
|
scope.dimensions.top = position.top;
|
||||||
|
scope.dimensions.left = position.left;
|
||||||
|
|
||||||
|
setConstraints();
|
||||||
|
};
|
||||||
|
|
||||||
//resize to a given ratio
|
//resize to a given ratio
|
||||||
var resizeImageToScale = function(ratio){
|
var resizeImageToScale = function(ratio){
|
||||||
//do stuff
|
//do stuff
|
||||||
@@ -199,19 +227,12 @@ angular.module("umbraco.directives")
|
|||||||
//set dimensions on image, viewport, cropper etc
|
//set dimensions on image, viewport, cropper etc
|
||||||
setDimensions(image);
|
setDimensions(image);
|
||||||
|
|
||||||
//create a default crop if we haven't got one already
|
//if we have a crop already position the image
|
||||||
var createDefaultCrop = !scope.crop;
|
if(scope.crop){
|
||||||
if (createDefaultCrop) {
|
resizeImageToCrop();
|
||||||
calculateCropBox();
|
}else{
|
||||||
}
|
resizeImageToEditor();
|
||||||
|
}
|
||||||
resizeImageToCrop();
|
|
||||||
|
|
||||||
//if we're creating a new crop, make sure to zoom out fully
|
|
||||||
if (createDefaultCrop) {
|
|
||||||
scope.dimensions.scale.current = scope.dimensions.scale.min;
|
|
||||||
resizeImageToScale(scope.dimensions.scale.min);
|
|
||||||
}
|
|
||||||
|
|
||||||
//sets constaints for the cropper
|
//sets constaints for the cropper
|
||||||
setConstraints();
|
setConstraints();
|
||||||
@@ -232,7 +253,7 @@ angular.module("umbraco.directives")
|
|||||||
var throttledResizing = _.throttle(function(){
|
var throttledResizing = _.throttle(function(){
|
||||||
resizeImageToScale(scope.dimensions.scale.current);
|
resizeImageToScale(scope.dimensions.scale.current);
|
||||||
calculateCropBox();
|
calculateCropBox();
|
||||||
}, 16);
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
//happens when we change the scale
|
//happens when we change the scale
|
||||||
|
|||||||
+10
-10
@@ -14,8 +14,7 @@ angular.module("umbraco.directives")
|
|||||||
scope: {
|
scope: {
|
||||||
src: '=',
|
src: '=',
|
||||||
center: "=",
|
center: "=",
|
||||||
onImageLoaded: "&",
|
onImageLoaded: "&"
|
||||||
onGravityChanged: "&"
|
|
||||||
},
|
},
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ angular.module("umbraco.directives")
|
|||||||
var $overlay = element.find(".overlay");
|
var $overlay = element.find(".overlay");
|
||||||
|
|
||||||
scope.style = function () {
|
scope.style = function () {
|
||||||
if (scope.dimensions.width <= 0 || scope.dimensions.height <= 0) {
|
if (scope.dimensions.width <= 0) {
|
||||||
setDimensions();
|
setDimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +52,7 @@ angular.module("umbraco.directives")
|
|||||||
|
|
||||||
calculateGravity(offsetX, offsetY);
|
calculateGravity(offsetX, offsetY);
|
||||||
|
|
||||||
gravityChanged();
|
lazyEndEvent();
|
||||||
};
|
};
|
||||||
|
|
||||||
var setDimensions = function () {
|
var setDimensions = function () {
|
||||||
@@ -78,11 +77,12 @@ angular.module("umbraco.directives")
|
|||||||
scope.center.top = (scope.dimensions.top+10) / scope.dimensions.height;
|
scope.center.top = (scope.dimensions.top+10) / scope.dimensions.height;
|
||||||
};
|
};
|
||||||
|
|
||||||
var gravityChanged = function () {
|
var lazyEndEvent = _.debounce(function(){
|
||||||
if (angular.isFunction(scope.onGravityChanged)) {
|
scope.$apply(function(){
|
||||||
scope.onGravityChanged();
|
scope.$emit("imageFocalPointStop");
|
||||||
}
|
});
|
||||||
};
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
//Drag and drop positioning, using jquery ui draggable
|
//Drag and drop positioning, using jquery ui draggable
|
||||||
//TODO ensure that the point doesnt go outside the box
|
//TODO ensure that the point doesnt go outside the box
|
||||||
@@ -100,7 +100,7 @@ angular.module("umbraco.directives")
|
|||||||
calculateGravity(offsetX, offsetY);
|
calculateGravity(offsetX, offsetY);
|
||||||
});
|
});
|
||||||
|
|
||||||
gravityChanged();
|
lazyEndEvent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-5
@@ -266,11 +266,7 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
|
|||||||
treeService.syncTree({
|
treeService.syncTree({
|
||||||
node: treeNode,
|
node: treeNode,
|
||||||
path: path,
|
path: path,
|
||||||
forceReload: forceReload,
|
forceReload: forceReload
|
||||||
//when the tree node is expanding during sync tree, handle it and raise appropriate events
|
|
||||||
treeNodeExpanded: function (args) {
|
|
||||||
emitEvent("treeNodeExpanded", { tree: scope.tree, node: args.node, children: args.children });
|
|
||||||
}
|
|
||||||
}).then(function (data) {
|
}).then(function (data) {
|
||||||
|
|
||||||
if (activate === undefined || activate === true) {
|
if (activate === undefined || activate === true) {
|
||||||
|
|||||||
-7
@@ -12,7 +12,6 @@ function treeSearchBox(localizationService, searchService, $q) {
|
|||||||
searchFromName: "@",
|
searchFromName: "@",
|
||||||
showSearch: "@",
|
showSearch: "@",
|
||||||
section: "@",
|
section: "@",
|
||||||
datatypeId: "@",
|
|
||||||
hideSearchCallback: "=",
|
hideSearchCallback: "=",
|
||||||
searchCallback: "="
|
searchCallback: "="
|
||||||
},
|
},
|
||||||
@@ -35,7 +34,6 @@ function treeSearchBox(localizationService, searchService, $q) {
|
|||||||
scope.showSearch = "false";
|
scope.showSearch = "false";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//used to cancel any request in progress if another one needs to take it's place
|
//used to cancel any request in progress if another one needs to take it's place
|
||||||
var canceler = null;
|
var canceler = null;
|
||||||
|
|
||||||
@@ -62,11 +60,6 @@ function treeSearchBox(localizationService, searchService, $q) {
|
|||||||
searchArgs["searchFrom"] = scope.searchFromId;
|
searchArgs["searchFrom"] = scope.searchFromId;
|
||||||
}
|
}
|
||||||
|
|
||||||
//append dataTypeId value if there is one
|
|
||||||
if (scope.datatypeId) {
|
|
||||||
searchArgs["dataTypeId"] = scope.datatypeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
searcher(searchArgs).then(function (data) {
|
searcher(searchArgs).then(function (data) {
|
||||||
scope.searchCallback(data);
|
scope.searchCallback(data);
|
||||||
//set back to null so it can be re-created
|
//set back to null so it can be re-created
|
||||||
|
|||||||
+17
-17
@@ -86,21 +86,20 @@ angular.module("umbraco.directives")
|
|||||||
function generateAlias(value) {
|
function generateAlias(value) {
|
||||||
|
|
||||||
if (generateAliasTimeout) {
|
if (generateAliasTimeout) {
|
||||||
$timeout.cancel(generateAliasTimeout);
|
$timeout.cancel(generateAliasTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value !== undefined && value !== "" && value !== null) {
|
if( value !== undefined && value !== "" && value !== null) {
|
||||||
|
|
||||||
scope.alias = "";
|
scope.alias = "";
|
||||||
scope.placeholderText = scope.labels.busy;
|
scope.placeholderText = scope.labels.busy;
|
||||||
|
|
||||||
generateAliasTimeout = $timeout(function () {
|
generateAliasTimeout = $timeout(function () {
|
||||||
updateAlias = true;
|
updateAlias = true;
|
||||||
entityResource.getSafeAlias(encodeURIComponent(value), true).then(function (safeAlias) {
|
entityResource.getSafeAlias(encodeURIComponent(value), true).then(function (safeAlias) {
|
||||||
if (updateAlias) {
|
if (updateAlias) {
|
||||||
scope.alias = safeAlias.alias;
|
scope.alias = safeAlias.alias;
|
||||||
}
|
}
|
||||||
scope.placeholderText = scope.labels.idle;
|
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
@@ -109,6 +108,7 @@ angular.module("umbraco.directives")
|
|||||||
scope.alias = "";
|
scope.alias = "";
|
||||||
scope.placeholderText = scope.labels.idle;
|
scope.placeholderText = scope.labels.idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if alias gets unlocked - stop watching alias
|
// if alias gets unlocked - stop watching alias
|
||||||
@@ -119,17 +119,17 @@ angular.module("umbraco.directives")
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// validate custom entered alias
|
// validate custom entered alias
|
||||||
eventBindings.push(scope.$watch('alias', function (newValue, oldValue) {
|
eventBindings.push(scope.$watch('alias', function(newValue, oldValue){
|
||||||
if (scope.alias === "" || scope.alias === null || scope.alias === undefined) {
|
|
||||||
if (bindWatcher === true) {
|
if(scope.alias === "" && bindWatcher === true || scope.alias === null && bindWatcher === true) {
|
||||||
// add watcher
|
// add watcher
|
||||||
eventBindings.push(scope.$watch('aliasFrom', function (newValue, oldValue) {
|
eventBindings.push(scope.$watch('aliasFrom', function(newValue, oldValue) {
|
||||||
if (bindWatcher) {
|
if(bindWatcher) {
|
||||||
generateAlias(newValue);
|
generateAlias(newValue);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ Use this directive to generate color swatches to pick from.
|
|||||||
scope.selectedColor = color;
|
scope.selectedColor = color;
|
||||||
|
|
||||||
if (scope.onSelect) {
|
if (scope.onSelect) {
|
||||||
scope.onSelect({color: color });
|
scope.onSelect(color);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @name umbraco.resources.codefileResource
|
* @name umbraco.resources.codefileResource
|
||||||
* @description Loads in data for files that contain code such as js scripts, partial views and partial view macros
|
* @description Loads in data for files that contain code such as js scripts, partial views and partial view macros
|
||||||
**/
|
**/
|
||||||
function codefileResource($q, $http, umbDataFormatter, umbRequestHelper, localizationService) {
|
function codefileResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
@@ -106,16 +106,13 @@ function codefileResource($q, $http, umbDataFormatter, umbRequestHelper, localiz
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
deleteByPath: function (type, virtualpath) {
|
deleteByPath: function (type, virtualpath) {
|
||||||
|
|
||||||
var promise = localizationService.localize("codefile_deleteItemFailed", [virtualpath]);
|
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.post(
|
$http.post(
|
||||||
umbRequestHelper.getApiUrl(
|
umbRequestHelper.getApiUrl(
|
||||||
"codeFileApiBaseUrl",
|
"codeFileApiBaseUrl",
|
||||||
"Delete",
|
"Delete",
|
||||||
[{ type: type }, { virtualPath: virtualpath}])),
|
[{ type: type }, { virtualPath: virtualpath}])),
|
||||||
promise);
|
"Failed to delete item: " + virtualpath);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -239,19 +236,13 @@ function codefileResource($q, $http, umbDataFormatter, umbRequestHelper, localiz
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
createContainer: function (type, parentId, name) {
|
createContainer: function(type, parentId, name) {
|
||||||
|
|
||||||
// Is the parent ID numeric?
|
|
||||||
var key = "codefile_createFolderFailedBy" + (isNaN(parseInt(parentId)) ? "Name" : "Id");
|
|
||||||
|
|
||||||
var promise = localizationService.localize(key, [parentId]);
|
|
||||||
|
|
||||||
return umbRequestHelper.resourcePromise(
|
return umbRequestHelper.resourcePromise(
|
||||||
$http.post(umbRequestHelper.getApiUrl(
|
$http.post(umbRequestHelper.getApiUrl(
|
||||||
"codeFileApiBaseUrl",
|
"codeFileApiBaseUrl",
|
||||||
"PostCreateContainer",
|
"PostCreateContainer",
|
||||||
{ type: type, parentId: parentId, name: encodeURIComponent(name) })),
|
{ type: type, parentId: parentId, name: encodeURIComponent(name) })),
|
||||||
promise);
|
'Failed to create a folder under parent id ' + parentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user