Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornosami <jasonimison@gmail.com>2018-09-27 20:35:11 +0300
committernosami <jasonimison@gmail.com>2018-09-27 20:35:11 +0300
commitd0ae65d437c826d8482c942da6bd610623442ce3 (patch)
tree7efcd5dec1080d395fd541c87874b82a4a89a925 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater
parent9150c7f1605a5802ab51926234dc98290282ac49 (diff)
Feedback fixes
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateInfo.cs24
1 files changed, 13 insertions, 11 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateInfo.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateInfo.cs
index e851c9ca76..85011edc37 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateInfo.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateInfo.cs
@@ -33,12 +33,17 @@ namespace MonoDevelop.Ide.Updater
{
}
+ public string File { get; }
+ public string AppId { get; }
+ public long VersionId { get; }
+ public string SourceUrl { get; }
+
public UpdateInfo (string file, string appId, long versionId, string sourceUrl)
{
- this.File = file;
- this.AppId = appId;
- this.VersionId = versionId;
- this.SourceUrl = sourceUrl;
+ SourceUrl = sourceUrl;
+ VersionId = versionId;
+ AppId = appId;
+ File = file;
}
public UpdateInfo (string appId, Version version)
@@ -51,10 +56,7 @@ namespace MonoDevelop.Ide.Updater
{
}
- public readonly string File;
- public readonly string AppId;
- public readonly long VersionId;
- public readonly string SourceUrl;
+ const string sourceUrl = "source-url:";
public static UpdateInfo FromFile (string fileName)
{
@@ -64,9 +66,9 @@ namespace MonoDevelop.Ide.Updater
string url = null;
s = f.ReadLine ();
if (s != null) {
- if (s.StartsWith ("source-url:"))
- url = s.Substring (11).Trim ();
-
+ if (s.StartsWith (sourceUrl)) {
+ url = s.Substring (sourceUrl.Length).Trim ();
+ }
}
return new UpdateInfo (fileName, parts [0], long.Parse (parts [1]), url);//, xamarinProduct);
}