From dd922411ae8b37cc9e92a394b120bc3d256ccaef Mon Sep 17 00:00:00 2001 From: Brian Kennedy Date: Mon, 20 Jun 2016 10:21:42 -0400 Subject: [PATCH] Require compression via attribute (#1) * Require compression via attribute * Added compressr exception --- CompressR.sln | 6 +++ src/CompressR.MVC4/CompressR.MVC4.csproj | 6 +++ src/CompressR.MVC5/CompressR.MVC5.csproj | 6 +++ src/CompressR.WebApi/CompressAttribute.cs | 15 +++++- src/CompressR.WebApi/CompressR.WebApi.csproj | 6 +++ src/CompressR/CompressR.csproj | 54 +++++++++++++++++++ .../Exceptions/CompressRException.cs | 13 +++++ src/CompressR/Properties/AssemblyInfo.cs | 36 +++++++++++++ 8 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 src/CompressR/CompressR.csproj create mode 100644 src/CompressR/Exceptions/CompressRException.cs create mode 100644 src/CompressR/Properties/AssemblyInfo.cs diff --git a/CompressR.sln b/CompressR.sln index b9ea086..9a3d652 100644 --- a/CompressR.sln +++ b/CompressR.sln @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompressR.WebApi", "src\Com EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompressR.Sample", "src\CompressR.Sample\CompressR.Sample.csproj", "{2FA56DF3-C7B2-4070-B41A-FE328D96961C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompressR", "src\CompressR\CompressR.csproj", "{C94378C3-4AA8-4F49-8720-77D14B62F72E}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\CompressR.MVC\CompressR.MVC.projitems*{b8889368-e350-4b1e-82f5-ea537d6da6e9}*SharedItemsImports = 4 @@ -40,6 +42,10 @@ Global {2FA56DF3-C7B2-4070-B41A-FE328D96961C}.Debug|Any CPU.Build.0 = Debug|Any CPU {2FA56DF3-C7B2-4070-B41A-FE328D96961C}.Release|Any CPU.ActiveCfg = Release|Any CPU {2FA56DF3-C7B2-4070-B41A-FE328D96961C}.Release|Any CPU.Build.0 = Release|Any CPU + {C94378C3-4AA8-4F49-8720-77D14B62F72E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C94378C3-4AA8-4F49-8720-77D14B62F72E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C94378C3-4AA8-4F49-8720-77D14B62F72E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C94378C3-4AA8-4F49-8720-77D14B62F72E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/CompressR.MVC4/CompressR.MVC4.csproj b/src/CompressR.MVC4/CompressR.MVC4.csproj index a1432da..50fa99e 100644 --- a/src/CompressR.MVC4/CompressR.MVC4.csproj +++ b/src/CompressR.MVC4/CompressR.MVC4.csproj @@ -75,6 +75,12 @@ + + + {c94378c3-4aa8-4f49-8720-77d14b62f72e} + CompressR + + + \ No newline at end of file diff --git a/src/CompressR/Exceptions/CompressRException.cs b/src/CompressR/Exceptions/CompressRException.cs new file mode 100644 index 0000000..b4748ad --- /dev/null +++ b/src/CompressR/Exceptions/CompressRException.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CompressR.Exceptions +{ + public class CompressRException: Exception + { + public CompressRException(string message) : base(message) { } + } +} diff --git a/src/CompressR/Properties/AssemblyInfo.cs b/src/CompressR/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4d2376d --- /dev/null +++ b/src/CompressR/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CompressR")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("CompressR")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c94378c3-4aa8-4f49-8720-77d14b62f72e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]