diff options
author | Ungureanu Marius <teromario@yahoo.com> | 2014-04-04 18:42:41 +0400 |
---|---|---|
committer | Ungureanu Marius <teromario@yahoo.com> | 2014-04-04 18:42:41 +0400 |
commit | f84378eb63e275c0e84a9b0ef839a6db1f375ae2 (patch) | |
tree | f1feceb9910070c2c2b053ebd436cb84e211101c /main/src/core/MonoDevelop.Core | |
parent | 78556a5e0a71f60ada8baf3d68569dac3ea52b9b (diff) | |
parent | e55274880e9cc665b3a507dc18b5a2686a5bfc03 (diff) |
Merge pull request #26 from xamarin/vcsAPI
Obsolete API removal
Diffstat (limited to 'main/src/core/MonoDevelop.Core')
13 files changed, 7 insertions, 92 deletions
diff --git a/main/src/core/MonoDevelop.Core/Mono.Options.cs b/main/src/core/MonoDevelop.Core/Mono.Options.cs index b22bd87af8..bd3830d661 100644 --- a/main/src/core/MonoDevelop.Core/Mono.Options.cs +++ b/main/src/core/MonoDevelop.Core/Mono.Options.cs @@ -529,19 +529,6 @@ namespace Mono.Options throw new InvalidOperationException ("Option has no names!"); } - [Obsolete ("Use KeyedCollection.this[string]")] - protected Option GetOptionForName (string option) - { - if (option == null) - throw new ArgumentNullException ("option"); - try { - return base [option]; - } - catch (KeyNotFoundException) { - return null; - } - } - protected override void InsertItem (int index, Option item) { base.InsertItem (index, item); diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs index 4549c2be51..cfdd618d69 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs @@ -164,12 +164,6 @@ namespace MonoDevelop.Core.Assemblies return profile == pattern; } - [Obsolete ("Use CanReferenceAssembliesTargetingFramework() instead")] - public bool IsCompatibleWithFramework (TargetFrameworkMoniker fxId) - { - return CanReferenceAssembliesTargetingFramework (fxId); - } - public bool CanReferenceAssembliesTargetingFramework (TargetFrameworkMoniker fxId) { var fx = Runtime.SystemAssemblyService.GetTargetFramework (fxId); diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs index 6ff3108947..240cb8913c 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs @@ -129,22 +129,9 @@ namespace MonoDevelop.Core.FileSystem public virtual void RequestFileEdit (IEnumerable<FilePath> files) { -#pragma warning disable 618 - foreach (var f in files) { - if (!RequestFileEdit (f)) - throw new UserException (GettextCatalog.GetString ("File '{0}' can't be modified", f.FileName)); - } -#pragma warning restore 618 - foreach (var fg in files.GroupBy (f => GetNextForPath (f, false))) fg.Key.RequestFileEdit (fg); } - - [Obsolete ("This will be removed. Override RequestFileEdit (IEnumerable<FilePath>) instead")] - public virtual bool RequestFileEdit (FilePath file) - { - return true; - } public virtual void NotifyFilesChanged (IEnumerable<FilePath> files) { diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs index f71406d752..200da70bab 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs @@ -240,16 +240,11 @@ namespace MonoDevelop.Core }
}
- [Obsolete ("Replaced by RequestFileEdit(fileName,throwIfFails)")]
- public static bool RequestFileEdit (string fileName)
- {
- return RequestFileEdit (fileName, false);
- }
-
/// <summary>
/// Requests permission for modifying a file
/// </summary>
/// <param name="fileName">The file to be modified</param>
+ /// <param name="throwIfFails">If set to false, it will catch the exception that would've been thrown.</param>
/// <remarks>This method must be called before trying to write any file. It throws an exception if permission is not granted.</remarks>
public static bool RequestFileEdit (FilePath fileName, bool throwIfFails = true)
{
@@ -584,16 +579,6 @@ namespace MonoDevelop.Core }
/// <summary>
- /// Creates a directory if it does not already exist.
- /// </summary>
- [Obsolete("Use Directory.CreateDirectory")]
- public static void EnsureDirectoryExists (string directory)
- {
- if (!Directory.Exists (directory))
- Directory.CreateDirectory (directory);
- }
-
- /// <summary>
/// Makes the path separators native.
/// </summary>
public static string MakePathSeparatorsNative (string path)
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs index 1a1fe87cf2..85851dd004 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs @@ -126,11 +126,6 @@ namespace MonoDevelop.Core set { PropertyService.Set (ReportUsageKey, value); } } - [Obsolete ("Use CreateLogFile")] - public static DateTime LogTimestamp { - get { return timestamp; } - } - /// <summary> /// Creates a session log file with the given identifier. /// </summary> diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs index cbbe9ac21a..282b03f585 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs @@ -233,7 +233,7 @@ namespace MonoDevelop.Core { Debug.Assert (properties != null); var prefsPath = UserProfile.Current.ConfigDir.Combine (FileName); - FileService.EnsureDirectoryExists (prefsPath.ParentDirectory); + Directory.CreateDirectory (prefsPath.ParentDirectory); properties.Save (prefsPath); } diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs index e4d383b564..7862934d0c 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs @@ -266,9 +266,7 @@ namespace MonoDevelop.Core get { if (version == null) { version = new Version (BuildInfo.Version); - #pragma warning disable 618 var relId = SystemInformation.GetReleaseId (); - #pragma warning restore 618 if (relId != null && relId.Length >= 9) { int rev; int.TryParse (relId.Substring (relId.Length - 4), out rev); diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs index 0ab0f046f7..4f24adf7b1 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs @@ -119,10 +119,8 @@ namespace MonoDevelop.Core }; } - [Obsolete ("Use Runtime.Version")] - public static string GetReleaseId () + internal static string GetReleaseId () { - // Change to internal var biFile = ((FilePath)Assembly.GetEntryAssembly ().Location).ParentDirectory.Combine ("buildinfo"); if (File.Exists (biFile)) { var line = File.ReadAllLines (biFile).Select (l => l.Split (':')).FirstOrDefault (a => a.Length > 1 && a [0].Trim () == "Release ID"); diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs index aaaedf3a03..89acf31bd7 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs @@ -146,7 +146,7 @@ namespace MonoDevelop.Core LoggingService.LogInfo ("Migrating '{0}' to '{1}'", source, target); if (!sourceIsDirectory) - FileService.EnsureDirectoryExists (target.ParentDirectory); + Directory.CreateDirectory (target.ParentDirectory); var handler = node.GetHandler (); if (handler != null) { diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs index fe28478a5f..e0b213cfbe 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs @@ -496,16 +496,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild internal bool Overwritten { get; set; } - [Obsolete] - public string Value { - get { - return EvaluatedElement.InnerText; - } - set { - Element.InnerText = value; - } - } - public string GetValue (bool isXml = false) { if (isXml) diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs index e92872ec27..77d9f63534 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs @@ -464,12 +464,6 @@ namespace MonoDevelop.Projects if (project != null) project.NotifyFilePropertyChangedInProject (this, property); } - - [Obsolete ("Use OnChanged(string property) instead.")] - protected virtual void OnChanged () - { - OnChanged (null); - } } internal class ProjectFileVirtualPathChangedEventArgs : EventArgs diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs index eee99971c8..7b1f63d266 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs @@ -45,8 +45,6 @@ namespace MonoDevelop.Projects Project, Package, Custom, - [Obsolete] - Gac } /// <summary> @@ -109,10 +107,7 @@ namespace MonoDevelop.Projects { if (referenceType == ReferenceType.Assembly) specificVersion = false; -#pragma warning disable 612 - if (referenceType == ReferenceType.Gac) - referenceType = ReferenceType.Package; -#pragma warning restore 612 + this.referenceType = referenceType; this.reference = reference; this.hintPath = hintPath ?? (referenceType == ReferenceType.Assembly ? reference : null); @@ -157,9 +152,7 @@ namespace MonoDevelop.Projects // This property is used by the serializer. It ensures that the obsolete Gac value is not serialized internal ReferenceType internalReferenceType { get { return referenceType; } - #pragma warning disable 612 - set { referenceType = value == ReferenceType.Gac ? ReferenceType.Package : value; } - #pragma warning restore 612 + set { referenceType = value; } } public ReferenceType ReferenceType { diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs index 054db3d327..3b4b21a2e9 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs @@ -104,7 +104,7 @@ namespace MonoDevelop.Projects get { return formatManager; } } - public ProjectServiceExtension GetExtensionChain (IBuildTarget target) + internal ProjectServiceExtension GetExtensionChain (IBuildTarget target) { ProjectServiceExtension chain; if (target != null) { @@ -178,12 +178,6 @@ namespace MonoDevelop.Projects } } - [Obsolete ("Use DefaultFileFormat.Id")] - public string DefaultFileFormatId { - get { return defaultFormat.Id; } - set { /* nop */ } - } - public FileFormat DefaultFileFormat { get { return defaultFormat; } } |