Merge remote-tracking branch 'origin/v8/dev' into v8/feature/AB4550-segments-ui-variant-picker
This commit is contained in:
@@ -47,6 +47,8 @@ namespace Umbraco.Core.Composing.CompositionExtensions
|
||||
composition.RegisterUnique<IScriptRepository, ScriptRepository>();
|
||||
composition.RegisterUnique<IStylesheetRepository, StylesheetRepository>();
|
||||
composition.RegisterUnique<IContentTypeCommonRepository, ContentTypeCommonRepository>();
|
||||
composition.RegisterUnique<IInstallationRepository, InstallationRepository>();
|
||||
composition.RegisterUnique<IUpgradeCheckRepository, UpgradeCheckRepository>();
|
||||
|
||||
return composition;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
public class InstallLog
|
||||
{
|
||||
public Guid InstallId { get; }
|
||||
public bool IsUpgrade { get; set; }
|
||||
public bool InstallCompleted { get; set; }
|
||||
public DateTime Timestamp { get; set; }
|
||||
public int VersionMajor { get; }
|
||||
public int VersionMinor { get; }
|
||||
public int VersionPatch { get; }
|
||||
public string VersionComment { get; }
|
||||
public string Error { get; }
|
||||
public string UserAgent { get; }
|
||||
public string DbProvider { get; set; }
|
||||
|
||||
public InstallLog(Guid installId, bool isUpgrade, bool installCompleted, DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider)
|
||||
{
|
||||
InstallId = installId;
|
||||
IsUpgrade = isUpgrade;
|
||||
InstallCompleted = installCompleted;
|
||||
Timestamp = timestamp;
|
||||
VersionMajor = versionMajor;
|
||||
VersionMinor = versionMinor;
|
||||
VersionPatch = versionPatch;
|
||||
VersionComment = versionComment;
|
||||
Error = error;
|
||||
UserAgent = userAgent;
|
||||
DbProvider = dbProvider;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
public class UpgradeResult
|
||||
{
|
||||
public string UpgradeType { get; }
|
||||
public string Comment { get; }
|
||||
public string UpgradeUrl { get; }
|
||||
|
||||
public UpgradeResult(string upgradeType, string comment, string upgradeUrl)
|
||||
{
|
||||
UpgradeType = upgradeType;
|
||||
Comment = comment;
|
||||
UpgradeUrl = upgradeUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Repositories
|
||||
{
|
||||
public interface IInstallationRepository
|
||||
{
|
||||
Task SaveInstallLogAsync(InstallLog installLog);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Threading.Tasks;
|
||||
using Semver;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Repositories
|
||||
{
|
||||
public interface IUpgradeCheckRepository
|
||||
{
|
||||
Task<UpgradeResult> CheckUpgradeAsync(SemVersion version);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
{
|
||||
internal class InstallationRepository : IInstallationRepository
|
||||
{
|
||||
private static HttpClient _httpClient;
|
||||
private const string RestApiInstallUrl = "https://our.umbraco.com/umbraco/api/Installation/Install";
|
||||
|
||||
|
||||
public async Task SaveInstallLogAsync(InstallLog installLog)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_httpClient == null)
|
||||
_httpClient = new HttpClient();
|
||||
|
||||
await _httpClient.PostAsync(RestApiInstallUrl, installLog, new JsonMediaTypeFormatter());
|
||||
}
|
||||
// this occurs if the server for Our is down or cannot be reached
|
||||
catch (HttpRequestException)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Threading.Tasks;
|
||||
using Semver;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
{
|
||||
internal class UpgradeCheckRepository : IUpgradeCheckRepository
|
||||
{
|
||||
private static HttpClient _httpClient;
|
||||
private const string RestApiUpgradeChecklUrl = "https://our.umbraco.com/umbraco/api/UpgradeCheck/CheckUpgrade";
|
||||
|
||||
|
||||
public async Task<UpgradeResult> CheckUpgradeAsync(SemVersion version)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_httpClient == null)
|
||||
_httpClient = new HttpClient();
|
||||
|
||||
var task = await _httpClient.PostAsync(RestApiUpgradeChecklUrl, new CheckUpgradeDto(version), new JsonMediaTypeFormatter());
|
||||
var result = await task.Content.ReadAsAsync<UpgradeResult>();
|
||||
|
||||
return result ?? new UpgradeResult("None", "", "");
|
||||
}
|
||||
catch (HttpRequestException)
|
||||
{
|
||||
// this occurs if the server for Our is down or cannot be reached
|
||||
return new UpgradeResult("None", "", "");
|
||||
}
|
||||
}
|
||||
private class CheckUpgradeDto
|
||||
{
|
||||
public CheckUpgradeDto(SemVersion version)
|
||||
{
|
||||
VersionMajor = version.Major;
|
||||
VersionMinor = version.Minor;
|
||||
VersionPatch = version.Patch;
|
||||
VersionComment = version.Prerelease;
|
||||
}
|
||||
|
||||
public int VersionMajor { get; }
|
||||
public int VersionMinor { get; }
|
||||
public int VersionPatch { get; }
|
||||
public string VersionComment { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.PropertyEditors.Validators;
|
||||
using Umbraco.Core.Scoping;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Core.Sync;
|
||||
using IntegerValidator = Umbraco.Core.PropertyEditors.Validators.IntegerValidator;
|
||||
@@ -129,6 +130,10 @@ namespace Umbraco.Core.Runtime
|
||||
|
||||
// by default, register a noop rebuilder
|
||||
composition.RegisterUnique<IPublishedSnapshotRebuilder, PublishedSnapshotRebuilder>();
|
||||
|
||||
// will be injected in controllers when needed to invoke rest endpoints on Our
|
||||
composition.RegisterUnique<IInstallationService, InstallationService>();
|
||||
composition.RegisterUnique<IUpgradeService, UpgradeService>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.Services
|
||||
{
|
||||
public interface IInstallationService
|
||||
{
|
||||
Task LogInstall(InstallLog installLog);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Threading.Tasks;
|
||||
using Semver;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
namespace Umbraco.Core.Services
|
||||
{
|
||||
public interface IUpgradeService
|
||||
{
|
||||
Task<UpgradeResult> CheckUpgrade(SemVersion version);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
|
||||
namespace Umbraco.Core.Services.Implement
|
||||
{
|
||||
public class InstallationService : IInstallationService
|
||||
{
|
||||
private readonly IInstallationRepository _installationRepository;
|
||||
|
||||
public InstallationService(IInstallationRepository installationRepository)
|
||||
{
|
||||
_installationRepository = installationRepository;
|
||||
}
|
||||
|
||||
public async Task LogInstall(InstallLog installLog)
|
||||
{
|
||||
await _installationRepository.SaveInstallLogAsync(installLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,12 +131,21 @@
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\ContentTypeDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyDataDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyTypeDto80.cs" />
|
||||
<Compile Include="Models\InstallLog.cs" />
|
||||
<Compile Include="Persistence\Repositories\IInstallationRepository.cs" />
|
||||
<Compile Include="Persistence\Repositories\Implement\InstallationRepository.cs" />
|
||||
<Compile Include="Services\Implement\InstallationService.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_6_0\AddMainDomLock.cs" />
|
||||
<Compile Include="Models\UpgradeResult.cs" />
|
||||
<Compile Include="Persistence\Repositories\Implement\UpgradeCheckRepository.cs" />
|
||||
<Compile Include="Persistence\Repositories\IUpgradeCheckRepository.cs" />
|
||||
<Compile Include="Runtime\IMainDomLock.cs" />
|
||||
<Compile Include="Runtime\MainDomSemaphoreLock.cs" />
|
||||
<Compile Include="Runtime\SqlMainDomLock.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_6_0\MissingContentVersionsIndexes.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_7_0\MissingDictionaryIndex.cs" />
|
||||
<Compile Include="Services\IInstallationService.cs" />
|
||||
<Compile Include="Services\IUpgradeService.cs" />
|
||||
<Compile Include="SystemLock.cs" />
|
||||
<Compile Include="Attempt.cs" />
|
||||
<Compile Include="AttemptOfTResult.cs" />
|
||||
@@ -1552,6 +1561,7 @@
|
||||
<Compile Include="UdiType.cs" />
|
||||
<Compile Include="UdiTypeConverter.cs" />
|
||||
<Compile Include="UpgradeableReadLock.cs" />
|
||||
<Compile Include="UpgradeService.cs" />
|
||||
<Compile Include="UriExtensions.cs" />
|
||||
<Compile Include="VersionExtensions.cs" />
|
||||
<Compile Include="WaitHandleExtensions.cs" />
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Threading.Tasks;
|
||||
using Semver;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
internal class UpgradeService : IUpgradeService
|
||||
{
|
||||
private readonly IUpgradeCheckRepository _upgradeCheckRepository;
|
||||
|
||||
public UpgradeService(IUpgradeCheckRepository upgradeCheckRepository)
|
||||
{
|
||||
_upgradeCheckRepository = upgradeCheckRepository;
|
||||
}
|
||||
|
||||
public async Task<UpgradeResult> CheckUpgrade(SemVersion version)
|
||||
{
|
||||
return await _upgradeCheckRepository.CheckUpgradeAsync(version);
|
||||
}
|
||||
}
|
||||
}
|
||||
+162
-260
File diff suppressed because it is too large
Load Diff
@@ -2,11 +2,14 @@
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http.Filters;
|
||||
using Semver;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Models;
|
||||
using Umbraco.Web.Mvc;
|
||||
|
||||
@@ -15,8 +18,17 @@ namespace Umbraco.Web.Editors
|
||||
[PluginController("UmbracoApi")]
|
||||
public class UpdateCheckController : UmbracoAuthorizedJsonController
|
||||
{
|
||||
private readonly IUpgradeService _upgradeService;
|
||||
|
||||
public UpdateCheckController() { }
|
||||
|
||||
public UpdateCheckController(IUpgradeService upgradeService)
|
||||
{
|
||||
_upgradeService = upgradeService;
|
||||
}
|
||||
|
||||
[UpdateCheckResponseFilter]
|
||||
public UpgradeCheckResponse GetCheck()
|
||||
public async Task<UpgradeCheckResponse> GetCheck()
|
||||
{
|
||||
var updChkCookie = Request.Headers.GetCookies("UMB_UPDCHK").FirstOrDefault();
|
||||
var updateCheckCookie = updChkCookie != null ? updChkCookie["UMB_UPDCHK"].Value : "";
|
||||
@@ -24,14 +36,11 @@ namespace Umbraco.Web.Editors
|
||||
{
|
||||
try
|
||||
{
|
||||
var check = new org.umbraco.update.CheckForUpgrade { Timeout = 2000 };
|
||||
var version = new SemVersion(UmbracoVersion.Current.Major, UmbracoVersion.Current.Minor,
|
||||
UmbracoVersion.Current.Build, UmbracoVersion.Comment);
|
||||
var result = await _upgradeService.CheckUpgrade(version);
|
||||
|
||||
var result = check.CheckUpgrade(UmbracoVersion.Current.Major,
|
||||
UmbracoVersion.Current.Minor,
|
||||
UmbracoVersion.Current.Build,
|
||||
UmbracoVersion.Comment);
|
||||
|
||||
return new UpgradeCheckResponse(result.UpgradeType.ToString(), result.Comment, result.UpgradeUrl);
|
||||
return new UpgradeCheckResponse(result.UpgradeType, result.Comment, result.UpgradeUrl);
|
||||
}
|
||||
catch (System.Net.WebException)
|
||||
{
|
||||
|
||||
@@ -4,14 +4,17 @@ using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Migrations.Install;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Install.Models;
|
||||
|
||||
@@ -24,16 +27,18 @@ namespace Umbraco.Web.Install
|
||||
private readonly HttpContextBase _httpContext;
|
||||
private readonly ILogger _logger;
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
private readonly IInstallationService _installationService;
|
||||
private InstallationType? _installationType;
|
||||
|
||||
public InstallHelper(IUmbracoContextAccessor umbracoContextAccessor,
|
||||
DatabaseBuilder databaseBuilder,
|
||||
ILogger logger, IGlobalSettings globalSettings)
|
||||
ILogger logger, IGlobalSettings globalSettings, IInstallationService installationService)
|
||||
{
|
||||
_httpContext = umbracoContextAccessor.UmbracoContext.HttpContext;
|
||||
_logger = logger;
|
||||
_globalSettings = globalSettings;
|
||||
_databaseBuilder = databaseBuilder;
|
||||
_installationService = installationService;
|
||||
}
|
||||
|
||||
public InstallationType GetInstallationType()
|
||||
@@ -41,7 +46,7 @@ namespace Umbraco.Web.Install
|
||||
return _installationType ?? (_installationType = IsBrandNewInstall ? InstallationType.NewInstall : InstallationType.Upgrade).Value;
|
||||
}
|
||||
|
||||
internal void InstallStatus(bool isCompleted, string errorMsg)
|
||||
internal async Task InstallStatus(bool isCompleted, string errorMsg)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -59,8 +64,12 @@ namespace Umbraco.Web.Install
|
||||
if (installId == Guid.Empty)
|
||||
installId = Guid.NewGuid();
|
||||
}
|
||||
else
|
||||
{
|
||||
installId = Guid.NewGuid(); // Guid.TryParse will have reset installId to Guid.Empty
|
||||
}
|
||||
}
|
||||
_httpContext.Response.Cookies.Set(new HttpCookie(Constants.Web.InstallerCookieName, "1"));
|
||||
_httpContext.Response.Cookies.Set(new HttpCookie(Constants.Web.InstallerCookieName, installId.ToString()));
|
||||
|
||||
var dbProvider = string.Empty;
|
||||
if (IsBrandNewInstall == false)
|
||||
@@ -70,18 +79,13 @@ namespace Umbraco.Web.Install
|
||||
dbProvider = GetDbProviderString(Current.SqlContext);
|
||||
}
|
||||
|
||||
var check = new org.umbraco.update.CheckForUpgrade();
|
||||
check.Install(installId,
|
||||
IsBrandNewInstall == false,
|
||||
isCompleted,
|
||||
DateTime.Now,
|
||||
UmbracoVersion.Current.Major,
|
||||
UmbracoVersion.Current.Minor,
|
||||
UmbracoVersion.Current.Build,
|
||||
UmbracoVersion.Comment,
|
||||
errorMsg,
|
||||
userAgent,
|
||||
dbProvider);
|
||||
var installLog = new InstallLog(installId: installId, isUpgrade: IsBrandNewInstall == false,
|
||||
installCompleted: isCompleted, timestamp: DateTime.Now, versionMajor: UmbracoVersion.Current.Major,
|
||||
versionMinor: UmbracoVersion.Current.Minor, versionPatch: UmbracoVersion.Current.Build,
|
||||
versionComment: UmbracoVersion.Comment, error: errorMsg, userAgent: userAgent,
|
||||
dbProvider: dbProvider);
|
||||
|
||||
await _installationService.LogInstall(installLog);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -1187,11 +1187,6 @@
|
||||
<Compile Include="UmbracoContext.cs" />
|
||||
<Compile Include="UmbracoInjectedModule.cs" />
|
||||
<Compile Include="UriUtility.cs" />
|
||||
<Compile Include="Web References\org.umbraco.update\Reference.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UmbracoAuthorizedHttpHandler.cs" />
|
||||
<Compile Include="UmbracoHttpHandler.cs" />
|
||||
<Compile Include="UmbracoWebService.cs">
|
||||
@@ -1215,9 +1210,6 @@
|
||||
<EmbeddedResource Include="JavaScript\JsInitialize.js" />
|
||||
<EmbeddedResource Include="JavaScript\ServerVariables.js" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferences Include="Web References\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="JavaScript\PreviewInitialize.js" />
|
||||
<None Include="JavaScript\TinyMceInitialize.js" />
|
||||
@@ -1225,22 +1217,9 @@
|
||||
<None Include="PublishedCache\NuCache\readme.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Web References\org.umbraco.update\checkforupgrade.disco" />
|
||||
<None Include="Web References\org.umbraco.update\checkforupgrade.wsdl" />
|
||||
<None Include="Web References\org.umbraco.update\Reference.map">
|
||||
<Generator>MSDiscoCodeGenerator</Generator>
|
||||
<LastGenOutput>Reference.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="..\Umbraco.Web.UI\Views\web.config">
|
||||
<Link>Mvc\web.config</Link>
|
||||
</None>
|
||||
<None Include="Web References\org.umbraco.update\UpgradeResult.datasource">
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web References\org.umbraco.update\UpgradeResult1.datasource">
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
||||
@@ -1,286 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.42000.
|
||||
//
|
||||
#pragma warning disable 1591
|
||||
|
||||
namespace Umbraco.Web.org.umbraco.update {
|
||||
using System;
|
||||
using System.Web.Services;
|
||||
using System.Diagnostics;
|
||||
using System.Web.Services.Protocols;
|
||||
using System.Xml.Serialization;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3062.0")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Web.Services.WebServiceBindingAttribute(Name="CheckForUpgradeSoap", Namespace="http://update.umbraco.org/")]
|
||||
public partial class CheckForUpgrade : System.Web.Services.Protocols.SoapHttpClientProtocol {
|
||||
|
||||
private System.Threading.SendOrPostCallback InstallOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback CheckUpgradeOperationCompleted;
|
||||
|
||||
private bool useDefaultCredentialsSetExplicitly;
|
||||
|
||||
/// <remarks/>
|
||||
public CheckForUpgrade() {
|
||||
this.Url = "http://update.umbraco.org/checkforupgrade.asmx";
|
||||
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
|
||||
this.UseDefaultCredentials = true;
|
||||
this.useDefaultCredentialsSetExplicitly = false;
|
||||
}
|
||||
else {
|
||||
this.useDefaultCredentialsSetExplicitly = true;
|
||||
}
|
||||
}
|
||||
|
||||
public new string Url {
|
||||
get {
|
||||
return base.Url;
|
||||
}
|
||||
set {
|
||||
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
|
||||
&& (this.useDefaultCredentialsSetExplicitly == false))
|
||||
&& (this.IsLocalFileSystemWebService(value) == false))) {
|
||||
base.UseDefaultCredentials = false;
|
||||
}
|
||||
base.Url = value;
|
||||
}
|
||||
}
|
||||
|
||||
public new bool UseDefaultCredentials {
|
||||
get {
|
||||
return base.UseDefaultCredentials;
|
||||
}
|
||||
set {
|
||||
base.UseDefaultCredentials = value;
|
||||
this.useDefaultCredentialsSetExplicitly = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public event InstallCompletedEventHandler InstallCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event CheckUpgradeCompletedEventHandler CheckUpgradeCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://update.umbraco.org/Install", RequestNamespace="http://update.umbraco.org/", ResponseNamespace="http://update.umbraco.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void Install(System.Guid installId, bool isUpgrade, bool installCompleted, System.DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider) {
|
||||
this.Invoke("Install", new object[] {
|
||||
installId,
|
||||
isUpgrade,
|
||||
installCompleted,
|
||||
timestamp,
|
||||
versionMajor,
|
||||
versionMinor,
|
||||
versionPatch,
|
||||
versionComment,
|
||||
error,
|
||||
userAgent,
|
||||
dbProvider});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InstallAsync(System.Guid installId, bool isUpgrade, bool installCompleted, System.DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider) {
|
||||
this.InstallAsync(installId, isUpgrade, installCompleted, timestamp, versionMajor, versionMinor, versionPatch, versionComment, error, userAgent, dbProvider, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InstallAsync(System.Guid installId, bool isUpgrade, bool installCompleted, System.DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider, object userState) {
|
||||
if ((this.InstallOperationCompleted == null)) {
|
||||
this.InstallOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("Install", new object[] {
|
||||
installId,
|
||||
isUpgrade,
|
||||
installCompleted,
|
||||
timestamp,
|
||||
versionMajor,
|
||||
versionMinor,
|
||||
versionPatch,
|
||||
versionComment,
|
||||
error,
|
||||
userAgent,
|
||||
dbProvider}, this.InstallOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnInstallOperationCompleted(object arg) {
|
||||
if ((this.InstallCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.InstallCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://update.umbraco.org/CheckUpgrade", RequestNamespace="http://update.umbraco.org/", ResponseNamespace="http://update.umbraco.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public UpgradeResult CheckUpgrade(int versionMajor, int versionMinor, int versionPatch, string versionComment) {
|
||||
object[] results = this.Invoke("CheckUpgrade", new object[] {
|
||||
versionMajor,
|
||||
versionMinor,
|
||||
versionPatch,
|
||||
versionComment});
|
||||
return ((UpgradeResult)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckUpgradeAsync(int versionMajor, int versionMinor, int versionPatch, string versionComment) {
|
||||
this.CheckUpgradeAsync(versionMajor, versionMinor, versionPatch, versionComment, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckUpgradeAsync(int versionMajor, int versionMinor, int versionPatch, string versionComment, object userState) {
|
||||
if ((this.CheckUpgradeOperationCompleted == null)) {
|
||||
this.CheckUpgradeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckUpgradeOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("CheckUpgrade", new object[] {
|
||||
versionMajor,
|
||||
versionMinor,
|
||||
versionPatch,
|
||||
versionComment}, this.CheckUpgradeOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnCheckUpgradeOperationCompleted(object arg) {
|
||||
if ((this.CheckUpgradeCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.CheckUpgradeCompleted(this, new CheckUpgradeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
}
|
||||
|
||||
private bool IsLocalFileSystemWebService(string url) {
|
||||
if (((url == null)
|
||||
|| (url == string.Empty))) {
|
||||
return false;
|
||||
}
|
||||
System.Uri wsUri = new System.Uri(url);
|
||||
if (((wsUri.Port >= 1024)
|
||||
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3062.0")]
|
||||
[System.SerializableAttribute()]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://update.umbraco.org/")]
|
||||
public partial class UpgradeResult {
|
||||
|
||||
private string commentField;
|
||||
|
||||
private UpgradeType upgradeTypeField;
|
||||
|
||||
private string upgradeUrlField;
|
||||
|
||||
/// <remarks/>
|
||||
public string Comment {
|
||||
get {
|
||||
return this.commentField;
|
||||
}
|
||||
set {
|
||||
this.commentField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public UpgradeType UpgradeType {
|
||||
get {
|
||||
return this.upgradeTypeField;
|
||||
}
|
||||
set {
|
||||
this.upgradeTypeField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string UpgradeUrl {
|
||||
get {
|
||||
return this.upgradeUrlField;
|
||||
}
|
||||
set {
|
||||
this.upgradeUrlField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3062.0")]
|
||||
[System.SerializableAttribute()]
|
||||
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://update.umbraco.org/")]
|
||||
public enum UpgradeType {
|
||||
|
||||
/// <remarks/>
|
||||
None,
|
||||
|
||||
/// <remarks/>
|
||||
Patch,
|
||||
|
||||
/// <remarks/>
|
||||
Minor,
|
||||
|
||||
/// <remarks/>
|
||||
Major,
|
||||
|
||||
/// <remarks/>
|
||||
Critical,
|
||||
|
||||
/// <remarks/>
|
||||
Error,
|
||||
|
||||
/// <remarks/>
|
||||
OutOfSync,
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3062.0")]
|
||||
public delegate void InstallCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3062.0")]
|
||||
public delegate void CheckUpgradeCompletedEventHandler(object sender, CheckUpgradeCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3062.0")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class CheckUpgradeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal CheckUpgradeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public UpgradeResult Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((UpgradeResult)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Results>
|
||||
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://update.umbraco.org/checkforupgrade.asmx?wsdl" filename="checkforupgrade.wsdl" />
|
||||
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://update.umbraco.org/checkforupgrade.asmx?disco" filename="checkforupgrade.disco" />
|
||||
</Results>
|
||||
</DiscoveryClientResultsFile>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is automatically generated by Visual Studio .Net. It is
|
||||
used to store generic object data source configuration information.
|
||||
Renaming the file extension or editing the content of this file may
|
||||
cause the file to be unrecognizable by the program.
|
||||
-->
|
||||
<GenericObjectDataSource DisplayName="UpgradeResult" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TypeInfo>umbraco.presentation.org.umbraco.update.UpgradeResult, Web References.org.umbraco.update.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||
</GenericObjectDataSource>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
|
||||
<contractRef ref="http://update.umbraco.org/checkforupgrade.asmx?wsdl" docRef="http://update.umbraco.org/checkforupgrade.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
|
||||
<soap address="http://update.umbraco.org/checkforupgrade.asmx" xmlns:q1="http://update.umbraco.org/" binding="q1:CheckForUpgradeSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
|
||||
<soap address="http://update.umbraco.org/checkforupgrade.asmx" xmlns:q2="http://update.umbraco.org/" binding="q2:CheckForUpgradeSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
|
||||
</discovery>
|
||||
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://update.umbraco.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://update.umbraco.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
<wsdl:types>
|
||||
<s:schema elementFormDefault="qualified" targetNamespace="http://update.umbraco.org/">
|
||||
<s:import namespace="http://microsoft.com/wsdl/types/" />
|
||||
<s:element name="Install">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="1" maxOccurs="1" name="installId" type="s1:guid" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="isUpgrade" type="s:boolean" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="installCompleted" type="s:boolean" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="timestamp" type="s:dateTime" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="versionMajor" type="s:int" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="versionMinor" type="s:int" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="versionPatch" type="s:int" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="versionComment" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="error" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="userAgent" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="dbProvider" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="InstallResponse">
|
||||
<s:complexType />
|
||||
</s:element>
|
||||
<s:element name="CheckUpgrade">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="1" maxOccurs="1" name="versionMajor" type="s:int" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="versionMinor" type="s:int" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="versionPatch" type="s:int" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="versionComment" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="CheckUpgradeResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="CheckUpgradeResult" type="tns:UpgradeResult" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:complexType name="UpgradeResult">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Comment" type="s:string" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="UpgradeType" type="tns:UpgradeType" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="UpgradeUrl" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
<s:simpleType name="UpgradeType">
|
||||
<s:restriction base="s:string">
|
||||
<s:enumeration value="None" />
|
||||
<s:enumeration value="Patch" />
|
||||
<s:enumeration value="Minor" />
|
||||
<s:enumeration value="Major" />
|
||||
<s:enumeration value="Critical" />
|
||||
<s:enumeration value="Error" />
|
||||
<s:enumeration value="OutOfSync" />
|
||||
</s:restriction>
|
||||
</s:simpleType>
|
||||
</s:schema>
|
||||
<s:schema elementFormDefault="qualified" targetNamespace="http://microsoft.com/wsdl/types/">
|
||||
<s:simpleType name="guid">
|
||||
<s:restriction base="s:string">
|
||||
<s:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" />
|
||||
</s:restriction>
|
||||
</s:simpleType>
|
||||
</s:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="InstallSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:Install" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="InstallSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:InstallResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="CheckUpgradeSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:CheckUpgrade" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="CheckUpgradeSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:CheckUpgradeResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="CheckForUpgradeSoap">
|
||||
<wsdl:operation name="Install">
|
||||
<wsdl:input message="tns:InstallSoapIn" />
|
||||
<wsdl:output message="tns:InstallSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="CheckUpgrade">
|
||||
<wsdl:input message="tns:CheckUpgradeSoapIn" />
|
||||
<wsdl:output message="tns:CheckUpgradeSoapOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="CheckForUpgradeSoap" type="tns:CheckForUpgradeSoap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="Install">
|
||||
<soap:operation soapAction="http://update.umbraco.org/Install" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="CheckUpgrade">
|
||||
<soap:operation soapAction="http://update.umbraco.org/CheckUpgrade" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="CheckForUpgradeSoap12" type="tns:CheckForUpgradeSoap">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="Install">
|
||||
<soap12:operation soapAction="http://update.umbraco.org/Install" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="CheckUpgrade">
|
||||
<soap12:operation soapAction="http://update.umbraco.org/CheckUpgrade" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="CheckForUpgrade">
|
||||
<wsdl:port name="CheckForUpgradeSoap" binding="tns:CheckForUpgradeSoap">
|
||||
<soap:address location="http://update.umbraco.org/checkforupgrade.asmx" />
|
||||
</wsdl:port>
|
||||
<wsdl:port name="CheckForUpgradeSoap12" binding="tns:CheckForUpgradeSoap12">
|
||||
<soap12:address location="http://update.umbraco.org/checkforupgrade.asmx" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
Reference in New Issue
Block a user