Kaynağa Gözat

Clean up parameter names

ManlyMarco 5 yıl önce
ebeveyn
işleme
ea42a9932a

+ 1 - 1
BepInEx/Configuration/ConfigEntry.cs

@@ -37,7 +37,7 @@ namespace BepInEx.Configuration
 			{
 				throw new ArgumentException($"Tried to define setting \"{Definition}\" as type {settingType.Name} " +
 				                            $"while it was already defined as type {SettingType.Name}. Use the same " +
-				                            $"Type for all Wrappers of a single setting.");
+				                            "Type for all Wrappers of a single setting.");
 			}
 
 			if (defaultValue == null && settingType.IsValueType)

+ 14 - 13
BepInEx/Contract/Attributes.cs

@@ -29,21 +29,21 @@ namespace BepInEx
 		/// </summary>
 		public Version Version { get; protected set; }
 
-		/// <param name="GUID">The unique identifier of the plugin. Should not change between plugin versions.</param>
-		/// <param name="Name">The user friendly name of the plugin. Is able to be changed between versions.</param>
-		/// <param name="Version">The specfic version of the plugin.</param>
-		public BepInPlugin(string GUID, string Name, string Version)
+		/// <param name="guid">The unique identifier of the plugin. Should not change between plugin versions.</param>
+		/// <param name="name">The user friendly name of the plugin. Is able to be changed between versions.</param>
+		/// <param name="version">The specfic version of the plugin.</param>
+		public BepInPlugin(string guid, string name, string version)
 		{
-			this.GUID = GUID;
-			this.Name = Name;
+			GUID = guid;
+			Name = name;
 
 			try
 			{
-				this.Version = new Version(Version);
+				Version = new Version(version);
 			}
 			catch
 			{
-				this.Version = null;
+				Version = null;
 			}
 		}
 	}
@@ -140,7 +140,7 @@ namespace BepInEx
 		/// Gets the specified attributes of a type, if they exist.
 		/// </summary>
 		/// <typeparam name="T">The attribute type to retrieve.</typeparam>
-		/// <param name="plugin">The plugin type.</param>
+		/// <param name="pluginType">The plugin type.</param>
 		/// <returns>The attributes of the type, if existing.</returns>
 		public static T[] GetAttributes<T>(Type pluginType) where T : Attribute
 		{
@@ -159,18 +159,19 @@ namespace BepInEx
 		/// <summary>
 		/// Retrieves the dependencies of the specified plugin type.
 		/// </summary>
-		/// <param name="Plugin">The plugin type.</param>
-		/// <param name="AllPlugins">All currently loaded plugin types.</param>
+		/// <param name="plugin">The plugin type.</param>
+		/// <param name="allPlugins">All currently loaded plugin types.</param>
 		/// <returns>A list of all plugin types that the specified plugin type depends upon.</returns>
-		public static IEnumerable<BepInDependency> GetDependencies(Type Plugin, IEnumerable<Type> AllPlugins)
+		public static IEnumerable<BepInDependency> GetDependencies(Type plugin, IEnumerable<Type> allPlugins)
 		{
-			return Plugin.GetCustomAttributes(typeof(BepInDependency), true).Cast<BepInDependency>();
+			return plugin.GetCustomAttributes(typeof(BepInDependency), true).Cast<BepInDependency>();
 		}
 	}
 
 	/// <summary>
 	/// An exception which is thrown when a plugin's dependencies cannot be found.
 	/// </summary>
+	[Obsolete]
 	public class MissingDependencyException : Exception
 	{
 		public MissingDependencyException(string message) : base(message) { }