Example #1
0
        public static void WriteEmbededFile(this HttpResponse response, string resourceName, string resourceType)
        {
            if (_unsuportedFormatTypes.Any(a => a.Equals(resourceType, StringComparison.InvariantCultureIgnoreCase)))
            {
                throw new Exception("Unsuported resource type");
            }

            response.BinaryWrite(AssetsHelper.GetEmbededResourceBinary(resourceName, resourceType));
        }