protected virtual bool GetChanges(CloudRuntimePackage package, out Dictionary <string, string> changes) { changes = new Dictionary <string, string>(); changes[Resources.RuntimeTypeKey] = package.Runtime.ToString().ToLower(); changes[Resources.RuntimeUrlKey] = package.PackageUri.ToString(); return(true); }
public virtual void ApplyRuntime(CloudRuntimePackage package, WorkerRole workerRole) { Dictionary <string, string> changes; if (this.GetChanges(package, out changes)) { ApplyRoleXmlChanges(changes, workerRole); } ApplyScaffoldingChanges(package); }
/// <summary> /// Create a cloud runtime application, essentialy this is a tuple of runtime X package X role /// </summary> /// <param name="cloudRuntime">The runtime in the tuple</param> /// <param name="cloudRuntimePackage">The package in the tuple</param> /// <param name="role">The role to apply the package to</param> /// <returns>The tuple, use the apply method to apply the runtime as specified</returns> public static CloudRuntimeApplicator CreateCloudRuntimeApplicator(CloudRuntime cloudRuntime, CloudRuntimePackage cloudRuntimePackage, WorkerRole role) { CloudRuntimeApplicator applicator = new CloudRuntimeApplicator { Runtime = cloudRuntime, Package = cloudRuntimePackage, WorkerRole = role }; return applicator; }
public virtual bool ValidateMatch(CloudRuntimePackage runtime, out string warningText) { warningText = null; bool result = this.Match(runtime); if (!result) { warningText = this.GenerateWarningText(runtime); } return(result); }
/// <summary> /// Create a cloud runtime application, essentialy this is a tuple of runtime X package X role /// </summary> /// <param name="cloudRuntime">The runtime in the tuple</param> /// <param name="cloudRuntimePackage">The package in the tuple</param> /// <param name="role">The role to apply the package to</param> /// <returns>The tuple, use the apply method to apply the runtime as specified</returns> public static CloudRuntimeApplicator CreateCloudRuntimeApplicator(CloudRuntime cloudRuntime, CloudRuntimePackage cloudRuntimePackage, WorkerRole role) { CloudRuntimeApplicator applicator = new CloudRuntimeApplicator { Runtime = cloudRuntime, Package = cloudRuntimePackage, WorkerRole = role }; return(applicator); }
public virtual bool ValidateMatch(CloudRuntimePackage runtime, out string warningText) { warningText = null; bool result = this.Match(runtime); if (!result) { warningText = this.GenerateWarningText(runtime); } return result; }
protected override bool GetChanges(CloudRuntimePackage package, out Dictionary <string, string> changes) { changes = null; return(false); }
public virtual void ApplyRuntime(CloudRuntimePackage package, WorkerRole workerRole) { Dictionary<string, string> changes; if (this.GetChanges(package, out changes)) { ApplyRoleXmlChanges(changes, workerRole); } ApplyScaffoldingChanges(package); }
protected abstract string GenerateWarningText(CloudRuntimePackage package);
public override bool Match(CloudRuntimePackage runtime) { return(true); }
public abstract bool Match(CloudRuntimePackage runtime);
protected override string GenerateWarningText(CloudRuntimePackage package) { return null; }
protected override bool GetChanges(CloudRuntimePackage package, out Dictionary<string, string> changes) { changes = null; return false; }
public override bool Match(CloudRuntimePackage runtime) { return true; }
protected override bool GetChanges(CloudRuntimePackage package, out Dictionary<string, string> changes) { base.GetChanges(package, out changes); Debug.Assert(changes.ContainsKey(Resources.RuntimeTypeKey), "Cache runtime should be added before calling this method"); Debug.Assert(changes.ContainsKey(Resources.RuntimeUrlKey), "Cache runtime should be added before calling this method"); changes[Resources.CacheRuntimeVersionKey] = package.Version; return true; }
protected virtual bool GetChanges(CloudRuntimePackage package, out Dictionary<string, string> changes) { changes = new Dictionary<string, string>(); changes[Resources.RuntimeTypeKey] = package.Runtime.ToString().ToLower(); changes[Resources.RuntimeUrlKey] = package.PackageUri.ToString(); return true; }
public override bool Match(CloudRuntimePackage runtime) { // here is where we would put in semver semantics return(string.Equals(this.Version, runtime.Version, StringComparison.OrdinalIgnoreCase)); }
protected abstract void ApplyScaffoldingChanges(CloudRuntimePackage package);
public override bool Match(CloudRuntimePackage runtime) { return(this.Version.Equals(runtime.Version, StringComparison.OrdinalIgnoreCase)); }
public override bool Match(CloudRuntimePackage runtime) { return this.Version.Equals(runtime.Version, StringComparison.OrdinalIgnoreCase); }
protected virtual void ApplyScaffoldingChanges(CloudRuntimePackage package) { }
protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) { }
protected override string GenerateWarningText(CloudRuntimePackage package) { return string.Format(Resources.PHPVersionWarningText, package.Version, this.RoleName, this.Version); }
protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) { JavaScriptPackageHelpers.EnsurePackageJsonExists(this.FilePath, this.RoleName); JavaScriptPackageHelpers.TrySetEngineVersion(this.FilePath, GetEngineKey(), package.Version); }
protected override bool GetChanges(CloudRuntimePackage package, out Dictionary<string, string> changes) { bool succeed = base.GetChanges(package, out changes); changes[Resources.RuntimeVersionPrimaryKey] = package.Version; return succeed; }
protected override string GenerateWarningText(CloudRuntimePackage package) { return(string.Format(Resources.PHPVersionWarningText, package.Version, this.RoleName, this.Version)); }
public override bool Match(CloudRuntimePackage runtime) { // here is where we would put in semver semantics return string.Equals(this.Version, runtime.Version, StringComparison.OrdinalIgnoreCase); }
protected override string GenerateWarningText(CloudRuntimePackage package) { return(null); }