From dcd685a90f6efb79f111b4fed76f3b62cb8eaa08 Mon Sep 17 00:00:00 2001 From: blah38621_cp <36925b492f9af1e8e676baa1ba817f9639f49ec7y44YxFx5> Date: Sun, 23 Oct 2011 00:15:19 +0000 Subject: [PATCH] More from Gendarme. Cosmos.VS.Package's AssemblyVersion attribute didn't match it's AssemblyFileVersion, they now match. Sealed a few non-inherited attributes. Also made private field actually used as was intended. --- source2/Build/Cosmos.Build.Common/Enums.cs | 2 +- .../Cosmos.Compiler.Assembler/OpCodeAttribute.cs | 2 +- .../Compiler/Cosmos.Compiler.XSharp/XSharpAttribute.cs | 2 +- source2/IL2CPU/Cosmos.IL2CPU.Plugs/FieldTypeAttribute.cs | 9 ++++++++- source2/IL2CPU/Cosmos.IL2CPU/OpCodeAttribute.cs | 2 +- .../Hardware/Core/Cosmos.Core/DeviceIDAttribute.cs | 2 +- .../VSIP/Cosmos.VS.Package/Properties/AssemblyInfo.cs | 4 ++-- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/source2/Build/Cosmos.Build.Common/Enums.cs b/source2/Build/Cosmos.Build.Common/Enums.cs index 8d8deeac3..e839ac6e9 100644 --- a/source2/Build/Cosmos.Build.Common/Enums.cs +++ b/source2/Build/Cosmos.Build.Common/Enums.cs @@ -41,7 +41,7 @@ namespace Cosmos.Build.Common { public enum TraceAssemblies { All, Cosmos, User }; public enum DebugMode { None, IL, Source } - public class DescriptionAttribute : Attribute { + public sealed class DescriptionAttribute : Attribute { public static String GetDescription(object value) { Type valueType = value.GetType(); MemberInfo[] valueMemberInfo; diff --git a/source2/Compiler/Cosmos.Compiler.Assembler/OpCodeAttribute.cs b/source2/Compiler/Cosmos.Compiler.Assembler/OpCodeAttribute.cs index 18ffc0746..0a0f0c95e 100644 --- a/source2/Compiler/Cosmos.Compiler.Assembler/OpCodeAttribute.cs +++ b/source2/Compiler/Cosmos.Compiler.Assembler/OpCodeAttribute.cs @@ -5,7 +5,7 @@ using System.Text; namespace Cosmos.Compiler.Assembler { - public class OpCodeAttribute: Attribute + public sealed class OpCodeAttribute: Attribute { public OpCodeAttribute(string mnemonic) { diff --git a/source2/Compiler/Cosmos.Compiler.XSharp/XSharpAttribute.cs b/source2/Compiler/Cosmos.Compiler.XSharp/XSharpAttribute.cs index 4efd1a182..0f46b3109 100644 --- a/source2/Compiler/Cosmos.Compiler.XSharp/XSharpAttribute.cs +++ b/source2/Compiler/Cosmos.Compiler.XSharp/XSharpAttribute.cs @@ -6,7 +6,7 @@ using System.Text; namespace Cosmos.Compiler.XSharp { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - public class XSharpAttribute : Attribute { + public sealed class XSharpAttribute : Attribute { public bool IsInteruptHandler { get; set; } public bool PreserveStack { get; set; } } diff --git a/source2/IL2CPU/Cosmos.IL2CPU.Plugs/FieldTypeAttribute.cs b/source2/IL2CPU/Cosmos.IL2CPU.Plugs/FieldTypeAttribute.cs index 9146c88ed..9884263b7 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU.Plugs/FieldTypeAttribute.cs +++ b/source2/IL2CPU/Cosmos.IL2CPU.Plugs/FieldTypeAttribute.cs @@ -7,7 +7,14 @@ namespace Cosmos.IL2CPU.Plugs private string mName; public string Name { - get; set; + get + { + return mName; + } + set + { + mName = value; + } } } } \ No newline at end of file diff --git a/source2/IL2CPU/Cosmos.IL2CPU/OpCodeAttribute.cs b/source2/IL2CPU/Cosmos.IL2CPU/OpCodeAttribute.cs index 601fe3133..6af972327 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU/OpCodeAttribute.cs +++ b/source2/IL2CPU/Cosmos.IL2CPU/OpCodeAttribute.cs @@ -6,7 +6,7 @@ using System.Text; namespace Cosmos.IL2CPU { [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] - public class OpCodeAttribute : Attribute + public sealed class OpCodeAttribute : Attribute { public ILOpCode.Code OpCode { diff --git a/source2/Kernel/System/Hardware/Core/Cosmos.Core/DeviceIDAttribute.cs b/source2/Kernel/System/Hardware/Core/Cosmos.Core/DeviceIDAttribute.cs index b1db92b1f..3710d8435 100644 --- a/source2/Kernel/System/Hardware/Core/Cosmos.Core/DeviceIDAttribute.cs +++ b/source2/Kernel/System/Hardware/Core/Cosmos.Core/DeviceIDAttribute.cs @@ -5,7 +5,7 @@ using System.Text; namespace Cosmos.Core { [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=true)] - public class DeviceIDAttribute : Attribute { + public sealed class DeviceIDAttribute : Attribute { public UInt16 VendorID; public UInt16 DeviceID; } diff --git a/source2/VSIP/Cosmos.VS.Package/Properties/AssemblyInfo.cs b/source2/VSIP/Cosmos.VS.Package/Properties/AssemblyInfo.cs index e216c801e..921b0cdc0 100644 --- a/source2/VSIP/Cosmos.VS.Package/Properties/AssemblyInfo.cs +++ b/source2/VSIP/Cosmos.VS.Package/Properties/AssemblyInfo.cs @@ -29,9 +29,9 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -// Note: AssemblyVersion MUST match whats in the PLK. AssemblyFileVersion can be anything though. +// Note: AssemblyVersion MUST match what is in the PLK. AssemblyFileVersion can be anything though. [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.1")] +[assembly: AssemblyFileVersion("1.0.0.0")]