├── .gitattributes ├── .gitignore ├── AspNetPerformance ├── ActionInfo.cs ├── AspNetPerformance.csproj ├── AspNetPerformance.csproj.user ├── ConfigInfo.cs ├── DoNotTrackPerformanceAttribute.cs ├── InstanceNameRegistry.cs ├── Metrics │ ├── ActiveRequestsMetric.cs │ ├── DeltaCallsMetric.cs │ ├── DeltaExceptionsThrownMetric.cs │ ├── LastCallElapsedTimeMetric.cs │ ├── PerformanceMetricBase.cs │ ├── PostAndPutRequestSizeMetric.cs │ └── TimerForEachRequestMetric.cs ├── MvcPerformanceAttribute.cs ├── PerformanceMetricContainer.cs ├── PerformanceMetricFactory.cs ├── PerformanceTracker.cs ├── ProjectOptions.cs ├── Properties │ └── AssemblyInfo.cs ├── WebApiPerformanceAttribute.cs └── packages.config ├── MvcMusicStore.sln ├── MvcMusicStore ├── App_Data │ ├── ASPNETDB.MDF │ ├── MvcMusicStore.sdf │ └── aspnetdb_log.ldf ├── Content │ ├── Images │ │ ├── home-showcase.png │ │ ├── logo.png │ │ └── placeholder.gif │ ├── Site.css │ └── themes │ │ └── base │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── jquery.ui.accordion.css │ │ ├── jquery.ui.all.css │ │ ├── jquery.ui.autocomplete.css │ │ ├── jquery.ui.base.css │ │ ├── jquery.ui.button.css │ │ ├── jquery.ui.core.css │ │ ├── jquery.ui.datepicker.css │ │ ├── jquery.ui.dialog.css │ │ ├── jquery.ui.progressbar.css │ │ ├── jquery.ui.resizable.css │ │ ├── jquery.ui.selectable.css │ │ ├── jquery.ui.slider.css │ │ ├── jquery.ui.tabs.css │ │ └── jquery.ui.theme.css ├── Controllers │ ├── AccountController.cs │ ├── CheckoutController.cs │ ├── HomeController.cs │ ├── ShoppingCartController.cs │ ├── StoreController.cs │ └── StoreManagerController.cs ├── Global.asax ├── Global.asax.cs ├── Models │ ├── AccountModels.cs │ ├── Album.cs │ ├── Artist.cs │ ├── Cart.cs │ ├── Genre.cs │ ├── MusicStoreEntities.cs │ ├── Order.cs │ ├── OrderDetail.cs │ ├── SampleData.cs │ └── ShoppingCart.cs ├── MusicStoreBootstrapper.cs ├── MvcMusicStore.csproj ├── MvcMusicStore.csproj.user ├── Properties │ └── AssemblyInfo.cs ├── Readme.txt ├── Scripts │ ├── MicrosoftAjax.debug.js │ ├── MicrosoftAjax.js │ ├── MicrosoftMvcAjax.debug.js │ ├── MicrosoftMvcAjax.js │ ├── MicrosoftMvcValidation.debug.js │ ├── MicrosoftMvcValidation.js │ ├── jquery-1.5.1-vsdoc.js │ ├── jquery-1.5.1.js │ ├── jquery-1.5.1.min.js │ ├── jquery-ui-1.8.11.js │ ├── jquery-ui-1.8.11.min.js │ ├── jquery.unobtrusive-ajax.js │ ├── jquery.unobtrusive-ajax.min.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── modernizr-1.7.js │ └── modernizr-1.7.min.js ├── ViewModels │ ├── ShoppingCartRemoveViewModel.cs │ └── ShoppingCartViewModel.cs ├── Views │ ├── Account │ │ ├── ChangePassword.cshtml │ │ ├── ChangePasswordSuccess.cshtml │ │ ├── LogOn.cshtml │ │ └── Register.cshtml │ ├── Checkout │ │ ├── AddressAndPayment.cshtml │ │ └── Complete.cshtml │ ├── Home │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ └── _Layout.cshtml │ ├── ShoppingCart │ │ ├── CartSummary.cshtml │ │ └── Index.cshtml │ ├── Store │ │ ├── Browse.cshtml │ │ ├── Details.cshtml │ │ ├── GenreMenu.cshtml │ │ └── Index.cshtml │ ├── StoreManager │ │ ├── Create.cshtml │ │ ├── Delete.cshtml │ │ ├── Details.cshtml │ │ ├── Edit.cshtml │ │ └── Index.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config └── packages.config ├── README.md └── packages ├── EntityFramework.4.1.10331.0 ├── EntityFramework.4.1.10331.0.nupkg ├── EntityFramework.4.1.10331.0.nuspec ├── lib │ ├── EntityFramework.dll │ └── EntityFramework.xml └── tools │ └── install.ps1 ├── Metrics.NET-net40.0.2.2 ├── Metrics.NET-net40.0.2.2.nupkg ├── Metrics.NET-net40.0.2.2.nuspec └── lib │ └── net40 │ ├── Metrics.XML │ ├── Metrics.dll │ └── Metrics.pdb ├── Metrics.NET-net40.0.2.3 ├── Metrics.NET-net40.0.2.3.nupkg ├── Metrics.NET-net40.0.2.3.nuspec └── lib │ └── net40 │ ├── Metrics.XML │ ├── Metrics.dll │ └── Metrics.pdb ├── Modernizr.1.7 ├── Content │ └── Scripts │ │ ├── modernizr-1.7.js │ │ └── modernizr-1.7.min.js ├── Modernizr.1.7.nupkg └── Modernizr.1.7.nuspec ├── jQuery.1.5.1 ├── Content │ └── Scripts │ │ ├── jquery-1.5.1.js │ │ └── jquery-1.5.1.min.js ├── jQuery.1.5.1.nupkg └── jQuery.1.5.1.nuspec ├── jQuery.UI.Combined.1.8.11 ├── Content │ ├── Content │ │ └── themes │ │ │ └── base │ │ │ ├── images │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ └── ui-icons_cd0a0a_256x240.png │ │ │ ├── jquery.ui.accordion.css │ │ │ ├── jquery.ui.all.css │ │ │ ├── jquery.ui.autocomplete.css │ │ │ ├── jquery.ui.base.css │ │ │ ├── jquery.ui.button.css │ │ │ ├── jquery.ui.core.css │ │ │ ├── jquery.ui.datepicker.css │ │ │ ├── jquery.ui.dialog.css │ │ │ ├── jquery.ui.progressbar.css │ │ │ ├── jquery.ui.resizable.css │ │ │ ├── jquery.ui.selectable.css │ │ │ ├── jquery.ui.slider.css │ │ │ ├── jquery.ui.tabs.css │ │ │ └── jquery.ui.theme.css │ └── Scripts │ │ ├── jquery-ui-1.8.11.js │ │ └── jquery-ui-1.8.11.min.js ├── jQuery.UI.Combined.1.8.11.nupkg └── jQuery.UI.Combined.1.8.11.nuspec ├── jQuery.Validation.1.8 ├── Content │ └── Scripts │ │ ├── jquery.validate-vsdoc.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js ├── jQuery.Validation.1.8.nupkg └── jQuery.Validation.1.8.nuspec ├── jQuery.vsdoc.1.5.1 ├── Content │ └── Scripts │ │ └── jquery-1.5.1-vsdoc.js ├── Tools │ ├── install.ps1 │ ├── jquery-1.5.1-vsdoc-para.js │ └── uninstall.ps1 ├── jQuery.vsdoc.1.5.1.nupkg └── jQuery.vsdoc.1.5.1.nuspec └── repositories.config /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # ========================= 18 | # Operating System Files 19 | # ========================= 20 | 21 | # OSX 22 | # ========================= 23 | 24 | .DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | 28 | # Icon must end with two \r 29 | Icon 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /AspNetPerformance/ActionInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace AspNetPerformance 7 | { 8 | /// 9 | /// Class to hold information about the action method which performance metrics are being gathered 10 | /// 11 | public class ActionInfo 12 | { 13 | 14 | public ActionInfo(int processId, String actionType, String controllerName, 15 | String actionName, String httpMethod, String paramters, int contentLength) 16 | { 17 | this.ProcessId = processId; 18 | this.ActionType = actionType; 19 | this.ControllerName = controllerName; 20 | this.ActionName = actionName; 21 | this.HttpMethod = httpMethod; 22 | this.Parameters = paramters; 23 | this.ContentLength = contentLength; 24 | 25 | this.InstanceName = this.DetermineRawInstanceName(); 26 | this.SanitizedInstanceName = 27 | InstanceNameRegistry.GetSanitizedInstanceName(this.InstanceName); 28 | } 29 | 30 | 31 | /// 32 | /// Gets/Sets the name of the performance counter category. 33 | /// 34 | public String PerformaneCounterCategory { get; private set; } 35 | 36 | 37 | /// 38 | /// Gets/Sets the int of the Process ID the application is running under 39 | /// 40 | /// 41 | /// This is the process id of the ASP.NET worker process. It is used as the 42 | /// first element in the instance name for the performance counters. It is 43 | /// also useful to know to match up these statistics with data in the Process 44 | /// category 45 | /// 46 | public int ProcessId { get; private set; } 47 | 48 | /// 49 | /// Gets/Sets a String which indicates if the Action was an MVC or WebApi action 50 | /// 51 | public String ActionType { get; private set; } 52 | 53 | /// 54 | /// Gets/Sets the nme of the controller this action belongs to 55 | /// 56 | public String ControllerName { get; private set; } 57 | 58 | /// 59 | /// Gets/sets the name of this action 60 | /// 61 | public String ActionName { get; private set; } 62 | 63 | /// 64 | /// Gets/Sets the HttpMethod (GET, POST, PUT, DELETE, etc) used for this action. 65 | /// 66 | /// 67 | /// In MVC, some actions (typically an EDIT) have both definition for both GET and 68 | /// POST. This value helps differentiate between those two calls 69 | /// 70 | public String HttpMethod { get; private set; } 71 | 72 | 73 | /// 74 | /// Gets/Sets a String that represents the parameters passed to this action 75 | /// 76 | /// 77 | public String Parameters { get; private set; } 78 | 79 | 80 | /// 81 | /// Gets the instance name that will be used to record performance for performance metrics 82 | /// (counters) on the action represented by this object 83 | /// 84 | public String InstanceName { get; private set; } 85 | 86 | 87 | /// 88 | /// Gets a sanitized version of the instane name that is safe to pass to the 89 | /// PerformanceCounter object (i.e. will be 128 chars or less) 90 | /// 91 | public String SanitizedInstanceName { get; set; } 92 | 93 | /// 94 | /// ContentLength 95 | /// 96 | public int ContentLength { get; set; } 97 | 98 | 99 | /// 100 | /// Helper method to determine the instance name to use from all the paramters 101 | /// 102 | /// 103 | private String DetermineRawInstanceName() 104 | { 105 | String rawInstanceName = String.Format("[{0}]-{1} {2}.{3}[{5}] {4}", 106 | this.ProcessId, 107 | this.ActionType, 108 | this.ControllerName, 109 | this.ActionName, 110 | this.HttpMethod, 111 | this.Parameters); 112 | return rawInstanceName; 113 | } 114 | 115 | 116 | #region Utility Methods 117 | 118 | /// 119 | /// Checks to see if the given object is equivalent to this object 120 | /// 121 | /// 122 | /// Need to do this since we are overridin GetHashCode(). 123 | /// 124 | /// Another ActionInfo object 125 | /// True if the objects represent the same controller action. False otherwise 126 | public override bool Equals(object obj) 127 | { 128 | ActionInfo other = obj as ActionInfo; 129 | if (obj == null) 130 | return false; 131 | 132 | return this.InstanceName.Equals(other.InstanceName); 133 | } 134 | 135 | /// 136 | /// Gets the hash code for this object 137 | /// 138 | /// 139 | /// ActionInfo will be used as the key for a Dictionary, so we need to define 140 | /// how we want to hash code to behave so we don't have any unexpected behavior. 141 | /// In this case, it will be based off of the instance name 142 | /// 143 | /// An int of the hash code 144 | public override int GetHashCode() 145 | { 146 | return this.InstanceName.GetHashCode(); 147 | } 148 | 149 | #endregion 150 | 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /AspNetPerformance/AspNetPerformance.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {6AA65092-026A-4F6A-9F82-180F11993A3A} 9 | Library 10 | Properties 11 | AspNetPerformance 12 | AspNetPerformance 13 | v4.0 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | ..\packages\Metrics.NET-net40.0.2.2\lib\net40\Metrics.dll 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 79 | -------------------------------------------------------------------------------- /AspNetPerformance/AspNetPerformance.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ProjectFiles 5 | 6 | -------------------------------------------------------------------------------- /AspNetPerformance/ConfigInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Configuration; 6 | using System.Diagnostics; 7 | 8 | namespace AspNetPerformance 9 | { 10 | 11 | /// 12 | /// Singleton class that reads and holds configuration info for the around how 13 | /// performance tracking is configured for the application 14 | /// 15 | public class ConfigInfo 16 | { 17 | 18 | /// 19 | /// Constant for the appSettings key that stores the name of the Performance Counter Category 20 | /// 21 | public const String EnablePerformanceMonitoring = "AspNetPerformance.EnablePerformanceMonitoring"; 22 | 23 | 24 | #region Properties 25 | 26 | /// 27 | /// Property indicating if performance is enabled for the app 28 | /// 29 | /// 30 | /// Performance is considered enabled if there is a Performance Counter Category name 31 | /// in the app config and that category exists on the machine 32 | /// 33 | public bool PerformanceEnabled { get; set; } 34 | 35 | 36 | /// 37 | /// Gets the process id of the ASP.NET worker process the application is running inside 38 | /// 39 | public int ProcessId { get; private set; } 40 | 41 | /// 42 | /// Gets a String of the name of the Performance Counter Category to use 43 | /// 44 | /// 45 | /// This performance counter category needs to exist on the machine for performance to 46 | /// be tracked. Nominally, it is a good idea to make this name the same as the application 47 | /// name so it is easy to tell the performance for one app versus another 48 | /// 49 | public String PerformanceCategoryName { get; private set; } 50 | 51 | #endregion 52 | 53 | 54 | #region Static Members 55 | 56 | /// 57 | /// Static variable (defined as a System.Lazy) to hold the single instance of the ConfigInfo object 58 | /// 59 | private static Lazy configInfo = new Lazy(() => InitializeConfigInfo()); 60 | 61 | 62 | /// 63 | /// Property to get the instance of the ConfigValue class 64 | /// 65 | public static ConfigInfo Value 66 | { 67 | get 68 | { 69 | return configInfo.Value; 70 | } 71 | } 72 | 73 | 74 | /// 75 | /// Helper method to initialize the ConfigInfo object 76 | /// 77 | /// 78 | /// This method gets the process id of the current process. Then it looks in the appSettings for 79 | /// the name of the performance counter category. Finally, it makes sure the category exists. If 80 | /// there is no value in the appSettings or the category does not exist, then the PerformanceEnabled 81 | /// flag will be set to false and a message written to the trace log. Otherwise PerformanceEnabled 82 | /// will be marked as true 83 | /// 84 | /// A ConfigInfo object 85 | private static ConfigInfo InitializeConfigInfo() 86 | { 87 | ConfigInfo info = new ConfigInfo(); 88 | info.ProcessId = Process.GetCurrentProcess().Id; 89 | 90 | 91 | String enableperformancemonitoring = ConfigurationManager.AppSettings[EnablePerformanceMonitoring]; 92 | if (String.IsNullOrWhiteSpace(enableperformancemonitoring)) 93 | { 94 | Trace.WriteLine("No appSettings value was found to enable performance monitoring"); 95 | info.PerformanceEnabled = false; 96 | } 97 | else 98 | { 99 | // There is a category name, so make sure it exists 100 | info.PerformanceCategoryName = enableperformancemonitoring; 101 | info.PerformanceEnabled = true; 102 | } 103 | return info; 104 | } 105 | 106 | #endregion 107 | 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /AspNetPerformance/DoNotTrackPerformanceAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace AspNetPerformance 7 | { 8 | 9 | /// 10 | /// A marker attribute used to decorate actions or controllers where performance data should 11 | /// not be gathered 12 | /// 13 | /// 14 | /// It is generally easier to add the filters to track performane globally, but there may be 15 | /// cases where you want to have certain actions or even whole controllers "opt out" of 16 | /// tracking performance. This attrinute provides a convenient way to do so. The filters 17 | /// to track performance can still be added globally, but by decorating an action or 18 | /// controller with this attribute will exclude that item from performance tracking. 19 | /// 20 | public class DoNotTrackPerformanceAttribute : Attribute 21 | { 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AspNetPerformance/InstanceNameRegistry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Diagnostics; 6 | 7 | namespace AspNetPerformance 8 | { 9 | 10 | 11 | /// 12 | /// Static Helper class to sanitize and keep a list of all of the instance names that have been used 13 | /// 14 | /// 15 | /// 16 | /// Per the MSDN documentation, instance names are limited to 128 characters in length. It is 17 | /// possible that when concatenating all of the elements together to form the instance name, we 18 | /// could end up with a name longer than 128 characters. In this case, we'll take the first 125 19 | /// characters and then append on a 3 digits of an integer. (So there is a limit of 999 names 20 | /// that exceed 128 characters, but this really should not be an issue). All of the instance 21 | /// names are then kept in a dictionary, with the raw (original) instance name as the key 22 | /// and the sanitized name as the value so on subsequent calls, the action method gets sanitized 23 | /// to the same name 24 | /// 25 | /// 26 | public static class InstanceNameRegistry 27 | { 28 | 29 | private static Dictionary instanceNames = new Dictionary(); 30 | private static Object lockObject = new Object(); 31 | private static int methodCounter = 0; 32 | 33 | 34 | /// 35 | /// Sanitizes the instance name to make sure it is 128 characters or less 36 | /// 37 | /// A Stirng of the raw (original) instance name 38 | /// A String of the instance name that should be used 39 | public static String GetSanitizedInstanceName(String rawInstanceName) 40 | { 41 | // If this is a known instance, then we can find it and just return. No need to lock 42 | if (instanceNames.ContainsKey(rawInstanceName)) 43 | { 44 | return instanceNames[rawInstanceName]; 45 | } 46 | 47 | lock (lockObject) 48 | { 49 | // Check again, in case someone added it while we were waiting 50 | if (instanceNames.ContainsKey(rawInstanceName) == false) 51 | { 52 | if (rawInstanceName.Length <= 128) 53 | { 54 | // No need to truncate the method name, so just add it 55 | instanceNames.Add(rawInstanceName, rawInstanceName); 56 | } 57 | else 58 | { 59 | // Need to get this below 128 chars. 60 | // so take the first 125, and then add on an integer 61 | String sanitizedName = String.Format("{0}{1:###}", 62 | rawInstanceName.Substring(0, 125), methodCounter++); 63 | instanceNames.Add(rawInstanceName, sanitizedName); 64 | } 65 | } 66 | } 67 | return instanceNames[rawInstanceName]; 68 | } 69 | 70 | 71 | /// 72 | /// Gets a list of all of the instance names that have been used 73 | /// 74 | /// 75 | /// This method is really only intended to be used when the application ends 76 | /// and you want to remove the instances from the performance framework 77 | /// 78 | /// A List of strings of the instance names 79 | public static List GetAllInstanceNames() 80 | { 81 | return instanceNames.Values.ToList(); 82 | } 83 | 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /AspNetPerformance/Metrics/ActiveRequestsMetric.cs: -------------------------------------------------------------------------------- 1 | using Metrics; 2 | using System; 3 | using System.Diagnostics; 4 | 5 | 6 | namespace AspNetPerformance.Metrics 7 | { 8 | /// 9 | /// Metric to track how many calls are currently in progresss to this action 10 | /// 11 | public class ActiveRequestsMetric : PerformanceMetricBase 12 | { 13 | 14 | public ActiveRequestsMetric(ActionInfo info) 15 | : base(info) 16 | { 17 | String categoryName = this.actionInfo.ControllerName; 18 | String instanceName = this.actionInfo.ActionName; 19 | string counterName = string.Format("{0} {1} {2}", categoryName, instanceName, COUNTER_NAME); 20 | this.callsInProgressCounter = Metric.Context(this.actionInfo.ActionType).Counter(counterName, Unit.Custom(COUNTER_NAME)); 21 | } 22 | 23 | 24 | /// 25 | /// Constant defining the name of this counter 26 | /// 27 | public const String COUNTER_NAME = "ActiveRequests"; 28 | 29 | 30 | private Counter callsInProgressCounter; 31 | 32 | /// 33 | /// Method called by the custom action filter just prior to the action begining to execute 34 | /// 35 | /// 36 | /// This method increments the Calls in Progress counter by 1 37 | /// 38 | public override void OnActionStart() 39 | { 40 | this.callsInProgressCounter.Increment(); 41 | } 42 | 43 | 44 | /// 45 | /// Method called by the custom action filter after the action completes 46 | /// 47 | /// 48 | /// This method decrements the Calls in Progress counter by 1 49 | /// 50 | public override void OnActionComplete(long elapsedTicks, bool exceptionThrown) 51 | { 52 | this.callsInProgressCounter.Decrement(); 53 | } 54 | 55 | /// 56 | /// Disposes of the Performance Counter when the metric object is disposed 57 | /// 58 | public override void Dispose() 59 | { 60 | //this.callsInProgressCounter.Dispose(); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /AspNetPerformance/Metrics/DeltaCallsMetric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Diagnostics; 6 | using Metrics; 7 | 8 | 9 | namespace AspNetPerformance.Metrics 10 | { 11 | 12 | /// 13 | /// Performance metric to update the counter that tracks the number of times 14 | /// an action has been called in the last reporting period 15 | /// 16 | public class DeltaCallsMetric : PerformanceMetricBase 17 | { 18 | 19 | public DeltaCallsMetric(ActionInfo info) 20 | : base(info) 21 | { 22 | String categoryName = this.actionInfo.ControllerName; 23 | String instanceName = this.actionInfo.ActionName; 24 | string counterName = string.Format("{0} {1} {2}", categoryName, instanceName, COUNTER_NAME); 25 | this.deltaCallsCounter = Metric.Context(this.actionInfo.ActionType).Counter(counterName, Unit.Requests); 26 | } 27 | 28 | /// 29 | /// Constant defining the name of this counter 30 | /// 31 | public const String COUNTER_NAME = "Delta Calls"; 32 | 33 | 34 | /// 35 | /// Reference to the counter to be updated 36 | /// 37 | private Counter deltaCallsCounter; 38 | 39 | 40 | /// 41 | /// Method called by the custom action filter after the action completes 42 | /// 43 | /// 44 | /// This method increments the "Delta Calls" counter by 1. It does not use the 45 | /// elapsedTicks that is passed in 46 | /// 47 | /// A long of the ticks it took the action to complete (not used) 48 | public override void OnActionComplete(long elapsedTicks, bool exceptionThrown) 49 | { 50 | this.deltaCallsCounter.Increment(); 51 | } 52 | 53 | 54 | /// 55 | /// Disposes of the Performance Counter when the metric object is disposed 56 | /// 57 | public override void Dispose() 58 | { 59 | //this.deltaCallsCounter.Dispose(); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /AspNetPerformance/Metrics/DeltaExceptionsThrownMetric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Diagnostics; 6 | using Metrics; 7 | 8 | namespace AspNetPerformance.Metrics 9 | { 10 | /// 11 | /// Performance Metric to track the count of exceptions thrown by a controller action in the last 12 | /// time period 13 | /// 14 | public class DeltaExceptionsThrownMetric : PerformanceMetricBase 15 | { 16 | public DeltaExceptionsThrownMetric(ActionInfo info) 17 | : base(info) 18 | { 19 | this.deltaExceptionsThrownCounter 20 | = Metric.Context(this.actionInfo.ActionType).Meter(COUNTER_NAME, Unit.Errors, TimeUnit.Seconds); 21 | } 22 | 23 | 24 | /// 25 | /// Constant defining the name of this counter 26 | /// 27 | public const String COUNTER_NAME = "Errors"; 28 | 29 | 30 | /// 31 | /// Reference to the performance counter 32 | /// 33 | private Meter deltaExceptionsThrownCounter; 34 | 35 | 36 | /// 37 | /// Method called by the custom action filter after the action completes 38 | /// 39 | /// 40 | /// If exceptionThrown is true, then the Total Exceptions Thrown counter will be 41 | /// incremented by 1 42 | /// 43 | public override void OnActionComplete(long elapsedTicks, bool exceptionThrown) 44 | { 45 | if (exceptionThrown) 46 | this.deltaExceptionsThrownCounter.Mark(); 47 | } 48 | 49 | 50 | /// 51 | /// Disposes of the Performance Counter when the metric object is disposed 52 | /// 53 | public override void Dispose() 54 | { 55 | //this.deltaExceptionsThrownCounter.Dispose(); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /AspNetPerformance/Metrics/LastCallElapsedTimeMetric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Diagnostics; 6 | using Metrics; 7 | 8 | 9 | namespace AspNetPerformance.Metrics 10 | { 11 | /// 12 | /// Performance metric to update the counter that tracks the elapsed time of 13 | /// an action the last time it was called 14 | /// 15 | /// 16 | /// This value is not an average. It just just overwrites whatever value is 17 | /// in the counter, so you just have the last captured value 18 | /// 19 | public class LastCallElapsedTimeMetric : PerformanceMetricBase 20 | { 21 | public LastCallElapsedTimeMetric(ActionInfo info) 22 | : base(info) 23 | { 24 | } 25 | 26 | /// 27 | /// Constant defining the name of this counter 28 | /// 29 | public const String COUNTER_NAME = "Last Call Elapsed Time"; 30 | 31 | 32 | /// 33 | /// Method called by the custom action filter after the action completes 34 | /// 35 | /// 36 | /// This method converts the elapsedTicks value to milliseconds, and then sets 37 | /// the counter "Last Call Elapsed Time" to this value, thereby overwriting whatever 38 | /// was in the counter previously. 39 | /// 40 | /// A long of the ticks it took the action to complete 41 | public override void OnActionComplete(long elapsedTicks, bool exceptionThrown) 42 | { 43 | // Need to convert the elapsed ticks into milliseconds for this counter 44 | long milliseconds = this.ConvertTicksToMilliseconds(elapsedTicks); 45 | String controllerName = this.actionInfo.ControllerName; 46 | String actionName = this.actionInfo.ActionName; 47 | string counterName = string.Format("{0} {1} {2}", controllerName, actionName, COUNTER_NAME); 48 | Metric.Context(this.actionInfo.ActionType).Gauge(counterName, () => milliseconds, Unit.Custom("Milliseconds")); 49 | } 50 | 51 | 52 | /// 53 | /// Disposes of the Performance Counter when the metric object is disposed 54 | /// 55 | public override void Dispose() 56 | { 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /AspNetPerformance/Metrics/PerformanceMetricBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Diagnostics; 6 | 7 | namespace AspNetPerformance.Metrics 8 | { 9 | 10 | /// 11 | /// Base class for all performance metric objects 12 | /// 13 | public abstract class PerformanceMetricBase : IDisposable 14 | { 15 | 16 | /// 17 | /// Creates a new PerformanceMetricBase object that will update data for the 18 | /// action described by the given ActionInfo object 19 | /// 20 | /// An ActionInfo object that contains data about the action 21 | /// that was called 22 | public PerformanceMetricBase(ActionInfo info) 23 | { 24 | this.actionInfo = info; 25 | } 26 | 27 | 28 | /// 29 | /// Gets the object that contains info on the action that was called and is 30 | /// having perfomance tracked 31 | /// 32 | protected ActionInfo actionInfo; 33 | 34 | 35 | /// 36 | /// Method called by the custom action filter after the action completes 37 | /// 38 | /// 39 | /// Performance metric objects should provide an implementation for either this method 40 | /// or the OnActionComplete() method, or potentially both if they have processing to perform 41 | /// both before and after the action executes. This method is defined as virtual with an 42 | /// empty implementation so that if a derived object only wants to implement one method, 43 | /// it does not have to provide a default implemtation for the other 44 | /// 45 | public virtual void OnActionStart() 46 | { 47 | 48 | } 49 | 50 | /// 51 | /// Method called by the custom action filter after the action completes 52 | /// 53 | /// 54 | /// Performance metric objects should provide an implementation for either this method 55 | /// or the OnActionStart() method, or potentially both if they have processing to perform 56 | /// both before and after the action executes. This method is defined as virtual with an 57 | /// empty implementation so that if a derived object only wants to implement one method, 58 | /// it does not have to provide a default implemtation for the other 59 | /// 60 | /// A long of the ticks it took the action to complete 61 | /// A bool if an uncaught exception was thrown during the processing of this action 62 | public virtual void OnActionComplete(long elapsedTicks, bool exceptionThrown) 63 | { 64 | 65 | } 66 | 67 | 68 | /// 69 | /// Helper method to convert ticks from the Stopwatch class to milliseconds 70 | /// 71 | /// 72 | /// This method will round, so 1.6 milliseconds would become 2 millisecons. The 73 | /// method returns a long because that is what the performance counters want 74 | /// 75 | /// A long of the number of ticks 76 | /// A long of the corresponding value in milliseconds 77 | protected long ConvertTicksToMilliseconds(long elapsedTicks) 78 | { 79 | decimal d = Math.Round(1000 * (decimal)elapsedTicks / Stopwatch.Frequency); 80 | return Convert.ToInt64(d); 81 | } 82 | 83 | 84 | /// 85 | /// Abstract method where concrete implementations should call Dispose() on 86 | /// any performance counters they hold references to 87 | /// 88 | public virtual void Dispose() 89 | { 90 | } 91 | 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /AspNetPerformance/Metrics/PostAndPutRequestSizeMetric.cs: -------------------------------------------------------------------------------- 1 | using Metrics; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace AspNetPerformance.Metrics 8 | { 9 | public class PostAndPutRequestSizeMetric : PerformanceMetricBase 10 | { 11 | public PostAndPutRequestSizeMetric(ActionInfo info) 12 | : base(info) 13 | { 14 | this.histogram = Metric.Context(this.actionInfo.ActionType).Histogram(COUNTER_NAME, Unit.Bytes, SamplingType.FavourRecent); 15 | } 16 | 17 | 18 | /// 19 | /// Constant defining the name of this counter 20 | /// 21 | public const String COUNTER_NAME = "Post & Put Request Size"; 22 | 23 | 24 | /// 25 | /// Reference to the performance counter 26 | /// 27 | private Histogram histogram; 28 | 29 | public override void OnActionStart() 30 | { 31 | var method = this.actionInfo.HttpMethod.ToUpper(); 32 | if (method == "POST" || method == "PUT") 33 | { 34 | histogram.Update(this.actionInfo.ContentLength); 35 | } 36 | } 37 | 38 | public override void Dispose() 39 | { 40 | 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /AspNetPerformance/Metrics/TimerForEachRequestMetric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Diagnostics; 6 | using Metrics; 7 | 8 | namespace AspNetPerformance.Metrics 9 | { 10 | /// 11 | /// Performance Metric that updates the counters that track the average time a method took 12 | /// 13 | public class TimerForEachRequestMetric : PerformanceMetricBase 14 | { 15 | 16 | public TimerForEachRequestMetric(ActionInfo info) 17 | : base(info) 18 | { 19 | String controllerName = this.actionInfo.ControllerName; 20 | String actionName = this.actionInfo.ActionName; 21 | string counterName = string.Format("{0} {1}", controllerName, actionName); 22 | 23 | this.averageTimeCounter = Metric.Context(this.actionInfo.ActionType).Timer(counterName, Unit.Requests, SamplingType.FavourRecent, 24 | TimeUnit.Seconds, TimeUnit.Milliseconds); 25 | } 26 | 27 | 28 | 29 | #region Member Variables 30 | 31 | private Timer averageTimeCounter; 32 | 33 | 34 | #endregion 35 | 36 | /// 37 | /// Method called by the custom action filter after the action completes 38 | /// 39 | /// 40 | /// This method increments the Average Time per Call counter by the number of ticks 41 | /// 42 | /// A long of the number of ticks it took to complete the action 43 | public override void OnActionComplete(long elapsedTicks, bool exceptionThrown) 44 | { 45 | averageTimeCounter.Record(elapsedTicks, TimeUnit.Nanoseconds); 46 | } 47 | 48 | /// 49 | /// Disposes of the PerformanceCounter objects when the metric object is disposed 50 | /// 51 | public override void Dispose() 52 | { 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /AspNetPerformance/PerformanceMetricContainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using AspNetPerformance.Metrics; 6 | 7 | 8 | namespace AspNetPerformance 9 | { 10 | 11 | /// 12 | /// Class to hold all of the PerformanceMetricBase objects associated with an ActionInfo 13 | /// (effectively all the performance metrics associated with an action) 14 | /// 15 | public class PerformanceMetricContainer 16 | { 17 | 18 | /// 19 | /// Creates a new PerformanceMetricContainer object 20 | /// 21 | /// An ActionInfo object that describes the action the metrics will apply to 22 | public PerformanceMetricContainer(ActionInfo actionInfo, List metrics) 23 | { 24 | this.ActionInfo = actionInfo; 25 | this.performanceMetrics = metrics; 26 | } 27 | 28 | #region Member Variables 29 | 30 | private List performanceMetrics; 31 | 32 | #endregion 33 | 34 | 35 | #region Properties and Methods 36 | 37 | /// 38 | /// An ActionInfo object which describes the controller action the metrics contained in this object apply to 39 | /// 40 | public ActionInfo ActionInfo { get; private set; } 41 | 42 | 43 | /// 44 | /// Gets a list of all the Performance metrics associated with the ActionInfo in this contianer 45 | /// 46 | /// A List of PerformanceMetricBase objects 47 | public List GetPerformanceMetrics() 48 | { 49 | return this.performanceMetrics.ToList(); 50 | } 51 | 52 | 53 | /// 54 | /// Calls the Dispose() method on all the PerformaneMetricBase objects. This only 55 | /// gets called when the application exits 56 | /// 57 | internal void DisposePerformanceMetrics() 58 | { 59 | foreach (PerformanceMetricBase metric in this.performanceMetrics) 60 | { 61 | metric.Dispose(); 62 | } 63 | } 64 | 65 | #endregion 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AspNetPerformance/PerformanceMetricFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using AspNetPerformance.Metrics; 6 | using System.Diagnostics; 7 | 8 | 9 | namespace AspNetPerformance 10 | { 11 | 12 | 13 | /// 14 | /// Factory class 15 | /// 16 | public static class PerformanceMetricFactory 17 | { 18 | 19 | #region Static Variables 20 | 21 | /// 22 | /// Dictionry of all the metrics that have been created through the life of the application 23 | /// 24 | private static Dictionary performanceMetrics; 25 | 26 | /// 27 | /// List of Custom Metrics that have been registered by the app to 28 | /// 29 | private static List> customMetrics; 30 | 31 | /// 32 | /// Object used for locking when we check to see if an ActionInfo already has its metrics created 33 | /// 34 | private static Object lockObject; 35 | 36 | #endregion 37 | 38 | 39 | static PerformanceMetricFactory() 40 | { 41 | performanceMetrics = new Dictionary(); 42 | customMetrics = new List>(); 43 | lockObject = new Object(); 44 | } 45 | 46 | 47 | /// 48 | /// Gets a List of performance metrics that will be measured on the action whose data is 49 | /// represented by the given action info 50 | /// 51 | /// An ActionInfo object that contains info about the action whose performance 52 | /// is being measured 53 | /// A List of PerformanceMetricBase objects of the metrics to be measured on this action 54 | public static List GetPerformanceMetrics(ActionInfo info) 55 | { 56 | if (performanceMetrics.ContainsKey(info) == false) 57 | { 58 | lock (lockObject) 59 | { 60 | // Check Again 61 | if (performanceMetrics.ContainsKey(info) == false) 62 | { 63 | List metrics = CreateMetricsForAction(info); 64 | PerformanceMetricContainer pmc = new PerformanceMetricContainer(info, metrics); 65 | performanceMetrics.Add(info, pmc); 66 | } 67 | } 68 | } 69 | 70 | return performanceMetrics[info].GetPerformanceMetrics(); 71 | } 72 | 73 | 74 | 75 | private static List CreateMetricsForAction(ActionInfo actionInfo) 76 | { 77 | List metrics = new List(); 78 | 79 | // Add the standard metrics 80 | metrics.Add(new DeltaCallsMetric(actionInfo)); 81 | metrics.Add(new TimerForEachRequestMetric(actionInfo)); 82 | metrics.Add(new ActiveRequestsMetric(actionInfo)); 83 | metrics.Add(new LastCallElapsedTimeMetric(actionInfo)); 84 | metrics.Add(new DeltaExceptionsThrownMetric(actionInfo)); 85 | metrics.Add(new PostAndPutRequestSizeMetric(actionInfo)); 86 | 87 | // Now add any custom metrics the user may have added 88 | foreach (var x in customMetrics) 89 | { 90 | PerformanceMetricBase customMetric = x(); 91 | metrics.Add(customMetric); 92 | } 93 | 94 | return metrics; 95 | } 96 | 97 | 98 | 99 | 100 | 101 | public static void AddCustomPerformanceMetric(Func customMetricCreator) 102 | { 103 | customMetrics.Add(customMetricCreator); 104 | } 105 | 106 | 107 | 108 | /// 109 | /// Method to clean up the performance counters on application exit 110 | /// 111 | /// 112 | /// This method should only be called on application exit 113 | /// 114 | public static void CleanupPerformanceMetrics() 115 | { 116 | // We'll make sure no one is trying to add while we are doing this, but should not 117 | // really be an issue 118 | lock (lockObject) 119 | { 120 | foreach (var pmc in performanceMetrics.Values) 121 | { 122 | pmc.DisposePerformanceMetrics(); 123 | } 124 | 125 | performanceMetrics.Clear(); 126 | PerformanceCounter.CloseSharedResources(); 127 | } 128 | } 129 | 130 | } 131 | 132 | 133 | 134 | 135 | } 136 | -------------------------------------------------------------------------------- /AspNetPerformance/PerformanceTracker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Diagnostics; 6 | using AspNetPerformance.Metrics; 7 | using System.Threading.Tasks; 8 | 9 | 10 | namespace AspNetPerformance 11 | { 12 | 13 | /// 14 | /// TODO: Update summary. 15 | /// 16 | public class PerformanceTracker 17 | { 18 | 19 | public PerformanceTracker(ActionInfo info) 20 | { 21 | this.actionInfo = info; 22 | } 23 | 24 | 25 | #region Member Variables 26 | 27 | /// 28 | /// Hold info about the action being tracked 29 | /// 30 | private ActionInfo actionInfo; 31 | 32 | /// 33 | /// Stopwatch to time how long the action took 34 | /// 35 | private Stopwatch stopwatch; 36 | 37 | /// 38 | /// Collection of all the performance metrics to be tracked 39 | /// 40 | private List performanceMetrics; 41 | 42 | #endregion 43 | 44 | 45 | internal void ProcessActionStart() 46 | { 47 | try 48 | { 49 | // Use the factory class to get all of the performance metrics that are being tracked 50 | // for MVC Actions 51 | this.performanceMetrics = PerformanceMetricFactory.GetPerformanceMetrics(actionInfo); 52 | 53 | // Iterate through each metric and call the OnActionStart() method 54 | // Start off a task to do this so it can it does not block and minimized impact to the user 55 | Task t = Task.Factory.StartNew(() => 56 | { 57 | foreach (PerformanceMetricBase m in this.performanceMetrics) 58 | { 59 | m.OnActionStart(); 60 | } 61 | }); 62 | 63 | this.stopwatch = Stopwatch.StartNew(); 64 | } 65 | catch (Exception ex) 66 | { 67 | String message = String.Format("Exception {0} occurred PerformanceTracker.ProcessActionStart(). Message {1}\nStackTrace {0}", 68 | ex.GetType().FullName, ex.Message, ex.StackTrace); 69 | Trace.WriteLine(message); 70 | } 71 | } 72 | 73 | 74 | 75 | internal void ProcessActionComplete(bool unhandledExceptionFlag) 76 | { 77 | try 78 | { 79 | // Stop the stopwatch 80 | this.stopwatch.Stop(); 81 | 82 | // Iterate through each metric and call the OnActionComplete() method 83 | // Start off a task to do this so it can it does not block and minimized impact to the user 84 | Task t = Task.Factory.StartNew(() => 85 | { 86 | foreach (PerformanceMetricBase m in this.performanceMetrics) 87 | { 88 | m.OnActionComplete(this.stopwatch.ElapsedTicks, unhandledExceptionFlag); 89 | } 90 | }); 91 | } 92 | catch (Exception ex) 93 | { 94 | String message = String.Format("Exception {0} occurred PerformanceTracker.ProcessActionComplete(). Message {1}\nStackTrace {0}", 95 | ex.GetType().FullName, ex.Message, ex.StackTrace); 96 | Trace.WriteLine(message); 97 | } 98 | } 99 | 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /AspNetPerformance/ProjectOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("AspNetPerformance.Test")] 4 | -------------------------------------------------------------------------------- /AspNetPerformance/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AspNetPerformance")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("AspNetPerformance")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9e7a9c60-92ad-48fc-a8c6-dd79c1aa434d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /AspNetPerformance/WebApiPerformanceAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Http.Filters; 6 | using System.Web.Http.Controllers; 7 | using System.Diagnostics; 8 | using System.Net.Http; 9 | using System.Web; 10 | using AspNetPerformance.Metrics; 11 | 12 | namespace AspNetPerformance 13 | { 14 | 15 | 16 | /// 17 | /// Action Filter used to track performance on WebAPI applications 18 | /// 19 | public class WebApiPerformanceAttribute : ActionFilterAttribute 20 | { 21 | 22 | /// 23 | /// Constant to identify WebAPI Action Types (used in the instane name) 24 | /// 25 | public const String ACTION_TYPE = "API"; 26 | 27 | 28 | /// 29 | /// Method that runs before the Web API action is invoked 30 | /// 31 | /// An HttpActionContext with info about the action that is executing 32 | public override void OnActionExecuting(HttpActionContext actionContext) 33 | { 34 | // First thing is to check if performance is enabled globally 35 | if (ConfigInfo.Value.PerformanceEnabled == false) 36 | { 37 | return; 38 | } 39 | 40 | // Second thing is to check if performance tracking has been turned off for this action 41 | // If the DoNotTrackAttribute is present, then we set a flag not to track performance and return 42 | HttpActionDescriptor actionDescriptor = actionContext.ActionDescriptor; 43 | if ( actionDescriptor.GetCustomAttributes().Count > 0 44 | || actionDescriptor.ControllerDescriptor.GetCustomAttributes().Count > 0 ) 45 | { 46 | return; 47 | } 48 | 49 | // ActionInfo encapsulates all the info about the action being invoked 50 | ActionInfo info = this.CreateActionInfo(actionContext); 51 | 52 | // PerformanceTracker is the object that tracks performance and is attached to the request 53 | PerformanceTracker tracker = new PerformanceTracker(info); 54 | 55 | // Store this on the request 56 | actionContext.Request.Properties.Add(this.GetType().FullName, tracker); 57 | 58 | // Process the action start - this is what starts the timer and increments any 59 | // required counters before the action executes 60 | tracker.ProcessActionStart(); 61 | } 62 | 63 | 64 | /// 65 | /// Method that executes after the WebAPI action has completed 66 | /// 67 | /// An HttpActionExecutedContext object with info about the action that just executed 68 | public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext) 69 | { 70 | String key = this.GetType().FullName; 71 | 72 | // Check the request properties for the PerformanceTracker object. If it does not exist 73 | // then performance isn't being tracked on this action, so just return 74 | if (actionExecutedContext.Request.Properties.ContainsKey(key) == false) 75 | { 76 | return; 77 | } 78 | 79 | // Get the PerformanceTrcker object 80 | PerformanceTracker tracker = actionExecutedContext.Request.Properties[key] as PerformanceTracker; 81 | 82 | // Make sure the object isn't null (failed cast). ProcessActionComplete stops the stopwach 83 | // and updates the performance counters 84 | if (tracker != null) 85 | { 86 | bool exceptionThrown = (actionExecutedContext.Exception != null); 87 | tracker.ProcessActionComplete(exceptionThrown); 88 | } 89 | } 90 | 91 | 92 | /// 93 | /// Helper method to create the ActionInfo object containing the info about the action that is getting called 94 | /// 95 | /// The HttpActionContext from the OnActionExecuting() method 96 | /// 97 | private ActionInfo CreateActionInfo(HttpActionContext actionContext) 98 | { 99 | var parameters = actionContext.ActionDescriptor.GetParameters().Select(p => p.ParameterName); 100 | String parameterString = String.Join(",", parameters); 101 | 102 | int processId = ConfigInfo.Value.ProcessId; 103 | String controllerName = actionContext.ControllerContext.ControllerDescriptor.ControllerName; 104 | String actionName = actionContext.ActionDescriptor.ActionName; 105 | String httpMethod = HttpContext.Current.Request.HttpMethod; 106 | int contentLength = HttpContext.Current.Request.ContentLength; 107 | 108 | ActionInfo info = new ActionInfo(processId, ACTION_TYPE, 109 | controllerName, actionName, httpMethod, parameterString,contentLength); 110 | 111 | return info; 112 | } 113 | 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /AspNetPerformance/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /MvcMusicStore.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcMusicStore", "MvcMusicStore\MvcMusicStore.csproj", "{32DCD27D-A84C-4250-B657-408B3620A9AC}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetPerformance", "AspNetPerformance\AspNetPerformance.csproj", "{6AA65092-026A-4F6A-9F82-180F11993A3A}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {32DCD27D-A84C-4250-B657-408B3620A9AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {32DCD27D-A84C-4250-B657-408B3620A9AC}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {32DCD27D-A84C-4250-B657-408B3620A9AC}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {32DCD27D-A84C-4250-B657-408B3620A9AC}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {6AA65092-026A-4F6A-9F82-180F11993A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {6AA65092-026A-4F6A-9F82-180F11993A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {6AA65092-026A-4F6A-9F82-180F11993A3A}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {6AA65092-026A-4F6A-9F82-180F11993A3A}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /MvcMusicStore/App_Data/ASPNETDB.MDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/App_Data/ASPNETDB.MDF -------------------------------------------------------------------------------- /MvcMusicStore/App_Data/MvcMusicStore.sdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/App_Data/MvcMusicStore.sdf -------------------------------------------------------------------------------- /MvcMusicStore/App_Data/aspnetdb_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/App_Data/aspnetdb_log.ldf -------------------------------------------------------------------------------- /MvcMusicStore/Content/Images/home-showcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/Images/home-showcase.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/Images/logo.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/Images/placeholder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/Images/placeholder.gif -------------------------------------------------------------------------------- /MvcMusicStore/Content/Site.css: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | margin: 0px; 4 | padding: 0px; 5 | border: none; 6 | } 7 | 8 | body 9 | { 10 | font-family: Arial, Helvetica, sans-serif; 11 | font-size: 14px; 12 | background-color: #FBF9EF; 13 | padding: 0px 6%; 14 | } 15 | 16 | #container 17 | { 18 | float: left; 19 | } 20 | 21 | #header 22 | { 23 | float: left; 24 | width: 100%; 25 | border-bottom: 1px dotted #5D5A53; 26 | margin-bottom: 10px; 27 | } 28 | 29 | #header h1 30 | { 31 | font-size: 18px; 32 | float: left; 33 | background: url(/content/Images/logo.png) no-repeat; 34 | padding: 45px 0px 5px 0px; 35 | } 36 | 37 | #promotion 38 | { 39 | height: 300px; 40 | width: 700px; 41 | background: url(/content/Images/home-showcase.png) no-repeat; 42 | } 43 | 44 | ul li a 45 | { 46 | font-size: 16px; 47 | } 48 | 49 | #main 50 | { 51 | overflow: hidden; 52 | padding: 0 0 15px 10px; 53 | float: left; 54 | } 55 | 56 | ul 57 | { 58 | list-style-type: square; 59 | margin-left: 25px; 60 | font-size: 14px; 61 | } 62 | 63 | ul#album-list 64 | { 65 | list-style: none; 66 | margin-left: 0px; 67 | } 68 | 69 | ul#album-list li 70 | { 71 | height: 130px; 72 | width: 100px; 73 | float: left; 74 | margin: 10px; 75 | text-align: center; 76 | } 77 | 78 | ul#album-list li a, ul#album-list li .button 79 | { 80 | font-size: 13px; 81 | float: left; 82 | } 83 | 84 | ul#album-list li a span 85 | { 86 | color: #9b9993; 87 | text-decoration: underline; 88 | } 89 | 90 | #cart 91 | { 92 | float: right; 93 | } 94 | 95 | #update-message 96 | { 97 | color: #F6855E; 98 | font-weight: bold; 99 | } 100 | 101 | .button, input[type=submit] 102 | { 103 | clear: both; 104 | display: inline-block; 105 | padding: 5px; 106 | margin-top: 10px; 107 | border: 1px; 108 | background: #5e5b54; 109 | color: #fff; 110 | font-weight: bold; 111 | } 112 | 113 | .button a 114 | { 115 | color: #fff !important; 116 | } 117 | 118 | #footer 119 | { 120 | clear: both; 121 | padding: 10px; 122 | text-align: right; 123 | border-top: 1px dotted #8A8575; 124 | border-bottom: 1px dotted #8A8575; 125 | font-family: Constantia, Georgia, serif; 126 | } 127 | 128 | /******************** Top Navigation ************************/ 129 | ul#navlist 130 | { 131 | float: right; 132 | } 133 | 134 | ul#navlist li 135 | { 136 | display: inline; 137 | } 138 | 139 | ul#navlist li a 140 | { 141 | border-left: 1px dotted #8A8575; 142 | padding: 10px; 143 | margin-top: 10px; 144 | color: #8A8575; 145 | text-decoration: none; 146 | float: left; 147 | } 148 | 149 | ul#navlist li:first-child a 150 | { 151 | border: none; 152 | } 153 | 154 | ul#navlist li a:hover 155 | { 156 | color: #F6855E; 157 | } 158 | 159 | /********************* End top navigation ***************************/ 160 | 161 | p 162 | { 163 | margin-bottom: 15px; 164 | margin-top: 0px; 165 | } 166 | 167 | h2 168 | { 169 | color: #5e5b54; 170 | } 171 | 172 | h2, h3 173 | { 174 | margin-bottom: 10px; 175 | font-size: 16px; 176 | font-style: italic; 177 | font-weight: bold; 178 | } 179 | 180 | h3 181 | { 182 | color: #9B9993; 183 | } 184 | 185 | #header h1 a, h3 em 186 | { 187 | color: #5E5B54; 188 | } 189 | 190 | a:link, a:visited 191 | { 192 | color: #F6855E; 193 | text-decoration: none; 194 | font-weight: bold; 195 | } 196 | 197 | a:hover 198 | { 199 | color: #333333; 200 | text-decoration: none; 201 | font-weight: bold; 202 | } 203 | 204 | a:active 205 | { 206 | color: #006633; 207 | text-decoration: none; 208 | font-weight: bold; 209 | } 210 | 211 | /***************************** sidebar navigation ****************************/ 212 | 213 | #categories 214 | { 215 | font-family: Constantia, Georgia, serif; 216 | list-style-type: none; 217 | border-right: #5d5a53 1px dotted; 218 | padding-right: 10px; 219 | margin: 0 25px 0 0; 220 | float: left; 221 | } 222 | 223 | #categories a:link, #categories a:visited 224 | { 225 | color: #9B9993; 226 | text-decoration: none; 227 | } 228 | 229 | #categories a:hover 230 | { 231 | color: #F46739; 232 | } 233 | 234 | div#album-details p 235 | { 236 | margin-bottom: 5px; 237 | color: #5e5b54; 238 | font-weight: bold; 239 | } 240 | 241 | p em 242 | { 243 | color: #9b9993; 244 | } 245 | 246 | /* Form styles */ 247 | legend 248 | { 249 | padding: 10px; 250 | font-weight: bold; 251 | } 252 | 253 | fieldset 254 | { 255 | border: #9b9993 1px solid; 256 | padding: 0 10px; 257 | margin-bottom: 10px; 258 | clear: left; 259 | } 260 | 261 | div.editor-field 262 | { 263 | margin-bottom: 10px; 264 | } 265 | 266 | input[type=text], input[type=password], select 267 | { 268 | border: 1px solid #8A8575; 269 | width: 300px; 270 | } 271 | 272 | /* Styles for validation helpers */ 273 | .field-validation-error { 274 | color: #ff0000; 275 | } 276 | 277 | .field-validation-valid { 278 | display: none; 279 | } 280 | 281 | .input-validation-error { 282 | border: 1px solid #ff0000; 283 | background-color: #ffeeee; 284 | } 285 | 286 | .validation-summary-errors { 287 | font-weight: bold; 288 | color: #ff0000; 289 | } 290 | 291 | .validation-summary-valid { 292 | display: none; 293 | } 294 | 295 | /* Tables */ 296 | table 297 | { 298 | border: 1px solid #000; 299 | border-collapse: collapse; 300 | color: #666666; 301 | min-width: 500px; 302 | width: 100%; 303 | } 304 | 305 | tr 306 | { 307 | border: 1px solid #000; 308 | line-height: 25px; 309 | } 310 | 311 | th 312 | { 313 | background-color: #9b9993; 314 | color: #000; 315 | font-size: 13px; 316 | text-align: left; 317 | } 318 | 319 | th, td 320 | { 321 | padding-left: 5px; 322 | } 323 | 324 | tr:hover 325 | { 326 | background-color: #fff; 327 | } -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/MvcMusicStore/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.accordion.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Accordion 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Accordion#theming 14 | */ 15 | /* IE/Win - Fix animation bug - #4615 */ 16 | .ui-accordion { width: 100%; } 17 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 18 | .ui-accordion .ui-accordion-li-fix { display: inline; } 19 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 20 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 21 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 22 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 23 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 24 | .ui-accordion .ui-accordion-content-active { display: block; } 25 | -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.all.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI CSS Framework 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Theming 14 | */ 15 | @import "jquery.ui.base.css"; 16 | @import "jquery.ui.theme.css"; 17 | -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.autocomplete.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Autocomplete 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * http://docs.jquery.com/UI/Autocomplete#theming 13 | */ 14 | .ui-autocomplete { position: absolute; cursor: default; } 15 | 16 | /* workarounds */ 17 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 18 | 19 | /* 20 | * Note: While Microsoft is not the author of this file, Microsoft is 21 | * offering you a license subject to the terms of the Microsoft Software 22 | * License Terms for Microsoft ASP.NET Model View Controller 3. 23 | * Microsoft reserves all other rights. The notices below are provided 24 | * for informational purposes only and are not the license terms under 25 | * which Microsoft distributed this file. 26 | * 27 | * jQuery UI Menu 1.8.11 28 | * 29 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 30 | * 31 | * http://docs.jquery.com/UI/Menu#theming 32 | */ 33 | .ui-menu { 34 | list-style:none; 35 | padding: 2px; 36 | margin: 0; 37 | display:block; 38 | float: left; 39 | } 40 | .ui-menu .ui-menu { 41 | margin-top: -3px; 42 | } 43 | .ui-menu .ui-menu-item { 44 | margin:0; 45 | padding: 0; 46 | zoom: 1; 47 | float: left; 48 | clear: left; 49 | width: 100%; 50 | } 51 | .ui-menu .ui-menu-item a { 52 | text-decoration:none; 53 | display:block; 54 | padding:.2em .4em; 55 | line-height:1.5; 56 | zoom:1; 57 | } 58 | .ui-menu .ui-menu-item a.ui-state-hover, 59 | .ui-menu .ui-menu-item a.ui-state-active { 60 | font-weight: normal; 61 | margin: -1px; 62 | } 63 | -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.base.css: -------------------------------------------------------------------------------- 1 | @import url("jquery.ui.core.css"); 2 | @import url("jquery.ui.resizable.css"); 3 | @import url("jquery.ui.selectable.css"); 4 | @import url("jquery.ui.accordion.css"); 5 | @import url("jquery.ui.autocomplete.css"); 6 | @import url("jquery.ui.button.css"); 7 | @import url("jquery.ui.dialog.css"); 8 | @import url("jquery.ui.slider.css"); 9 | @import url("jquery.ui.tabs.css"); 10 | @import url("jquery.ui.datepicker.css"); 11 | @import url("jquery.ui.progressbar.css"); -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.button.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Button 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Button#theming 14 | */ 15 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 16 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 17 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 18 | .ui-button-icons-only { width: 3.4em; } 19 | button.ui-button-icons-only { width: 3.7em; } 20 | 21 | /*button text element */ 22 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 23 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 24 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 25 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 26 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } 27 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 28 | /* no icon support for input elements, provide padding by default */ 29 | input.ui-button { padding: .4em 1em; } 30 | 31 | /*button icon element(s) */ 32 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 33 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 34 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 35 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 36 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 37 | 38 | /*button sets*/ 39 | .ui-buttonset { margin-right: 7px; } 40 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 41 | 42 | /* workarounds */ 43 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 44 | -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.core.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI CSS Framework 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Theming/API 14 | */ 15 | 16 | /* Layout helpers 17 | ----------------------------------*/ 18 | .ui-helper-hidden { display: none; } 19 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } 20 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 21 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 22 | .ui-helper-clearfix { display: inline-block; } 23 | /* required comment for clearfix to work in Opera \*/ 24 | * html .ui-helper-clearfix { height:1%; } 25 | .ui-helper-clearfix { display:block; } 26 | /* end clearfix */ 27 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 28 | 29 | 30 | /* Interaction Cues 31 | ----------------------------------*/ 32 | .ui-state-disabled { cursor: default !important; } 33 | 34 | 35 | /* Icons 36 | ----------------------------------*/ 37 | 38 | /* states and images */ 39 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 40 | 41 | 42 | /* Misc visuals 43 | ----------------------------------*/ 44 | 45 | /* Overlays */ 46 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 47 | -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.datepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Datepicker 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Datepicker#theming 14 | */ 15 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } 16 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 17 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 18 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 19 | .ui-datepicker .ui-datepicker-prev { left:2px; } 20 | .ui-datepicker .ui-datepicker-next { right:2px; } 21 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 22 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 23 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 24 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 25 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 26 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 27 | .ui-datepicker select.ui-datepicker-month, 28 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 29 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 30 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 31 | .ui-datepicker td { border: 0; padding: 1px; } 32 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 33 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 34 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 35 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 36 | 37 | /* with multiple calendars */ 38 | .ui-datepicker.ui-datepicker-multi { width:auto; } 39 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 40 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 41 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 42 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 43 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 44 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 45 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 46 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 47 | .ui-datepicker-row-break { clear:both; width:100%; } 48 | 49 | /* RTL support */ 50 | .ui-datepicker-rtl { direction: rtl; } 51 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 52 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 53 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 54 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 55 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 56 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 57 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 58 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 59 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 60 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 61 | 62 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 63 | .ui-datepicker-cover { 64 | display: none; /*sorry for IE5*/ 65 | display/**/: block; /*sorry for IE5*/ 66 | position: absolute; /*must have*/ 67 | z-index: -1; /*must have*/ 68 | filter: mask(); /*must have*/ 69 | top: -4px; /*must have*/ 70 | left: -4px; /*must have*/ 71 | width: 200px; /*must have*/ 72 | height: 200px; /*must have*/ 73 | } -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.dialog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Dialog 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Dialog#theming 14 | */ 15 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 16 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } 17 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 18 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 19 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 20 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 21 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 22 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 23 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 24 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 25 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 26 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 27 | -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.progressbar.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Progressbar 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Progressbar#theming 14 | */ 15 | .ui-progressbar { height:2em; text-align: left; } 16 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.resizable.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Resizable 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)] 12 | * 13 | * http://docs.jquery.com/UI/Resizable#theming 14 | */ 15 | .ui-resizable { position: relative;} 16 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} 17 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 18 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 19 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 20 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 21 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 22 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 23 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 24 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 25 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.selectable.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Selectable 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Selectable#theming 14 | */ 15 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 16 | -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.slider.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Slider 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Slider#theming 14 | */ 15 | .ui-slider { position: relative; text-align: left; } 16 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 17 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 18 | 19 | .ui-slider-horizontal { height: .8em; } 20 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 21 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 22 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 23 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 24 | 25 | .ui-slider-vertical { width: .8em; height: 100px; } 26 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 27 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 28 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 29 | .ui-slider-vertical .ui-slider-range-max { top: 0; } -------------------------------------------------------------------------------- /MvcMusicStore/Content/themes/base/jquery.ui.tabs.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Note: While Microsoft is not the author of this file, Microsoft is 3 | * offering you a license subject to the terms of the Microsoft Software 4 | * License Terms for Microsoft ASP.NET Model View Controller 3. 5 | * Microsoft reserves all other rights. The notices below are provided 6 | * for informational purposes only and are not the license terms under 7 | * which Microsoft distributed this file. 8 | * 9 | * jQuery UI Tabs 1.8.11 10 | * 11 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 12 | * 13 | * http://docs.jquery.com/UI/Tabs#theming 14 | */ 15 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 16 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 17 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 18 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 19 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 20 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 21 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 22 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 23 | .ui-tabs .ui-tabs-hide { display: none !important; } 24 | -------------------------------------------------------------------------------- /MvcMusicStore/Controllers/CheckoutController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | using MvcMusicStore.Models; 5 | 6 | namespace MvcMusicStore.Controllers 7 | { 8 | [Authorize] 9 | public class CheckoutController : Controller 10 | { 11 | MusicStoreEntities storeDB = new MusicStoreEntities(); 12 | const string PromoCode = "FREE"; 13 | 14 | // 15 | // GET: /Checkout/AddressAndPayment 16 | 17 | public ActionResult AddressAndPayment() 18 | { 19 | return View(); 20 | } 21 | 22 | // 23 | // POST: /Checkout/AddressAndPayment 24 | 25 | [HttpPost] 26 | public ActionResult AddressAndPayment(FormCollection values) 27 | { 28 | var order = new Order(); 29 | TryUpdateModel(order); 30 | 31 | try 32 | { 33 | if (string.Equals(values["PromoCode"], PromoCode, 34 | StringComparison.OrdinalIgnoreCase) == false) 35 | { 36 | return View(order); 37 | } 38 | else 39 | { 40 | order.Username = User.Identity.Name; 41 | order.OrderDate = DateTime.Now; 42 | 43 | //Save Order 44 | storeDB.Orders.Add(order); 45 | storeDB.SaveChanges(); 46 | 47 | //Process the order 48 | var cart = ShoppingCart.GetCart(this.HttpContext); 49 | cart.CreateOrder(order); 50 | 51 | return RedirectToAction("Complete", 52 | new { id = order.OrderId }); 53 | } 54 | 55 | } 56 | catch 57 | { 58 | //Invalid - redisplay with errors 59 | return View(order); 60 | } 61 | } 62 | 63 | // 64 | // GET: /Checkout/Complete 65 | 66 | public ActionResult Complete(int id) 67 | { 68 | // Validate customer owns this order 69 | bool isValid = storeDB.Orders.Any( 70 | o => o.OrderId == id && 71 | o.Username == User.Identity.Name); 72 | 73 | if (isValid) 74 | { 75 | return View(id); 76 | } 77 | else 78 | { 79 | return View("Error"); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /MvcMusicStore/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | using MvcMusicStore.Models; 5 | using AspNetPerformance; 6 | 7 | namespace MvcMusicStore.Controllers 8 | { 9 | 10 | public class HomeController : Controller 11 | { 12 | // 13 | // GET: /Home/ 14 | 15 | MusicStoreEntities storeDB = new MusicStoreEntities(); 16 | 17 | [MvcPerformance] 18 | public ActionResult Index() 19 | { 20 | // Get most popular albums 21 | var albums = GetTopSellingAlbums(5); 22 | 23 | return View(albums); 24 | } 25 | 26 | private List GetTopSellingAlbums(int count) 27 | { 28 | // Group the order details by album and return 29 | // the albums with the highest count 30 | //return new List(); 31 | return storeDB.Albums 32 | .OrderByDescending(a => a.OrderDetails.Count()) 33 | .Take(count) 34 | .ToList(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /MvcMusicStore/Controllers/ShoppingCartController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Web.Mvc; 3 | using MvcMusicStore.Models; 4 | using MvcMusicStore.ViewModels; 5 | 6 | namespace MvcMusicStore.Controllers 7 | { 8 | public class ShoppingCartController : Controller 9 | { 10 | MusicStoreEntities storeDB = new MusicStoreEntities(); 11 | 12 | // 13 | // GET: /ShoppingCart/ 14 | 15 | public ActionResult Index() 16 | { 17 | var cart = ShoppingCart.GetCart(this.HttpContext); 18 | 19 | // Set up our ViewModel 20 | var viewModel = new ShoppingCartViewModel 21 | { 22 | CartItems = cart.GetCartItems(), 23 | CartTotal = cart.GetTotal() 24 | }; 25 | 26 | // Return the view 27 | return View(viewModel); 28 | } 29 | 30 | // 31 | // GET: /Store/AddToCart/5 32 | 33 | public ActionResult AddToCart(int id) 34 | { 35 | 36 | // Retrieve the album from the database 37 | var addedAlbum = storeDB.Albums 38 | .Single(album => album.AlbumId == id); 39 | 40 | // Add it to the shopping cart 41 | var cart = ShoppingCart.GetCart(this.HttpContext); 42 | 43 | cart.AddToCart(addedAlbum); 44 | 45 | // Go back to the main store page for more shopping 46 | return RedirectToAction("Index"); 47 | } 48 | 49 | // 50 | // AJAX: /ShoppingCart/RemoveFromCart/5 51 | 52 | [HttpPost] 53 | public ActionResult RemoveFromCart(int id) 54 | { 55 | // Remove the item from the cart 56 | var cart = ShoppingCart.GetCart(this.HttpContext); 57 | 58 | // Get the name of the album to display confirmation 59 | string albumName = storeDB.Carts 60 | .Single(item => item.RecordId == id).Album.Title; 61 | 62 | // Remove from cart 63 | int itemCount = cart.RemoveFromCart(id); 64 | 65 | // Display the confirmation message 66 | var results = new ShoppingCartRemoveViewModel 67 | { 68 | Message = Server.HtmlEncode(albumName) + 69 | " has been removed from your shopping cart.", 70 | CartTotal = cart.GetTotal(), 71 | CartCount = cart.GetCount(), 72 | ItemCount = itemCount, 73 | DeleteId = id 74 | }; 75 | 76 | return Json(results); 77 | } 78 | 79 | // 80 | // GET: /ShoppingCart/CartSummary 81 | 82 | [ChildActionOnly] 83 | public ActionResult CartSummary() 84 | { 85 | var cart = ShoppingCart.GetCart(this.HttpContext); 86 | 87 | ViewData["CartCount"] = cart.GetCount(); 88 | 89 | return PartialView("CartSummary"); 90 | } 91 | } 92 | } -------------------------------------------------------------------------------- /MvcMusicStore/Controllers/StoreController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using MvcMusicStore.Models; 7 | using AspNetPerformance; 8 | 9 | namespace MvcMusicStore.Controllers 10 | { 11 | public class StoreController : Controller 12 | { 13 | MusicStoreEntities storeDB = new MusicStoreEntities(); 14 | 15 | // 16 | // GET: /Store/ 17 | 18 | public ActionResult Index() 19 | { 20 | var genres = storeDB.Genres.ToList(); 21 | 22 | return View(genres); 23 | } 24 | 25 | // 26 | // GET: /Store/Browse?genre=Disco 27 | 28 | public ActionResult Browse(string genre) 29 | { 30 | // Retrieve Genre and its Associated Albums from database 31 | var genreModel = storeDB.Genres.Include("Albums") 32 | .Single(g => g.Name == genre); 33 | 34 | return View(genreModel); 35 | } 36 | 37 | // 38 | // GET: /Store/Details/5 39 | [MvcPerformanceAttribute] 40 | public ActionResult Details(int id) 41 | { 42 | var album = storeDB.Albums.Find(id); 43 | 44 | return View(album); 45 | } 46 | 47 | // 48 | // GET: /Store/GenreMenu 49 | 50 | [ChildActionOnly] 51 | public ActionResult GenreMenu() 52 | { 53 | var genres = storeDB.Genres.ToList(); 54 | 55 | return PartialView(genres); 56 | } 57 | 58 | } 59 | } -------------------------------------------------------------------------------- /MvcMusicStore/Controllers/StoreManagerController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data; 4 | using System.Data.Entity; 5 | using System.Linq; 6 | using System.Web; 7 | using System.Web.Mvc; 8 | using MvcMusicStore.Models; 9 | 10 | namespace MvcMusicStore.Controllers 11 | { 12 | [Authorize(Roles = "Administrator")] 13 | public class StoreManagerController : Controller 14 | { 15 | private MusicStoreEntities db = new MusicStoreEntities(); 16 | 17 | // 18 | // GET: /StoreManager/ 19 | 20 | public ViewResult Index() 21 | { 22 | var albums = db.Albums.Include(a => a.Genre).Include(a => a.Artist); 23 | return View(albums.ToList()); 24 | } 25 | 26 | // 27 | // GET: /StoreManager/Details/5 28 | 29 | public ViewResult Details(int id) 30 | { 31 | Album album = db.Albums.Find(id); 32 | return View(album); 33 | } 34 | 35 | // 36 | // GET: /StoreManager/Create 37 | 38 | public ActionResult Create() 39 | { 40 | ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name"); 41 | ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name"); 42 | return View(); 43 | } 44 | 45 | // 46 | // POST: /StoreManager/Create 47 | 48 | [HttpPost] 49 | public ActionResult Create(Album album) 50 | { 51 | if (ModelState.IsValid) 52 | { 53 | db.Albums.Add(album); 54 | db.SaveChanges(); 55 | return RedirectToAction("Index"); 56 | } 57 | 58 | ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId); 59 | ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId); 60 | return View(album); 61 | } 62 | 63 | // 64 | // GET: /StoreManager/Edit/5 65 | 66 | public ActionResult Edit(int id) 67 | { 68 | Album album = db.Albums.Find(id); 69 | ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId); 70 | ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId); 71 | return View(album); 72 | } 73 | 74 | // 75 | // POST: /StoreManager/Edit/5 76 | 77 | [HttpPost] 78 | public ActionResult Edit(Album album) 79 | { 80 | if (ModelState.IsValid) 81 | { 82 | db.Entry(album).State = EntityState.Modified; 83 | db.SaveChanges(); 84 | return RedirectToAction("Index"); 85 | } 86 | ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId); 87 | ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name", album.ArtistId); 88 | return View(album); 89 | } 90 | 91 | // 92 | // GET: /StoreManager/Delete/5 93 | 94 | public ActionResult Delete(int id) 95 | { 96 | Album album = db.Albums.Find(id); 97 | return View(album); 98 | } 99 | 100 | // 101 | // POST: /StoreManager/Delete/5 102 | 103 | [HttpPost, ActionName("Delete")] 104 | public ActionResult DeleteConfirmed(int id) 105 | { 106 | Album album = db.Albums.Find(id); 107 | db.Albums.Remove(album); 108 | db.SaveChanges(); 109 | return RedirectToAction("Index"); 110 | } 111 | 112 | protected override void Dispose(bool disposing) 113 | { 114 | db.Dispose(); 115 | base.Dispose(disposing); 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /MvcMusicStore/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="MvcMusicStore.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /MvcMusicStore/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | using AspNetPerformance; 8 | using Metrics; 9 | using Metrics.Reporters; 10 | 11 | namespace MvcMusicStore 12 | { 13 | 14 | public class MvcApplication : System.Web.HttpApplication 15 | { 16 | protected void Application_Start() 17 | { 18 | System.Data.Entity.Database.SetInitializer(new MvcMusicStore.Models.SampleData()); 19 | 20 | AreaRegistration.RegisterAllAreas(); 21 | 22 | RegisterGlobalFilters(GlobalFilters.Filters); 23 | RegisterRoutes(RouteTable.Routes); 24 | 25 | //Metric.Config 26 | // //.WithHttpEndpoint("http://localhost:1234/") 27 | // .WithAllCounters() 28 | // .WithReporting(config => config.WithCSVReports(@"c:\temp\csv", TimeSpan.FromSeconds(10)) 29 | // .WithTextFileReport(@"C:\temp\reports\metrics.txt", TimeSpan.FromSeconds(10))); 30 | } 31 | 32 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 33 | { 34 | filters.Add(new HandleErrorAttribute()); 35 | filters.Add(new MvcPerformanceAttribute()); 36 | } 37 | 38 | public static void RegisterRoutes(RouteCollection routes) 39 | { 40 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 41 | routes.IgnoreRoute("metrics/{*pathInfo}"); 42 | routes.MapRoute( 43 | "Default", // Route name 44 | "{controller}/{action}/{id}", // URL with parameters 45 | new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults 46 | ); 47 | 48 | } 49 | 50 | 51 | 52 | 53 | protected void Application_End() 54 | { 55 | //InstanceNameRegistry.RemovePerformanceCounterInstances(); 56 | PerformanceMetricFactory.CleanupPerformanceMetrics(); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /MvcMusicStore/Models/AccountModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Globalization; 5 | using System.Web.Mvc; 6 | using System.Web.Security; 7 | 8 | namespace Mvc3ToolsUpdateWeb_Default.Models 9 | { 10 | 11 | public class ChangePasswordModel 12 | { 13 | [Required] 14 | [DataType(DataType.Password)] 15 | [Display(Name = "Current password")] 16 | public string OldPassword { get; set; } 17 | 18 | [Required] 19 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 20 | [DataType(DataType.Password)] 21 | [Display(Name = "New password")] 22 | public string NewPassword { get; set; } 23 | 24 | [DataType(DataType.Password)] 25 | [Display(Name = "Confirm new password")] 26 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 27 | public string ConfirmPassword { get; set; } 28 | } 29 | 30 | public class LogOnModel 31 | { 32 | [Required] 33 | [Display(Name = "User name")] 34 | public string UserName { get; set; } 35 | 36 | [Required] 37 | [DataType(DataType.Password)] 38 | [Display(Name = "Password")] 39 | public string Password { get; set; } 40 | 41 | [Display(Name = "Remember me?")] 42 | public bool RememberMe { get; set; } 43 | } 44 | 45 | public class RegisterModel 46 | { 47 | [Required] 48 | [Display(Name = "User name")] 49 | public string UserName { get; set; } 50 | 51 | [Required] 52 | [DataType(DataType.EmailAddress)] 53 | [Display(Name = "Email address")] 54 | public string Email { get; set; } 55 | 56 | [Required] 57 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 58 | [DataType(DataType.Password)] 59 | [Display(Name = "Password")] 60 | public string Password { get; set; } 61 | 62 | [DataType(DataType.Password)] 63 | [Display(Name = "Confirm password")] 64 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 65 | public string ConfirmPassword { get; set; } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /MvcMusicStore/Models/Album.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Web.Mvc; 4 | using System.Collections.Generic; 5 | 6 | namespace MvcMusicStore.Models 7 | { 8 | [Bind(Exclude = "AlbumId")] 9 | public class Album 10 | { 11 | [ScaffoldColumn(false)] 12 | public int AlbumId { get; set; } 13 | 14 | [DisplayName("Genre")] 15 | public int GenreId { get; set; } 16 | 17 | [DisplayName("Artist")] 18 | public int ArtistId { get; set; } 19 | 20 | [Required(ErrorMessage = "An Album Title is required")] 21 | [StringLength(160)] 22 | public string Title { get; set; } 23 | 24 | [Required(ErrorMessage = "Price is required")] 25 | [Range(0.01, 100.00, 26 | ErrorMessage = "Price must be between 0.01 and 100.00")] 27 | public decimal Price { get; set; } 28 | 29 | [DisplayName("Album Art URL")] 30 | [StringLength(1024)] 31 | public string AlbumArtUrl { get; set; } 32 | 33 | public virtual Genre Genre { get; set; } 34 | public virtual Artist Artist { get; set; } 35 | public virtual List OrderDetails { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /MvcMusicStore/Models/Artist.cs: -------------------------------------------------------------------------------- 1 | namespace MvcMusicStore.Models 2 | { 3 | public class Artist 4 | { 5 | public int ArtistId { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /MvcMusicStore/Models/Cart.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace MvcMusicStore.Models 4 | { 5 | public class Cart 6 | { 7 | [Key] 8 | public int RecordId { get; set; } 9 | public string CartId { get; set; } 10 | public int AlbumId { get; set; } 11 | public int Count { get; set; } 12 | public System.DateTime DateCreated { get; set; } 13 | 14 | public virtual Album Album { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /MvcMusicStore/Models/Genre.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace MvcMusicStore.Models 4 | { 5 | public partial class Genre 6 | { 7 | public int GenreId { get; set; } 8 | public string Name { get; set; } 9 | public string Description { get; set; } 10 | public List Albums { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MvcMusicStore/Models/MusicStoreEntities.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | 3 | namespace MvcMusicStore.Models 4 | { 5 | public class MusicStoreEntities : DbContext 6 | { 7 | public DbSet Albums { get; set; } 8 | public DbSet Genres { get; set; } 9 | public DbSet Artists { get; set; } 10 | public DbSet Carts { get; set; } 11 | public DbSet Orders { get; set; } 12 | public DbSet OrderDetails { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /MvcMusicStore/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Web.Mvc; 5 | 6 | namespace MvcMusicStore.Models 7 | { 8 | [Bind(Exclude = "OrderId")] 9 | public partial class Order 10 | { 11 | [ScaffoldColumn(false)] 12 | public int OrderId { get; set; } 13 | 14 | [ScaffoldColumn(false)] 15 | public System.DateTime OrderDate { get; set; } 16 | 17 | [ScaffoldColumn(false)] 18 | public string Username { get; set; } 19 | 20 | [Required(ErrorMessage = "First Name is required")] 21 | [DisplayName("First Name")] 22 | [StringLength(160)] 23 | public string FirstName { get; set; } 24 | 25 | [Required(ErrorMessage = "Last Name is required")] 26 | [DisplayName("Last Name")] 27 | [StringLength(160)] 28 | public string LastName { get; set; } 29 | 30 | [Required(ErrorMessage = "Address is required")] 31 | [StringLength(70)] 32 | public string Address { get; set; } 33 | 34 | [Required(ErrorMessage = "City is required")] 35 | [StringLength(40)] 36 | public string City { get; set; } 37 | 38 | [Required(ErrorMessage = "State is required")] 39 | [StringLength(40)] 40 | public string State { get; set; } 41 | 42 | [Required(ErrorMessage = "Postal Code is required")] 43 | [DisplayName("Postal Code")] 44 | [StringLength(10)] 45 | public string PostalCode { get; set; } 46 | 47 | [Required(ErrorMessage = "Country is required")] 48 | [StringLength(40)] 49 | public string Country { get; set; } 50 | 51 | [Required(ErrorMessage = "Phone is required")] 52 | [StringLength(24)] 53 | public string Phone { get; set; } 54 | 55 | [Required(ErrorMessage = "Email Address is required")] 56 | [DisplayName("Email Address")] 57 | [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}", 58 | ErrorMessage = "Email is is not valid.")] 59 | [DataType(DataType.EmailAddress)] 60 | public string Email { get; set; } 61 | 62 | [ScaffoldColumn(false)] 63 | public decimal Total { get; set; } 64 | 65 | public List OrderDetails { get; set; } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /MvcMusicStore/Models/OrderDetail.cs: -------------------------------------------------------------------------------- 1 | namespace MvcMusicStore.Models 2 | { 3 | public class OrderDetail 4 | { 5 | public int OrderDetailId { get; set; } 6 | public int OrderId { get; set; } 7 | public int AlbumId { get; set; } 8 | public int Quantity { get; set; } 9 | public decimal UnitPrice { get; set; } 10 | 11 | public virtual Album Album { get; set; } 12 | public virtual Order Order { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MvcMusicStore/MusicStoreBootstrapper.cs: -------------------------------------------------------------------------------- 1 | using Metrics; 2 | using Nancy; 3 | using Nancy.Bootstrapper; 4 | using Nancy.TinyIoc; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Web; 9 | 10 | namespace MvcMusicStore 11 | { 12 | public class MusicStoreBootstrapper : DefaultNancyBootstrapper 13 | { 14 | protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) 15 | { 16 | base.ApplicationStartup(container, pipelines); 17 | 18 | Metric.Config 19 | .WithAllCounters() 20 | .WithNancy(pipelines) 21 | .WithReporting(config => config.WithCSVReports(@"c:\temp\csv", TimeSpan.FromSeconds(10)) 22 | .WithTextFileReport(@"C:\temp\reports\metrics.txt", TimeSpan.FromSeconds(10))); 23 | 24 | 25 | pipelines.AfterRequest += ctx => 26 | { 27 | if (ctx.Response != null) 28 | { 29 | ctx.Response 30 | .WithHeader("Access-Control-Allow-Origin", "*") 31 | .WithHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); 32 | } 33 | }; 34 | } 35 | 36 | } 37 | } -------------------------------------------------------------------------------- /MvcMusicStore/MvcMusicStore.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ShowAllFiles 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | SpecificPage 13 | True 14 | False 15 | False 16 | False 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | False 26 | True 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /MvcMusicStore/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MvcMusicStore")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("MvcMusicStore")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("aa8178f5-d968-4908-ae56-7235477f1139")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /MvcMusicStore/Readme.txt: -------------------------------------------------------------------------------- 1 | The MVC Music Store app is included as a target application in order to demonstrate the instrumentation framework. This code was 2 | downloaded from 3 | 4 | 5 | 6 | 7 | You can view the license at: http://www.microsoft.com/en-us/openness/licenses.aspx 8 | 9 | Microsoft Public License (Ms-PL) 10 | 11 | This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 12 | 13 | Definitions 14 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. 15 | A "contribution" is the original software, or any additions or changes to the software. 16 | A "contributor" is any person that distributes its contribution under this license. 17 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. 18 | Grant of Rights 19 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. 20 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 21 | Conditions and Limitations 22 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. 23 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. 24 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. 25 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. 26 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. -------------------------------------------------------------------------------- /MvcMusicStore/Scripts/MicrosoftMvcAjax.js: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------- 2 | // Copyright (C) Microsoft Corporation. All rights reserved. 3 | //---------------------------------------------------------- 4 | // MicrosoftMvcAjax.js 5 | 6 | Type.registerNamespace('Sys.Mvc');Sys.Mvc.$create_AjaxOptions=function(){return {};} 7 | Sys.Mvc.InsertionMode=function(){};Sys.Mvc.InsertionMode.prototype = {replace:0,insertBefore:1,insertAfter:2} 8 | Sys.Mvc.InsertionMode.registerEnum('Sys.Mvc.InsertionMode',false);Sys.Mvc.AjaxContext=function(request,updateTarget,loadingElement,insertionMode){this.$3=request;this.$4=updateTarget;this.$1=loadingElement;this.$0=insertionMode;} 9 | Sys.Mvc.AjaxContext.prototype={$0:0,$1:null,$2:null,$3:null,$4:null,get_data:function(){if(this.$2){return this.$2.get_responseData();}else{return null;}},get_insertionMode:function(){return this.$0;},get_loadingElement:function(){return this.$1;},get_object:function(){var $0=this.get_response();return ($0)?$0.get_object():null;},get_response:function(){return this.$2;},set_response:function(value){this.$2=value;return value;},get_request:function(){return this.$3;},get_updateTarget:function(){return this.$4;}} 10 | Sys.Mvc.AsyncHyperlink=function(){} 11 | Sys.Mvc.AsyncHyperlink.handleClick=function(anchor,evt,ajaxOptions){evt.preventDefault();Sys.Mvc.MvcHelpers.$2(anchor.href,'post','',anchor,ajaxOptions);} 12 | Sys.Mvc.MvcHelpers=function(){} 13 | Sys.Mvc.MvcHelpers.$0=function($p0,$p1,$p2){if($p0.disabled){return null;}var $0=$p0.name;if($0){var $1=$p0.tagName.toUpperCase();var $2=encodeURIComponent($0);var $3=$p0;if($1==='INPUT'){var $4=$3.type;if($4==='submit'){return $2+'='+encodeURIComponent($3.value);}else if($4==='image'){return $2+'.x='+$p1+'&'+$2+'.y='+$p2;}}else if(($1==='BUTTON')&&($0.length)&&($3.type==='submit')){return $2+'='+encodeURIComponent($3.value);}}return null;} 14 | Sys.Mvc.MvcHelpers.$1=function($p0){var $0=$p0.elements;var $1=new Sys.StringBuilder();var $2=$0.length;for(var $4=0;$4<$2;$4++){var $5=$0[$4];var $6=$5.name;if(!$6||!$6.length){continue;}var $7=$5.tagName.toUpperCase();if($7==='INPUT'){var $8=$5;var $9=$8.type;if(($9==='text')||($9==='password')||($9==='hidden')||((($9==='checkbox')||($9==='radio'))&&$5.checked)){$1.append(encodeURIComponent($6));$1.append('=');$1.append(encodeURIComponent($8.value));$1.append('&');}}else if($7==='SELECT'){var $A=$5;var $B=$A.options.length;for(var $C=0;$C<$B;$C++){var $D=$A.options[$C];if($D.selected){$1.append(encodeURIComponent($6));$1.append('=');$1.append(encodeURIComponent($D.value));$1.append('&');}}}else if($7==='TEXTAREA'){$1.append(encodeURIComponent($6));$1.append('=');$1.append(encodeURIComponent(($5.value)));$1.append('&');}}var $3=$p0._additionalInput;if($3){$1.append($3);$1.append('&');}return $1.toString();} 15 | Sys.Mvc.MvcHelpers.$2=function($p0,$p1,$p2,$p3,$p4){if($p4.confirm){if(!confirm($p4.confirm)){return;}}if($p4.url){$p0=$p4.url;}if($p4.httpMethod){$p1=$p4.httpMethod;}if($p2.length>0&&!$p2.endsWith('&')){$p2+='&';}$p2+='X-Requested-With=XMLHttpRequest';var $0=$p1.toUpperCase();var $1=($0==='GET'||$0==='POST');if(!$1){$p2+='&';$p2+='X-HTTP-Method-Override='+$0;}var $2='';if($0==='GET'||$0==='DELETE'){if($p0.indexOf('?')>-1){if(!$p0.endsWith('&')){$p0+='&';}$p0+=$p2;}else{$p0+='?';$p0+=$p2;}}else{$2=$p2;}var $3=new Sys.Net.WebRequest();$3.set_url($p0);if($1){$3.set_httpVerb($p1);}else{$3.set_httpVerb('POST');$3.get_headers()['X-HTTP-Method-Override']=$0;}$3.set_body($2);if($p1.toUpperCase()==='PUT'){$3.get_headers()['Content-Type']='application/x-www-form-urlencoded;';}$3.get_headers()['X-Requested-With']='XMLHttpRequest';var $4=null;if($p4.updateTargetId){$4=$get($p4.updateTargetId);}var $5=null;if($p4.loadingElementId){$5=$get($p4.loadingElementId);}var $6=new Sys.Mvc.AjaxContext($3,$4,$5,$p4.insertionMode);var $7=true;if($p4.onBegin){$7=$p4.onBegin($6)!==false;}if($5){Sys.UI.DomElement.setVisible($6.get_loadingElement(),true);}if($7){$3.add_completed(Function.createDelegate(null,function($p1_0){ 16 | Sys.Mvc.MvcHelpers.$3($3,$p4,$6);}));$3.invoke();}} 17 | Sys.Mvc.MvcHelpers.$3=function($p0,$p1,$p2){$p2.set_response($p0.get_executor());if($p1.onComplete&&$p1.onComplete($p2)===false){return;}var $0=$p2.get_response().get_statusCode();if(($0>=200&&$0<300)||$0===304||$0===1223){if($0!==204&&$0!==304&&$0!==1223){var $1=$p2.get_response().getResponseHeader('Content-Type');if(($1)&&($1.indexOf('application/x-javascript')!==-1)){eval($p2.get_data());}else{Sys.Mvc.MvcHelpers.updateDomElement($p2.get_updateTarget(),$p2.get_insertionMode(),$p2.get_data());}}if($p1.onSuccess){$p1.onSuccess($p2);}}else{if($p1.onFailure){$p1.onFailure($p2);}}if($p2.get_loadingElement()){Sys.UI.DomElement.setVisible($p2.get_loadingElement(),false);}} 18 | Sys.Mvc.MvcHelpers.updateDomElement=function(target,insertionMode,content){if(target){switch(insertionMode){case 0:target.innerHTML=content;break;case 1:if(content&&content.length>0){target.innerHTML=content+target.innerHTML.trimStart();}break;case 2:if(content&&content.length>0){target.innerHTML=target.innerHTML.trimEnd()+content;}break;}}} 19 | Sys.Mvc.AsyncForm=function(){} 20 | Sys.Mvc.AsyncForm.handleClick=function(form,evt){var $0=Sys.Mvc.MvcHelpers.$0(evt.target,evt.offsetX,evt.offsetY);form._additionalInput = $0;} 21 | Sys.Mvc.AsyncForm.handleSubmit=function(form,evt,ajaxOptions){evt.preventDefault();var $0=form.validationCallbacks;if($0){for(var $2=0;$2<$0.length;$2++){var $3=$0[$2];if(!$3()){return;}}}var $1=Sys.Mvc.MvcHelpers.$1(form);Sys.Mvc.MvcHelpers.$2(form.action,form.method||'post',$1,form,ajaxOptions);} 22 | Sys.Mvc.AjaxContext.registerClass('Sys.Mvc.AjaxContext');Sys.Mvc.AsyncHyperlink.registerClass('Sys.Mvc.AsyncHyperlink');Sys.Mvc.MvcHelpers.registerClass('Sys.Mvc.MvcHelpers');Sys.Mvc.AsyncForm.registerClass('Sys.Mvc.AsyncForm'); 23 | // ---- Do not remove this footer ---- 24 | // Generated using Script# v0.5.0.0 (http://projects.nikhilk.net) 25 | // ----------------------------------- 26 | -------------------------------------------------------------------------------- /MvcMusicStore/Scripts/jquery.unobtrusive-ajax.js: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | /*! 4 | ** Unobtrusive Ajax support library for jQuery 5 | ** Copyright (C) Microsoft Corporation. All rights reserved. 6 | */ 7 | 8 | /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ 9 | /*global window: false, jQuery: false */ 10 | 11 | (function ($) { 12 | var data_click = "unobtrusiveAjaxClick", 13 | data_validation = "unobtrusiveValidation"; 14 | 15 | function getFunction(code, argNames) { 16 | var fn = window, parts = (code || "").split("."); 17 | while (fn && parts.length) { 18 | fn = fn[parts.shift()]; 19 | } 20 | if (typeof (fn) === "function") { 21 | return fn; 22 | } 23 | argNames.push(code); 24 | return Function.constructor.apply(null, argNames); 25 | } 26 | 27 | function isMethodProxySafe(method) { 28 | return method === "GET" || method === "POST"; 29 | } 30 | 31 | function asyncOnBeforeSend(xhr, method) { 32 | if (!isMethodProxySafe(method)) { 33 | xhr.setRequestHeader("X-HTTP-Method-Override", method); 34 | } 35 | } 36 | 37 | function asyncOnSuccess(element, data, contentType) { 38 | var mode; 39 | 40 | if (contentType.indexOf("application/x-javascript") !== -1) { // jQuery already executes JavaScript for us 41 | return; 42 | } 43 | 44 | mode = (element.getAttribute("data-ajax-mode") || "").toUpperCase(); 45 | $(element.getAttribute("data-ajax-update")).each(function (i, update) { 46 | var top; 47 | 48 | switch (mode) { 49 | case "BEFORE": 50 | top = update.firstChild; 51 | $("
").html(data).contents().each(function () { 52 | update.insertBefore(this, top); 53 | }); 54 | break; 55 | case "AFTER": 56 | $("
").html(data).contents().each(function () { 57 | update.appendChild(this); 58 | }); 59 | break; 60 | default: 61 | $(update).html(data); 62 | break; 63 | } 64 | }); 65 | } 66 | 67 | function asyncRequest(element, options) { 68 | var confirm, loading, method, duration; 69 | 70 | confirm = element.getAttribute("data-ajax-confirm"); 71 | if (confirm && !window.confirm(confirm)) { 72 | return; 73 | } 74 | 75 | loading = $(element.getAttribute("data-ajax-loading")); 76 | duration = element.getAttribute("data-ajax-loading-duration") || 0; 77 | 78 | $.extend(options, { 79 | type: element.getAttribute("data-ajax-method") || undefined, 80 | url: element.getAttribute("data-ajax-url") || undefined, 81 | beforeSend: function (xhr) { 82 | var result; 83 | asyncOnBeforeSend(xhr, method); 84 | result = getFunction(element.getAttribute("data-ajax-begin"), ["xhr"]).apply(this, arguments); 85 | if (result !== false) { 86 | loading.show(duration); 87 | } 88 | return result; 89 | }, 90 | complete: function () { 91 | loading.hide(duration); 92 | getFunction(element.getAttribute("data-ajax-complete"), ["xhr", "status"]).apply(this, arguments); 93 | }, 94 | success: function (data, status, xhr) { 95 | asyncOnSuccess(element, data, xhr.getResponseHeader("Content-Type") || "text/html"); 96 | getFunction(element.getAttribute("data-ajax-success"), ["data", "status", "xhr"]).apply(this, arguments); 97 | }, 98 | error: getFunction(element.getAttribute("data-ajax-failure"), ["xhr", "status", "error"]) 99 | }); 100 | 101 | options.data.push({ name: "X-Requested-With", value: "XMLHttpRequest" }); 102 | 103 | method = options.type.toUpperCase(); 104 | if (!isMethodProxySafe(method)) { 105 | options.type = "POST"; 106 | options.data.push({ name: "X-HTTP-Method-Override", value: method }); 107 | } 108 | 109 | $.ajax(options); 110 | } 111 | 112 | function validate(form) { 113 | var validationInfo = $(form).data(data_validation); 114 | return !validationInfo || !validationInfo.validate || validationInfo.validate(); 115 | } 116 | 117 | $("a[data-ajax=true]").live("click", function (evt) { 118 | evt.preventDefault(); 119 | asyncRequest(this, { 120 | url: this.href, 121 | type: "GET", 122 | data: [] 123 | }); 124 | }); 125 | 126 | $("form[data-ajax=true] input[type=image]").live("click", function (evt) { 127 | var name = evt.target.name, 128 | $target = $(evt.target), 129 | form = $target.parents("form")[0], 130 | offset = $target.offset(); 131 | 132 | $(form).data(data_click, [ 133 | { name: name + ".x", value: Math.round(evt.pageX - offset.left) }, 134 | { name: name + ".y", value: Math.round(evt.pageY - offset.top) } 135 | ]); 136 | 137 | setTimeout(function () { 138 | $(form).removeData(data_click); 139 | }, 0); 140 | }); 141 | 142 | $("form[data-ajax=true] :submit").live("click", function (evt) { 143 | var name = evt.target.name, 144 | form = $(evt.target).parents("form")[0]; 145 | 146 | $(form).data(data_click, name ? [{ name: name, value: evt.target.value }] : []); 147 | 148 | setTimeout(function () { 149 | $(form).removeData(data_click); 150 | }, 0); 151 | }); 152 | 153 | $("form[data-ajax=true]").live("submit", function (evt) { 154 | var clickInfo = $(this).data(data_click) || []; 155 | evt.preventDefault(); 156 | if (!validate(this)) { 157 | return; 158 | } 159 | asyncRequest(this, { 160 | url: this.action, 161 | type: this.method || "GET", 162 | data: clickInfo.concat($(this).serializeArray()) 163 | }); 164 | }); 165 | }(jQuery)); -------------------------------------------------------------------------------- /MvcMusicStore/Scripts/jquery.unobtrusive-ajax.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | ** Unobtrusive Ajax support library for jQuery 3 | ** Copyright (C) Microsoft Corporation. All rights reserved. 4 | */ 5 | (function(a){var b="unobtrusiveAjaxClick",g="unobtrusiveValidation";function c(d,b){var a=window,c=(d||"").split(".");while(a&&c.length)a=a[c.shift()];if(typeof a==="function")return a;b.push(d);return Function.constructor.apply(null,b)}function d(a){return a==="GET"||a==="POST"}function f(b,a){!d(a)&&b.setRequestHeader("X-HTTP-Method-Override",a)}function h(c,b,e){var d;if(e.indexOf("application/x-javascript")!==-1)return;d=(c.getAttribute("data-ajax-mode")||"").toUpperCase();a(c.getAttribute("data-ajax-update")).each(function(f,c){var e;switch(d){case"BEFORE":e=c.firstChild;a("
").html(b).contents().each(function(){c.insertBefore(this,e)});break;case"AFTER":a("
").html(b).contents().each(function(){c.appendChild(this)});break;default:a(c).html(b)}})}function e(b,e){var j,k,g,i;j=b.getAttribute("data-ajax-confirm");if(j&&!window.confirm(j))return;k=a(b.getAttribute("data-ajax-loading"));i=b.getAttribute("data-ajax-loading-duration")||0;a.extend(e,{type:b.getAttribute("data-ajax-method")||undefined,url:b.getAttribute("data-ajax-url")||undefined,beforeSend:function(d){var a;f(d,g);a=c(b.getAttribute("data-ajax-begin"),["xhr"]).apply(this,arguments);a!==false&&k.show(i);return a},complete:function(){k.hide(i);c(b.getAttribute("data-ajax-complete"),["xhr","status"]).apply(this,arguments)},success:function(a,e,d){h(b,a,d.getResponseHeader("Content-Type")||"text/html");c(b.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(this,arguments)},error:c(b.getAttribute("data-ajax-failure"),["xhr","status","error"])});e.data.push({name:"X-Requested-With",value:"XMLHttpRequest"});g=e.type.toUpperCase();if(!d(g)){e.type="POST";e.data.push({name:"X-HTTP-Method-Override",value:g})}a.ajax(e)}function i(c){var b=a(c).data(g);return!b||!b.validate||b.validate()}a("a[data-ajax=true]").live("click",function(a){a.preventDefault();e(this,{url:this.href,type:"GET",data:[]})});a("form[data-ajax=true] input[type=image]").live("click",function(c){var g=c.target.name,d=a(c.target),f=d.parents("form")[0],e=d.offset();a(f).data(b,[{name:g+".x",value:Math.round(c.pageX-e.left)},{name:g+".y",value:Math.round(c.pageY-e.top)}]);setTimeout(function(){a(f).removeData(b)},0)});a("form[data-ajax=true] :submit").live("click",function(c){var e=c.target.name,d=a(c.target).parents("form")[0];a(d).data(b,e?[{name:e,value:c.target.value}]:[]);setTimeout(function(){a(d).removeData(b)},0)});a("form[data-ajax=true]").live("submit",function(d){var c=a(this).data(b)||[];d.preventDefault();if(!i(this))return;e(this,{url:this.action,type:this.method||"GET",data:c.concat(a(this).serializeArray())})})})(jQuery); -------------------------------------------------------------------------------- /MvcMusicStore/Scripts/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | ** Unobtrusive validation support library for jQuery and jQuery Validate 3 | ** Copyright (C) Microsoft Corporation. All rights reserved. 4 | */ 5 | (function(a){var d=a.validator,b,f="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function i(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function g(a){return a.substr(0,a.lastIndexOf(".")+1)}function e(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function l(c,d){var b=a(this).find("[data-valmsg-for='"+d[0].name+"']"),e=a.parseJSON(b.attr("data-valmsg-replace"))!==false;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(e){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function k(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("
  • ").html(this.message).appendTo(b)})}}function j(c){var b=c.data("unobtrusiveContainer"),d=a.parseJSON(b.attr("data-valmsg-replace"));if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");c.removeData("unobtrusiveContainer");d&&b.empty()}}function h(d){var b=a(d),c=b.data(f);if(!c){c={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:a.proxy(l,d),invalidHandler:a.proxy(k,d),messages:{},rules:{},success:a.proxy(j,d)},attachValidation:function(){b.validate(this.options)},validate:function(){b.validate();return b.valid()}};b.data(f,c)}return c}d.unobtrusive={adapters:[],parseElement:function(b,i){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=h(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});jQuery.extend(e,{__dummy__:true});!i&&c.attachValidation()},parse:function(b){a(b).find(":input[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});a("form").each(function(){var a=h(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});b.addSingleVal("accept","exts").addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.add("equalto",["other"],function(b){var h=g(b.element.name),i=b.params.other,d=e(i,h),f=a(b.form).find(":input[name="+d+"]")[0];c(b,"equalTo",f)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},f=g(b.element.name);a.each(i(b.params.additionalfields||b.element.name),function(h,g){var c=e(g,f);d.data[c]=function(){return a(b.form).find(":input[name='"+c+"']").val()}});c(b,"remote",d)});a(function(){d.unobtrusive.parse(document)})})(jQuery); -------------------------------------------------------------------------------- /MvcMusicStore/ViewModels/ShoppingCartRemoveViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace MvcMusicStore.ViewModels 2 | { 3 | public class ShoppingCartRemoveViewModel 4 | { 5 | public string Message { get; set; } 6 | public decimal CartTotal { get; set; } 7 | public int CartCount { get; set; } 8 | public int ItemCount { get; set; } 9 | public int DeleteId { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /MvcMusicStore/ViewModels/ShoppingCartViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using MvcMusicStore.Models; 3 | 4 | namespace MvcMusicStore.ViewModels 5 | { 6 | public class ShoppingCartViewModel 7 | { 8 | public List CartItems { get; set; } 9 | public decimal CartTotal { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /MvcMusicStore/Views/Account/ChangePassword.cshtml: -------------------------------------------------------------------------------- 1 | @model Mvc3ToolsUpdateWeb_Default.Models.ChangePasswordModel 2 | 3 | @{ 4 | ViewBag.Title = "Change Password"; 5 | } 6 | 7 |

    Change Password

    8 |

    9 | Use the form below to change your password. 10 |

    11 |

    12 | New passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length. 13 |

    14 | 15 | 16 | 17 | 18 | @using (Html.BeginForm()) { 19 | @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.") 20 |
    21 |
    22 | Account Information 23 | 24 |
    25 | @Html.LabelFor(m => m.OldPassword) 26 |
    27 |
    28 | @Html.PasswordFor(m => m.OldPassword) 29 | @Html.ValidationMessageFor(m => m.OldPassword) 30 |
    31 | 32 |
    33 | @Html.LabelFor(m => m.NewPassword) 34 |
    35 |
    36 | @Html.PasswordFor(m => m.NewPassword) 37 | @Html.ValidationMessageFor(m => m.NewPassword) 38 |
    39 | 40 |
    41 | @Html.LabelFor(m => m.ConfirmPassword) 42 |
    43 |
    44 | @Html.PasswordFor(m => m.ConfirmPassword) 45 | @Html.ValidationMessageFor(m => m.ConfirmPassword) 46 |
    47 | 48 |

    49 | 50 |

    51 |
    52 |
    53 | } 54 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Account/ChangePasswordSuccess.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Change Password"; 3 | } 4 | 5 |

    Change Password

    6 |

    7 | Your password has been changed successfully. 8 |

    9 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Account/LogOn.cshtml: -------------------------------------------------------------------------------- 1 | @model Mvc3ToolsUpdateWeb_Default.Models.LogOnModel 2 | 3 | @{ 4 | ViewBag.Title = "Log On"; 5 | } 6 | 7 |

    Log On

    8 |

    9 | Please enter your user name and password. @Html.ActionLink("Register", "Register") if you don't have an account. 10 |

    11 | 12 | 13 | 14 | 15 | @Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") 16 | 17 | @using (Html.BeginForm()) { 18 |
    19 |
    20 | Account Information 21 | 22 |
    23 | @Html.LabelFor(m => m.UserName) 24 |
    25 |
    26 | @Html.TextBoxFor(m => m.UserName) 27 | @Html.ValidationMessageFor(m => m.UserName) 28 |
    29 | 30 |
    31 | @Html.LabelFor(m => m.Password) 32 |
    33 |
    34 | @Html.PasswordFor(m => m.Password) 35 | @Html.ValidationMessageFor(m => m.Password) 36 |
    37 | 38 |
    39 | @Html.CheckBoxFor(m => m.RememberMe) 40 | @Html.LabelFor(m => m.RememberMe) 41 |
    42 | 43 |

    44 | 45 |

    46 |
    47 |
    48 | } 49 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model Mvc3ToolsUpdateWeb_Default.Models.RegisterModel 2 | 3 | @{ 4 | ViewBag.Title = "Register"; 5 | } 6 | 7 |

    Create a New Account

    8 |

    9 | Use the form below to create a new account. 10 |

    11 |

    12 | Passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length. 13 |

    14 | 15 | 16 | 17 | 18 | @using (Html.BeginForm()) { 19 | @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") 20 |
    21 |
    22 | Account Information 23 | 24 |
    25 | @Html.LabelFor(m => m.UserName) 26 |
    27 |
    28 | @Html.TextBoxFor(m => m.UserName) 29 | @Html.ValidationMessageFor(m => m.UserName) 30 |
    31 | 32 |
    33 | @Html.LabelFor(m => m.Email) 34 |
    35 |
    36 | @Html.TextBoxFor(m => m.Email) 37 | @Html.ValidationMessageFor(m => m.Email) 38 |
    39 | 40 |
    41 | @Html.LabelFor(m => m.Password) 42 |
    43 |
    44 | @Html.PasswordFor(m => m.Password) 45 | @Html.ValidationMessageFor(m => m.Password) 46 |
    47 | 48 |
    49 | @Html.LabelFor(m => m.ConfirmPassword) 50 |
    51 |
    52 | @Html.PasswordFor(m => m.ConfirmPassword) 53 | @Html.ValidationMessageFor(m => m.ConfirmPassword) 54 |
    55 | 56 |

    57 | 58 |

    59 |
    60 |
    61 | } 62 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Checkout/AddressAndPayment.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.Models.Order 2 | 3 | @{ 4 | ViewBag.Title = "Address And Payment"; 5 | } 6 | 7 | 8 | 9 | 10 | @using (Html.BeginForm()) { 11 | 12 |

    Address And Payment

    13 |
    14 | Shipping Information 15 | 16 | @Html.EditorForModel() 17 |
    18 |
    19 | Payment 20 |

    We're running a promotion: all music is free with the promo code: "FREE"

    21 | 22 |
    23 | @Html.Label("Promo Code") 24 |
    25 |
    26 | @Html.TextBox("PromoCode") 27 |
    28 |
    29 | 30 | 31 | } -------------------------------------------------------------------------------- /MvcMusicStore/Views/Checkout/Complete.cshtml: -------------------------------------------------------------------------------- 1 | @model int 2 | 3 | @{ 4 | ViewBag.Title = "Checkout Complete"; 5 | } 6 | 7 |

    Checkout Complete

    8 | 9 |

    Thanks for your order! Your order number is: @Model

    10 | 11 |

    How about shopping for some more music in our 12 | @Html.ActionLink("store", "Index", "Home") 13 |

    14 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model List 2 | @{ 3 | ViewBag.Title = "ASP.NET MVC Music Store"; 4 | } 5 |
    6 |
    7 | 8 |

    Fresh off the grill

    9 | 10 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Error"; 3 | } 4 | 5 |

    Error

    6 | 7 |

    We're sorry, we've hit an unexpected error. 8 | Click here 9 | if you'd like to go back and try that again.

    10 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | @ViewBag.Title 5 | 7 | 9 | 10 | 11 | 20 | 21 | @{Html.RenderAction("GenreMenu", "Store");} 22 | 23 |
    24 | @RenderBody() 25 |
    26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/ShoppingCart/CartSummary.cshtml: -------------------------------------------------------------------------------- 1 | @Html.ActionLink("Cart (" + ViewData["CartCount"] + ")", 2 | "Index", 3 | "ShoppingCart", 4 | new { id = "cart-status" }) 5 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/ShoppingCart/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.ViewModels.ShoppingCartViewModel 2 | @{ 3 | ViewBag.Title = "Shopping Cart"; 4 | } 5 | 6 | 53 |

    54 | Review your cart: 55 |

    56 |

    57 | @Html.ActionLink("Checkout >>", "AddressAndPayment", "Checkout") 58 |

    59 |
    60 |
    61 | 62 | 63 | 66 | 69 | 72 | 73 | 74 | @foreach (var item in Model.CartItems) 75 | { 76 | 77 | 80 | 83 | 86 | 89 | 90 | } 91 | 92 | 95 | 97 | 99 | 102 | 103 |
    64 | Album Name 65 | 67 | Price (each) 68 | 70 | Quantity 71 |
    78 | @Html.ActionLink(item.Album.Title, "Details", "Store", new { id = item.AlbumId }, null) 79 | 81 | @item.Album.Price 82 | 84 | @item.Count 85 | 87 | Remove from cart 88 |
    93 | Total 94 | 96 | 98 | 100 | @Model.CartTotal 101 |
    -------------------------------------------------------------------------------- /MvcMusicStore/Views/Store/Browse.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.Models.Genre 2 | 3 | @{ 4 | ViewBag.Title = "Browse Albums"; 5 | } 6 | 7 |
    8 |

    @Model.Name Albums

    9 | 10 | 21 |
    22 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Store/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.Models.Album 2 | 3 | @{ 4 | ViewBag.Title = "Album - " + Model.Title; 5 | } 6 | 7 |

    @Model.Title

    8 | 9 |

    10 | @Model.Title 11 |

    12 | 13 |
    14 |

    15 | Genre: 16 | @Model.Genre.Name 17 |

    18 |

    19 | Artist: 20 | @Model.Artist.Name 21 |

    22 |

    23 | Price: 24 | @String.Format("{0:F}", Model.Price) 25 |

    26 |

    27 | @Html.ActionLink("Add to cart", "AddToCart", 28 | "ShoppingCart", new { id = Model.AlbumId }, "") 29 |

    30 |
    31 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/Store/GenreMenu.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 |
      4 | @foreach (var genre in Model) 5 | { 6 |
    • @Html.ActionLink(genre.Name, 7 | "Browse", "Store", 8 | new { Genre = genre.Name }, null) 9 |
    • 10 | } 11 |
    -------------------------------------------------------------------------------- /MvcMusicStore/Views/Store/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ 3 | ViewBag.Title = "Store"; 4 | } 5 |

    Browse Genres

    6 | 7 |

    8 | Select from @Model.Count() genres:

    9 |
      10 | @foreach (var genre in Model) 11 | { 12 |
    • @Html.ActionLink(genre.Name, "Browse", new { genre = genre.Name })
    • 13 | } 14 |
    15 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/StoreManager/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.Models.Album 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

    Create

    8 | 9 | 10 | 11 | 12 | @using (Html.BeginForm()) { 13 | @Html.ValidationSummary(true) 14 |
    15 | Album 16 | 17 |
    18 | @Html.LabelFor(model => model.GenreId, "Genre") 19 |
    20 |
    21 | @Html.DropDownList("GenreId", String.Empty) 22 | @Html.ValidationMessageFor(model => model.GenreId) 23 |
    24 | 25 |
    26 | @Html.LabelFor(model => model.ArtistId, "Artist") 27 |
    28 |
    29 | @Html.DropDownList("ArtistId", String.Empty) 30 | @Html.ValidationMessageFor(model => model.ArtistId) 31 |
    32 | 33 |
    34 | @Html.LabelFor(model => model.Title) 35 |
    36 |
    37 | @Html.EditorFor(model => model.Title) 38 | @Html.ValidationMessageFor(model => model.Title) 39 |
    40 | 41 |
    42 | @Html.LabelFor(model => model.Price) 43 |
    44 |
    45 | @Html.EditorFor(model => model.Price) 46 | @Html.ValidationMessageFor(model => model.Price) 47 |
    48 | 49 |
    50 | @Html.LabelFor(model => model.AlbumArtUrl) 51 |
    52 |
    53 | @Html.EditorFor(model => model.AlbumArtUrl) 54 | @Html.ValidationMessageFor(model => model.AlbumArtUrl) 55 |
    56 | 57 |

    58 | 59 |

    60 |
    61 | } 62 | 63 |
    64 | @Html.ActionLink("Back to List", "Index") 65 |
    66 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/StoreManager/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.Models.Album 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

    Delete Confirmation

    8 | 9 |

    Are you sure you want to delete the album titled 10 | @Model.Title? 11 |

    12 | 13 | @using (Html.BeginForm()) { 14 |

    15 | 16 |

    17 |

    18 | @Html.ActionLink("Back to List", "Index") 19 |

    20 | 21 | } -------------------------------------------------------------------------------- /MvcMusicStore/Views/StoreManager/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.Models.Album 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

    Details

    8 | 9 |
    10 | Album 11 | 12 |
    Genre
    13 |
    14 | @Html.DisplayFor(model => model.Genre.Name) 15 |
    16 | 17 |
    Artist
    18 |
    19 | @Html.DisplayFor(model => model.Artist.Name) 20 |
    21 | 22 |
    Title
    23 |
    24 | @Html.DisplayFor(model => model.Title) 25 |
    26 | 27 |
    Price
    28 |
    29 | @Html.DisplayFor(model => model.Price) 30 |
    31 | 32 |
    AlbumArtUrl
    33 |
    34 | @Html.DisplayFor(model => model.AlbumArtUrl) 35 |
    36 |
    37 |

    38 | @Html.ActionLink("Edit", "Edit", new { id=Model.AlbumId }) | 39 | @Html.ActionLink("Back to List", "Index") 40 |

    41 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/StoreManager/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcMusicStore.Models.Album 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

    Edit

    8 | 9 | 10 | 11 | 12 | @using (Html.BeginForm()) { 13 | @Html.ValidationSummary(true) 14 |
    15 | Album 16 | 17 | @Html.HiddenFor(model => model.AlbumId) 18 | 19 |
    20 | @Html.LabelFor(model => model.GenreId, "Genre") 21 |
    22 |
    23 | @Html.DropDownList("GenreId", String.Empty) 24 | @Html.ValidationMessageFor(model => model.GenreId) 25 |
    26 | 27 |
    28 | @Html.LabelFor(model => model.ArtistId, "Artist") 29 |
    30 |
    31 | @Html.DropDownList("ArtistId", String.Empty) 32 | @Html.ValidationMessageFor(model => model.ArtistId) 33 |
    34 | 35 |
    36 | @Html.LabelFor(model => model.Title) 37 |
    38 |
    39 | @Html.EditorFor(model => model.Title) 40 | @Html.ValidationMessageFor(model => model.Title) 41 |
    42 | 43 |
    44 | @Html.LabelFor(model => model.Price) 45 |
    46 |
    47 | @Html.EditorFor(model => model.Price) 48 | @Html.ValidationMessageFor(model => model.Price) 49 |
    50 | 51 |
    52 | @Html.LabelFor(model => model.AlbumArtUrl) 53 |
    54 |
    55 | @Html.EditorFor(model => model.AlbumArtUrl) 56 | @Html.ValidationMessageFor(model => model.AlbumArtUrl) 57 |
    58 | 59 |

    60 | 61 |

    62 |
    63 | } 64 | 65 |
    66 | @Html.ActionLink("Back to List", "Index") 67 |
    68 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/StoreManager/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @helper Truncate(string input, int length) 4 | { 5 | if (input.Length <= length) { 6 | @input 7 | } else { 8 | @input.Substring(0, length)... 9 | } 10 | } 11 | 12 | @{ 13 | ViewBag.Title = "Index"; 14 | } 15 | 16 |

    Index

    17 | 18 |

    19 | @Html.ActionLink("Create New", "Create") 20 |

    21 | 22 | 23 | 26 | 29 | 32 | 35 | 36 | 37 | 38 | @foreach (var item in Model) { 39 | 40 | 43 | 46 | 49 | 52 | 57 | 58 | } 59 | 60 |
    24 | Genre 25 | 27 | Artist 28 | 30 | Title 31 | 33 | Price 34 |
    41 | @Html.DisplayFor(modelItem => item.Genre.Name) 42 | 44 | @Truncate(item.Artist.Name, 25) 45 | 47 | @Truncate(item.Title, 25) 48 | 50 | @Html.DisplayFor(modelItem => item.Price) 51 | 53 | @Html.ActionLink("Edit", "Edit", new { id=item.AlbumId }) | 54 | @Html.ActionLink("Details", "Details", new { id=item.AlbumId }) | 55 | @Html.ActionLink("Delete", "Delete", new { id=item.AlbumId }) 56 |
    -------------------------------------------------------------------------------- /MvcMusicStore/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
    7 |
    8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 39 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /MvcMusicStore/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /MvcMusicStore/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /MvcMusicStore/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /MvcMusicStore/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 |
    10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /MvcMusicStore/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AspNetPerformanceMetrics 2 | ======================== 3 | 4 | AspNetPerformanceMetrics adds the metrics provided by the [Metrics.NET](https://github.com/etishor/Metrics.NET) to ASP.NET MVC 5 | -------------------------------------------------------------------------------- /packages/EntityFramework.4.1.10331.0/EntityFramework.4.1.10331.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/EntityFramework.4.1.10331.0/EntityFramework.4.1.10331.0.nupkg -------------------------------------------------------------------------------- /packages/EntityFramework.4.1.10331.0/EntityFramework.4.1.10331.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EntityFramework 5 | 4.1.10331.0 6 | EntityFramework 7 | Microsoft 8 | Microsoft 9 | http://go.microsoft.com/fwlink/?LinkID=211010 10 | http://msdn.com/data/ef 11 | http://go.microsoft.com/fwlink/?LinkID=386613 12 | true 13 | DbContext API and Code First workflow for ADO.NET Entity Framework. 14 | DbContext API and Code First workflow for ADO.NET Entity Framework. 15 | 16 | -------------------------------------------------------------------------------- /packages/EntityFramework.4.1.10331.0/lib/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/EntityFramework.4.1.10331.0/lib/EntityFramework.dll -------------------------------------------------------------------------------- /packages/EntityFramework.4.1.10331.0/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | $project.Object.References.Add("System.Data.Entity") | out-null 3 | $project.Object.References.Add("System.ComponentModel.DataAnnotations") | out-null 4 | -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.2/Metrics.NET-net40.0.2.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/Metrics.NET-net40.0.2.2/Metrics.NET-net40.0.2.2.nupkg -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.2/Metrics.NET-net40.0.2.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Metrics.NET-net40 5 | 0.2.2 6 | Metrics.NET-net40 7 | iulian.margarintescu 8 | iulian.margarintescu 9 | https://github.com/etishor/Metrics.NET/blob/master/LICENSE 10 | https://github.com/etishor/Metrics.NET 11 | false 12 | (Legacy .NET 4.0 Version) The library provides support for capturing: Gauges, Counters, Meters, Histograms and Timers 13 | (Legacy .NET 4.0 Version) .NET Port of the Java Metrics Library, a library for collecting metrics. Library also provides Health Checks. 14 | Iulian Margarintescu 15 | metrics measurements charts timer histogram duration graphite health checks 16 | 17 | -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.2/lib/net40/Metrics.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/Metrics.NET-net40.0.2.2/lib/net40/Metrics.dll -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.2/lib/net40/Metrics.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/Metrics.NET-net40.0.2.2/lib/net40/Metrics.pdb -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.3/Metrics.NET-net40.0.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/Metrics.NET-net40.0.2.3/Metrics.NET-net40.0.2.3.nupkg -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.3/Metrics.NET-net40.0.2.3.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Metrics.NET-net40 5 | 0.2.3 6 | Metrics.NET-net40 7 | iulian.margarintescu 8 | iulian.margarintescu 9 | https://github.com/etishor/Metrics.NET/blob/master/LICENSE 10 | https://github.com/etishor/Metrics.NET 11 | http://www.erata.net/Metrics.NET/metrics_32.png 12 | false 13 | (Legacy .NET 4.0 Version) The library provides support for capturing: Gauges, Counters, Meters, Histograms and Timers 14 | (Legacy .NET 4.0 Version) .NET Port of the Java Metrics Library, a library for collecting metrics. Library also provides Health Checks. 15 | Iulian Margarintescu 16 | metrics measurements charts timer histogram duration graphite health checks 17 | 18 | -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.3/lib/net40/Metrics.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/Metrics.NET-net40.0.2.3/lib/net40/Metrics.dll -------------------------------------------------------------------------------- /packages/Metrics.NET-net40.0.2.3/lib/net40/Metrics.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/Metrics.NET-net40.0.2.3/lib/net40/Metrics.pdb -------------------------------------------------------------------------------- /packages/Modernizr.1.7/Modernizr.1.7.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/Modernizr.1.7/Modernizr.1.7.nupkg -------------------------------------------------------------------------------- /packages/Modernizr.1.7/Modernizr.1.7.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Modernizr 5 | 1.7 6 | Modernizr 7 | Faruk Ateş, Paul Irish, Alex Sexton 8 | Faruk Ateş, Paul Irish, Alex Sexton 9 | http://www.modernizr.com/license/ 10 | http://www.modernizr.com/ 11 | https://nugetgallery.blob.core.windows.net/icons/Modernizr.1.7.png 12 | false 13 | Modernizr adds classes to the html element which allow you to target specific browser functionality in your stylesheet. You don't actually need to write any Javascript to use it. 14 | Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies. 15 | Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML 5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies. 16 | JavaScript HTML HTML5 CSS CSS3 SVG 17 | 18 | -------------------------------------------------------------------------------- /packages/jQuery.1.5.1/jQuery.1.5.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.1.5.1/jQuery.1.5.1.nupkg -------------------------------------------------------------------------------- /packages/jQuery.1.5.1/jQuery.1.5.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery 5 | 1.5.1 6 | jQuery 7 | John Resig 8 | John Resig 9 | http://jquery.org/license 10 | http://jquery.com/ 11 | https://nugetgallery.blob.core.windows.net/icons/jQuery.1.5.1.png 12 | false 13 | jQuery is a new kind of JavaScript Library. 14 | jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. 15 | jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. 16 | jQuery 17 | 18 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.accordion.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Accordion 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Accordion#theming 9 | */ 10 | /* IE/Win - Fix animation bug - #4615 */ 11 | .ui-accordion { width: 100%; } 12 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 13 | .ui-accordion .ui-accordion-li-fix { display: inline; } 14 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 15 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 16 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 17 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 18 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 19 | .ui-accordion .ui-accordion-content-active { display: block; } 20 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.all.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming 9 | */ 10 | @import "jquery.ui.base.css"; 11 | @import "jquery.ui.theme.css"; 12 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.autocomplete.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Autocomplete 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Autocomplete#theming 9 | */ 10 | .ui-autocomplete { position: absolute; cursor: default; } 11 | 12 | /* workarounds */ 13 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 14 | 15 | /* 16 | * jQuery UI Menu 1.8.11 17 | * 18 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 19 | * Dual licensed under the MIT or GPL Version 2 licenses. 20 | * http://jquery.org/license 21 | * 22 | * http://docs.jquery.com/UI/Menu#theming 23 | */ 24 | .ui-menu { 25 | list-style:none; 26 | padding: 2px; 27 | margin: 0; 28 | display:block; 29 | float: left; 30 | } 31 | .ui-menu .ui-menu { 32 | margin-top: -3px; 33 | } 34 | .ui-menu .ui-menu-item { 35 | margin:0; 36 | padding: 0; 37 | zoom: 1; 38 | float: left; 39 | clear: left; 40 | width: 100%; 41 | } 42 | .ui-menu .ui-menu-item a { 43 | text-decoration:none; 44 | display:block; 45 | padding:.2em .4em; 46 | line-height:1.5; 47 | zoom:1; 48 | } 49 | .ui-menu .ui-menu-item a.ui-state-hover, 50 | .ui-menu .ui-menu-item a.ui-state-active { 51 | font-weight: normal; 52 | margin: -1px; 53 | } 54 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.base.css: -------------------------------------------------------------------------------- 1 | @import url("jquery.ui.core.css"); 2 | @import url("jquery.ui.resizable.css"); 3 | @import url("jquery.ui.selectable.css"); 4 | @import url("jquery.ui.accordion.css"); 5 | @import url("jquery.ui.autocomplete.css"); 6 | @import url("jquery.ui.button.css"); 7 | @import url("jquery.ui.dialog.css"); 8 | @import url("jquery.ui.slider.css"); 9 | @import url("jquery.ui.tabs.css"); 10 | @import url("jquery.ui.datepicker.css"); 11 | @import url("jquery.ui.progressbar.css"); -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.button.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Button 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Button#theming 9 | */ 10 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 11 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 12 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 13 | .ui-button-icons-only { width: 3.4em; } 14 | button.ui-button-icons-only { width: 3.7em; } 15 | 16 | /*button text element */ 17 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 18 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 19 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 20 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 21 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } 22 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 23 | /* no icon support for input elements, provide padding by default */ 24 | input.ui-button { padding: .4em 1em; } 25 | 26 | /*button icon element(s) */ 27 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 28 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 29 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 30 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 31 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 32 | 33 | /*button sets*/ 34 | .ui-buttonset { margin-right: 7px; } 35 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 36 | 37 | /* workarounds */ 38 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 39 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.core.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming/API 9 | */ 10 | 11 | /* Layout helpers 12 | ----------------------------------*/ 13 | .ui-helper-hidden { display: none; } 14 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } 15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 16 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 17 | .ui-helper-clearfix { display: inline-block; } 18 | /* required comment for clearfix to work in Opera \*/ 19 | * html .ui-helper-clearfix { height:1%; } 20 | .ui-helper-clearfix { display:block; } 21 | /* end clearfix */ 22 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 23 | 24 | 25 | /* Interaction Cues 26 | ----------------------------------*/ 27 | .ui-state-disabled { cursor: default !important; } 28 | 29 | 30 | /* Icons 31 | ----------------------------------*/ 32 | 33 | /* states and images */ 34 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 35 | 36 | 37 | /* Misc visuals 38 | ----------------------------------*/ 39 | 40 | /* Overlays */ 41 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 42 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.datepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Datepicker 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Datepicker#theming 9 | */ 10 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } 11 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 12 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 13 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 14 | .ui-datepicker .ui-datepicker-prev { left:2px; } 15 | .ui-datepicker .ui-datepicker-next { right:2px; } 16 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 17 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 18 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 19 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 20 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 21 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 22 | .ui-datepicker select.ui-datepicker-month, 23 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 24 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 25 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 26 | .ui-datepicker td { border: 0; padding: 1px; } 27 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 28 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 29 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 30 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 31 | 32 | /* with multiple calendars */ 33 | .ui-datepicker.ui-datepicker-multi { width:auto; } 34 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 35 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 36 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 37 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 38 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 39 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 40 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 41 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 42 | .ui-datepicker-row-break { clear:both; width:100%; } 43 | 44 | /* RTL support */ 45 | .ui-datepicker-rtl { direction: rtl; } 46 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 47 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 48 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 49 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 50 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 51 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 52 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 53 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 54 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 55 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 56 | 57 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 58 | .ui-datepicker-cover { 59 | display: none; /*sorry for IE5*/ 60 | display/**/: block; /*sorry for IE5*/ 61 | position: absolute; /*must have*/ 62 | z-index: -1; /*must have*/ 63 | filter: mask(); /*must have*/ 64 | top: -4px; /*must have*/ 65 | left: -4px; /*must have*/ 66 | width: 200px; /*must have*/ 67 | height: 200px; /*must have*/ 68 | } -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.dialog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Dialog 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Dialog#theming 9 | */ 10 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 11 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } 12 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 13 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 14 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 15 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 16 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 17 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 18 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 19 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 20 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 21 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 22 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.progressbar.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Progressbar 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Progressbar#theming 9 | */ 10 | .ui-progressbar { height:2em; text-align: left; } 11 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.resizable.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Resizable 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Resizable#theming 9 | */ 10 | .ui-resizable { position: relative;} 11 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} 12 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 13 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 14 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 15 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 16 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 17 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 18 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 19 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 20 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.selectable.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Selectable 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Selectable#theming 9 | */ 10 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 11 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.slider.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Slider 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Slider#theming 9 | */ 10 | .ui-slider { position: relative; text-align: left; } 11 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 12 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 13 | 14 | .ui-slider-horizontal { height: .8em; } 15 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 16 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 17 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 18 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 19 | 20 | .ui-slider-vertical { width: .8em; height: 100px; } 21 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 22 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 23 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 24 | .ui-slider-vertical .ui-slider-range-max { top: 0; } -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/Content/Content/themes/base/jquery.ui.tabs.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Tabs 1.8.11 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Tabs#theming 9 | */ 10 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 11 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 12 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 13 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 14 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 15 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 16 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 17 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 18 | .ui-tabs .ui-tabs-hide { display: none !important; } 19 | -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/jQuery.UI.Combined.1.8.11.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.UI.Combined.1.8.11/jQuery.UI.Combined.1.8.11.nupkg -------------------------------------------------------------------------------- /packages/jQuery.UI.Combined.1.8.11/jQuery.UI.Combined.1.8.11.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery.UI.Combined 5 | 1.8.11 6 | jQuery UI (Combined Library) 7 | jQuery UI Team 8 | jQuery UI Team 9 | http://jquery.org/license 10 | http://jqueryui.com/ 11 | http://nuget.org/Media/Default/Packages/jQuery.UI.Combined/1.8.9/jQueryUILogo.png 12 | false 13 | jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. 14 | The full jQuery UI library as a single combined file. Includes the base theme. 15 | jQuery jQueryUI plugins 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/jQuery.Validation.1.8/jQuery.Validation.1.8.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.Validation.1.8/jQuery.Validation.1.8.nupkg -------------------------------------------------------------------------------- /packages/jQuery.Validation.1.8/jQuery.Validation.1.8.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery.Validation 5 | 1.8 6 | jQuery Validation 7 | Jörn Zaefferer 8 | Jörn Zaefferer 9 | http://bassistance.de/jquery-plugins/jquery-plugin-validation/ 10 | false 11 | This jQuery plugin makes simple clientside form validation trivial, while offering lots of option for customization. That makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate it into an existing application with lots of existing markup. The plugin comes bundled with a useful set of validation methods, including URL and email validation, while providing an API to write your own methods. All bundled methods come with default error messages in english and translations into 32 languages. 12 | A jQuery plugin that makes simple clientside form validation trivial. 13 | jQuery plugins 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/jQuery.vsdoc.1.5.1/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $extId = "JScriptIntelliSenseParaExtension.Microsoft.039ee76c-3c7f-4281-ad23-f6528ab18623" 4 | $extManager = [Microsoft.VisualStudio.Shell.Package]::GetGlobalService([Microsoft.VisualStudio.ExtensionManager.SVsExtensionManager]) 5 | $copyOverParaFile = $false 6 | try { 7 | $copyOverParaFile = $extManager.GetInstalledExtension($extId).State -eq "Enabled" 8 | } 9 | catch [Microsoft.VisualStudio.ExtensionManager.NotInstalledException] { 10 | #Extension is not installed 11 | } 12 | 13 | if ($copyOverParaFile) { 14 | #Copy the -vsdoc-para file over the -vsdoc file 15 | $projectFolder = Split-Path -Parent $project.FileName 16 | $paraVsDocPath = Join-Path $toolsPath jquery-1.5.1-vsdoc-para.js 17 | $vsDocPath = Join-Path $projectFolder Scripts\jquery-1.5.1-vsdoc.js 18 | Copy-Item $paraVsDocPath $vsDocPath -Force 19 | } -------------------------------------------------------------------------------- /packages/jQuery.vsdoc.1.5.1/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | #Forcibly delete the -vsdoc file 4 | $projectFolder = Split-Path -Parent $project.FileName 5 | $projVsDocPath = Join-Path $projectFolder Scripts\jquery-1.5.1-vsdoc.js 6 | $origVsDocPath = Join-Path $installPath Content\Scripts\jquery-1.5.1-vsdoc.js 7 | $origVsDocParaPath = Join-Path $toolsPath jquery-1.5.1-vsdoc-para.js 8 | 9 | function Get-Checksum($file) { 10 | $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" 11 | 12 | $fileInfo = Get-Item "$file" 13 | trap { ; 14 | continue } $stream = $fileInfo.OpenRead() 15 | if ($? -eq $false) { 16 | #Write-Host "Couldn't open file for reading" 17 | return $null 18 | } 19 | 20 | $bytes = $cryptoProvider.ComputeHash($stream) 21 | $checksum = '' 22 | foreach ($byte in $bytes) { 23 | $checksum += $byte.ToString('x2') 24 | } 25 | 26 | $stream.Close() | Out-Null 27 | 28 | return $checksum 29 | } 30 | 31 | if (Test-Path $projVsDocPath) { 32 | #Copy the original -vsdoc file over the -vsdoc file modified during install 33 | #Normal uninstall logic will then kick in 34 | 35 | if ((Get-Checksum $projVsDocPath) -eq (Get-Checksum $origVsDocParaPath)) { 36 | #Write-Host "Copying orig vsdoc file over" 37 | Copy-Item $origVsDocPath $projVsDocPath -Force 38 | } 39 | else { 40 | #Write-Host "vsdoc file has changed" 41 | } 42 | } 43 | else { 44 | #Write-Host "vsdoc file not found in project" 45 | } 46 | -------------------------------------------------------------------------------- /packages/jQuery.vsdoc.1.5.1/jQuery.vsdoc.1.5.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geffzhang/AspNetPerformanceMetrics/71227f9705f83237f62e92957b5920b35cec6a83/packages/jQuery.vsdoc.1.5.1/jQuery.vsdoc.1.5.1.nupkg -------------------------------------------------------------------------------- /packages/jQuery.vsdoc.1.5.1/jQuery.vsdoc.1.5.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery.vsdoc 5 | 1.5.1 6 | jQuery Visual Studio 2010 IntelliSense 7 | Microsoft 8 | Microsoft 9 | https://nugetgallery.blob.core.windows.net/icons/jQuery.vsdoc.1.5.1.png 10 | false 11 | Includes vsdoc files for jQuery 1.5 that provide IntelliSense in Visual Studio 2010. For best experience get the JScript Editor Extensions before installing this package, from visualstudiogallery.msdn.microsoft.com/en-us/872d27ee-38c7-4a97-98dc-0d8a431cc2ed 12 | Includes vsdoc files for jQuery 1.5 that provide IntelliSense in Visual Studio 2010. For best experience get the JScript Editor Extensions before installing this package, from visualstudiogallery.msdn.microsoft.com/en-us/872d27ee-38c7-4a97-98dc-0d8a431cc2ed 13 | jQuery VS IntelliSense 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | --------------------------------------------------------------------------------