diff --git a/Backup/ImageResizer.FluentExtensions.sln b/Backup/ImageResizer.FluentExtensions.sln new file mode 100644 index 0000000..f25bc63 --- /dev/null +++ b/Backup/ImageResizer.FluentExtensions.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions", "src\ImageResizer.FluentExtensions\ImageResizer.FluentExtensions.csproj", "{C3811C42-0118-443B-B0EB-FA82129B8C69}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Tests", "src\ImageResizer.FluentExtensions.Tests\ImageResizer.FluentExtensions.Tests.csproj", "{1ABDEC38-BA6A-4D24-A324-0C0D790413C8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Tests.Web", "src\ImageResizer.FluentExtensions.Tests.Web\ImageResizer.FluentExtensions.Tests.Web.csproj", "{13B6E47F-26DE-431E-BAF7-35BAC532A98D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Mvc", "src\ImageResizer.FluentExtensions.Mvc\ImageResizer.FluentExtensions.Mvc.csproj", "{1C247E1B-9E7C-4C9B-A039-C5DBB3009179}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{96450540-386F-463B-9905-C496A5440C25}" + ProjectSection(SolutionItems) = preProject + nuget\ImageResizer.FluentExtensions.Mvc.nuspec = nuget\ImageResizer.FluentExtensions.Mvc.nuspec + nuget\ImageResizer.FluentExtensions.nuspec = nuget\ImageResizer.FluentExtensions.nuspec + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{16881C95-E325-4AF5-BA38-048BB9649722}" + ProjectSection(SolutionItems) = preProject + src\Version.cs = src\Version.cs + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C3811C42-0118-443B-B0EB-FA82129B8C69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C3811C42-0118-443B-B0EB-FA82129B8C69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C3811C42-0118-443B-B0EB-FA82129B8C69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C3811C42-0118-443B-B0EB-FA82129B8C69}.Release|Any CPU.Build.0 = Release|Any CPU + {1ABDEC38-BA6A-4D24-A324-0C0D790413C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1ABDEC38-BA6A-4D24-A324-0C0D790413C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1ABDEC38-BA6A-4D24-A324-0C0D790413C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1ABDEC38-BA6A-4D24-A324-0C0D790413C8}.Release|Any CPU.Build.0 = Release|Any CPU + {13B6E47F-26DE-431E-BAF7-35BAC532A98D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13B6E47F-26DE-431E-BAF7-35BAC532A98D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13B6E47F-26DE-431E-BAF7-35BAC532A98D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13B6E47F-26DE-431E-BAF7-35BAC532A98D}.Release|Any CPU.Build.0 = Release|Any CPU + {1C247E1B-9E7C-4C9B-A039-C5DBB3009179}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C247E1B-9E7C-4C9B-A039-C5DBB3009179}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C247E1B-9E7C-4C9B-A039-C5DBB3009179}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C247E1B-9E7C-4C9B-A039-C5DBB3009179}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/Site.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/Site.css new file mode 100644 index 0000000..56ff8bd --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/Site.css @@ -0,0 +1,75 @@ +body +{ + font-size: .85em; + font-family: "Trebuchet MS", Verdana, Helvetica, Sans-Serif; + color: #232323; + background-color: #fff; +} + +header, +footer, +nav, +section { + display: block; +} + +/* Styles for basic forms +-----------------------------------------------------------*/ + +fieldset +{ + border:1px solid #ddd; + padding:0 1.4em 1.4em 1.4em; + margin:0 0 1.5em 0; +} + +legend +{ + font-size:1.2em; + font-weight: bold; +} + +textarea +{ + min-height: 75px; +} + +.editor-label +{ + margin: 1em 0 0 0; +} + +.editor-field +{ + margin:0.5em 0 0 0; +} + + +/* Styles for validation helpers +-----------------------------------------------------------*/ +.field-validation-error +{ + color: #ff0000; +} + +.field-validation-valid +{ + display: none; +} + +.input-validation-error +{ + border: 1px solid #ff0000; + background-color: #ffeeee; +} + +.validation-summary-errors +{ + font-weight: bold; + color: #ff0000; +} + +.validation-summary-valid +{ + display: none; +} diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000..5b5dab2 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000..ac8b229 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..ad3d634 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..42ccba2 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..5a46b47 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..86c2baa Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..4443fdc Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..7c9fa6c Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_222222_256x240.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..ee039dc Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_222222_256x240.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_2e83ff_256x240.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..45e8928 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_2e83ff_256x240.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_454545_256x240.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..7ec70d1 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_454545_256x240.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_888888_256x240.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..5ba708c Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_888888_256x240.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_cd0a0a_256x240.png b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..7930a55 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/images/ui-icons_cd0a0a_256x240.png differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.accordion.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.accordion.css new file mode 100644 index 0000000..4a67cbf --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.accordion.css @@ -0,0 +1,24 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Accordion 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.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; } +.ui-accordion .ui-accordion-content-active { display: block; } diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.all.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.all.css new file mode 100644 index 0000000..2b2c103 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.all.css @@ -0,0 +1,16 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI CSS Framework 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Theming + */ +@import "jquery.ui.base.css"; +@import "jquery.ui.theme.css"; diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.autocomplete.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.autocomplete.css new file mode 100644 index 0000000..aac4e20 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.autocomplete.css @@ -0,0 +1,62 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Autocomplete 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Menu 1.8.11 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.base.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.base.css new file mode 100644 index 0000000..f52ee39 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.base.css @@ -0,0 +1,11 @@ +@import url("jquery.ui.core.css"); +@import url("jquery.ui.resizable.css"); +@import url("jquery.ui.selectable.css"); +@import url("jquery.ui.accordion.css"); +@import url("jquery.ui.autocomplete.css"); +@import url("jquery.ui.button.css"); +@import url("jquery.ui.dialog.css"); +@import url("jquery.ui.slider.css"); +@import url("jquery.ui.tabs.css"); +@import url("jquery.ui.datepicker.css"); +@import url("jquery.ui.progressbar.css"); \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.button.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.button.css new file mode 100644 index 0000000..af6c985 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.button.css @@ -0,0 +1,43 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Button 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Button#theming + */ +.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 */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.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; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.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; } +.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; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.core.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.core.css new file mode 100644 index 0000000..55fb8b0 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.core.css @@ -0,0 +1,46 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI CSS Framework 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.datepicker.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.datepicker.css new file mode 100644 index 0000000..7126923 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.datepicker.css @@ -0,0 +1,73 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Datepicker 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.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; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.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; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.dialog.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.dialog.css new file mode 100644 index 0000000..311dd32 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.dialog.css @@ -0,0 +1,26 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Dialog 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.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; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.progressbar.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.progressbar.css new file mode 100644 index 0000000..6e8718e --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.progressbar.css @@ -0,0 +1,16 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Progressbar 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.resizable.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.resizable.css new file mode 100644 index 0000000..bf037be --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.resizable.css @@ -0,0 +1,25 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Resizable 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)] + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.selectable.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.selectable.css new file mode 100644 index 0000000..011416b --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.selectable.css @@ -0,0 +1,15 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Selectable 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.slider.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.slider.css new file mode 100644 index 0000000..3bbfb93 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.slider.css @@ -0,0 +1,29 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Slider 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.tabs.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.tabs.css new file mode 100644 index 0000000..aa5cd8a --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.tabs.css @@ -0,0 +1,23 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI Tabs 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.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") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.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; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.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; } +.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... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.theme.css b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.theme.css new file mode 100644 index 0000000..0d5b735 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Content/themes/base/jquery.ui.theme.css @@ -0,0 +1,257 @@ +/* + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery UI CSS Framework 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/ + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; border-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Controllers/HomeController.cs b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Controllers/HomeController.cs new file mode 100644 index 0000000..d74ccb7 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Controllers/HomeController.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace ImageResizer.FluentExtensions.Tests.Web.Controllers +{ + public class HomeController : Controller + { + // + // GET: /Home/ + + public ActionResult Index() + { + return View(); + } + + } +} diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Global.asax b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Global.asax new file mode 100644 index 0000000..6d438b7 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="ImageResizer.FluentExtensions.Tests.Web.MvcApplication" Language="C#" %> diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Global.asax.cs b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Global.asax.cs new file mode 100644 index 0000000..71d5321 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Global.asax.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; + +namespace ImageResizer.FluentExtensions.Tests.Web +{ + // Note: For instructions on enabling IIS6 or IIS7 classic mode, + // visit http://go.microsoft.com/?LinkId=9394801 + + public class MvcApplication : System.Web.HttpApplication + { + public static void RegisterGlobalFilters(GlobalFilterCollection filters) + { + filters.Add(new HandleErrorAttribute()); + } + + public static void RegisterRoutes(RouteCollection routes) + { + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + + routes.MapRoute( + "Default", // Route name + "{controller}/{action}/{id}", // URL with parameters + new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults + ); + + } + + protected void Application_Start() + { + AreaRegistration.RegisterAllAreas(); + + RegisterGlobalFilters(GlobalFilters.Filters); + RegisterRoutes(RouteTable.Routes); + } + } +} \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/ImageResizer.FluentExtensions.Tests.Web.csproj b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/ImageResizer.FluentExtensions.Tests.Web.csproj new file mode 100644 index 0000000..5898134 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/ImageResizer.FluentExtensions.Tests.Web.csproj @@ -0,0 +1,190 @@ + + + + Debug + AnyCPU + + + 2.0 + {13B6E47F-26DE-431E-BAF7-35BAC532A98D} + {E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + ImageResizer.FluentExtensions.Tests.Web + ImageResizer.FluentExtensions.Tests.Web + v4.0 + false + false + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + ..\packages\EntityFramework.4.1.10331.0\lib\EntityFramework.dll + + + False + ..\..\packages\ImageResizer.3.2.2\lib\ImageResizer.dll + + + ..\packages\ImageResizer.Mvc.3.1.5\lib\ImageResizer.Mvc.dll + + + ..\..\packages\ImageResizer.Plugins.RemoteReader.3.2.2\lib\ImageResizer.Plugins.RemoteReader.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Global.asax + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Web.config + + + Web.config + + + + + + + + + + + + + + + + + + + {1C247E1B-9E7C-4C9B-A039-C5DBB3009179} + ImageResizer.FluentExtensions.Mvc + + + {C3811C42-0118-443B-B0EB-FA82129B8C69} + ImageResizer.FluentExtensions + + + + + + + + + + + + + + + + + + + False + True + 49653 + / + + + False + False + + + False + + + + + \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Images/image.jpg b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Images/image.jpg new file mode 100644 index 0000000..400fab7 Binary files /dev/null and b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Images/image.jpg differ diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Properties/AssemblyInfo.cs b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..342c353 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ImageResizer.FluentExtensions.Tests.Web")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ImageResizer.FluentExtensions.Tests.Web")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5e3b3d36-b103-4736-94d7-16d7d187ec74")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftAjax.debug.js b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftAjax.debug.js new file mode 100644 index 0000000..a5f7942 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftAjax.debug.js @@ -0,0 +1,7117 @@ +// Name: MicrosoftAjax.debug.js +// Assembly: System.Web.Extensions +// Version: 4.0.0.0 +// FileVersion: 4.0.20526.0 +//----------------------------------------------------------------------- +// Copyright (C) Microsoft Corporation. All rights reserved. +//----------------------------------------------------------------------- +// MicrosoftAjax.js +// Microsoft AJAX Framework. + +Function.__typeName = 'Function'; +Function.__class = true; +Function.createCallback = function Function$createCallback(method, context) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "method", type: Function}, + {name: "context", mayBeNull: true} + ]); + if (e) throw e; + return function() { + var l = arguments.length; + if (l > 0) { + var args = []; + for (var i = 0; i < l; i++) { + args[i] = arguments[i]; + } + args[l] = context; + return method.apply(this, args); + } + return method.call(this, context); + } +} +Function.createDelegate = function Function$createDelegate(instance, method) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance", mayBeNull: true}, + {name: "method", type: Function} + ]); + if (e) throw e; + return function() { + return method.apply(instance, arguments); + } +} +Function.emptyFunction = Function.emptyMethod = function Function$emptyMethod() { + /// +} +Function.validateParameters = function Function$validateParameters(parameters, expectedParameters, validateParameterCount) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "parameters"}, + {name: "expectedParameters"}, + {name: "validateParameterCount", type: Boolean, optional: true} + ]); + if (e) throw e; + return Function._validateParams(parameters, expectedParameters, validateParameterCount); +} +Function._validateParams = function Function$_validateParams(params, expectedParams, validateParameterCount) { + var e, expectedLength = expectedParams.length; + validateParameterCount = validateParameterCount || (typeof(validateParameterCount) === "undefined"); + e = Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i = 0, l = params.length; i < l; i++) { + var expectedParam = expectedParams[Math.min(i, expectedLength - 1)], + paramName = expectedParam.name; + if (expectedParam.parameterArray) { + paramName += "[" + (i - expectedLength + 1) + "]"; + } + else if (!validateParameterCount && (i >= expectedLength)) { + break; + } + e = Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; +} +Function._validateParameterCount = function Function$_validateParameterCount(params, expectedParams, validateParameterCount) { + var i, error, + expectedLen = expectedParams.length, + actualLen = params.length; + if (actualLen < expectedLen) { + var minParams = expectedLen; + for (i = 0; i < expectedLen; i++) { + var param = expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error = true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error = true; + for (i = 0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error = false; + break; + } + } + } + if (error) { + var e = Error.parameterCount(); + e.popStackFrame(); + return e; + } + return null; +} +Function._validateParameter = function Function$_validateParameter(param, expectedParam, paramName) { + var e, + expectedType = expectedParam.type, + expectedInteger = !!expectedParam.integer, + expectedDomElement = !!expectedParam.domElement, + mayBeNull = !!expectedParam.mayBeNull; + e = Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType = expectedParam.elementType, + elementMayBeNull = !!expectedParam.elementMayBeNull; + if (expectedType === Array && typeof(param) !== "undefined" && param !== null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger = !!expectedParam.elementInteger, + expectedElementDomElement = !!expectedParam.elementDomElement; + for (var i=0; i < param.length; i++) { + var elem = param[i]; + e = Function._validateParameterType(elem, expectedElementType, + expectedElementInteger, expectedElementDomElement, elementMayBeNull, + paramName + "[" + i + "]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; +} +Function._validateParameterType = function Function$_validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof(param) === "undefined") { + if (mayBeNull) { + return null; + } + else { + e = Error.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param === null) { + if (mayBeNull) { + return null; + } + else { + e = Error.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && expectedType.__enum) { + if (typeof(param) !== 'number') { + e = Error.argumentType(paramName, Object.getType(param), expectedType); + e.popStackFrame(); + return e; + } + if ((param % 1) === 0) { + var values = expectedType.prototype; + if (!expectedType.__flags || (param === 0)) { + for (i in values) { + if (values[i] === param) return null; + } + } + else { + var v = param; + for (i in values) { + var vali = values[i]; + if (vali === 0) continue; + if ((vali & param) === vali) { + v -= vali; + } + if (v === 0) return null; + } + } + } + e = Error.argumentOutOfRange(paramName, param, String.format(Sys.Res.enumInvalidValue, param, expectedType.getName())); + e.popStackFrame(); + return e; + } + if (expectedDomElement && (!Sys._isDomElement(param) || (param.nodeType === 3))) { + e = Error.argument(paramName, Sys.Res.argumentDomElement); + e.popStackFrame(); + return e; + } + if (expectedType && !Sys._isInstanceOfType(expectedType, param)) { + e = Error.argumentType(paramName, Object.getType(param), expectedType); + e.popStackFrame(); + return e; + } + if (expectedType === Number && expectedInteger) { + if ((param % 1) !== 0) { + e = Error.argumentOutOfRange(paramName, param, Sys.Res.argumentInteger); + e.popStackFrame(); + return e; + } + } + return null; +} + +Error.__typeName = 'Error'; +Error.__class = true; +Error.create = function Error$create(message, errorInfo) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "message", type: String, mayBeNull: true, optional: true}, + {name: "errorInfo", mayBeNull: true, optional: true} + ]); + if (e) throw e; + var err = new Error(message); + err.message = message; + if (errorInfo) { + for (var v in errorInfo) { + err[v] = errorInfo[v]; + } + } + err.popStackFrame(); + return err; +} +Error.argument = function Error$argument(paramName, message) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "paramName", type: String, mayBeNull: true, optional: true}, + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.ArgumentException: " + (message ? message : Sys.Res.argument); + if (paramName) { + displayMessage += "\n" + String.format(Sys.Res.paramName, paramName); + } + var err = Error.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; +} +Error.argumentNull = function Error$argumentNull(paramName, message) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "paramName", type: String, mayBeNull: true, optional: true}, + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.ArgumentNullException: " + (message ? message : Sys.Res.argumentNull); + if (paramName) { + displayMessage += "\n" + String.format(Sys.Res.paramName, paramName); + } + var err = Error.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; +} +Error.argumentOutOfRange = function Error$argumentOutOfRange(paramName, actualValue, message) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "paramName", type: String, mayBeNull: true, optional: true}, + {name: "actualValue", mayBeNull: true, optional: true}, + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.ArgumentOutOfRangeException: " + (message ? message : Sys.Res.argumentOutOfRange); + if (paramName) { + displayMessage += "\n" + String.format(Sys.Res.paramName, paramName); + } + if (typeof(actualValue) !== "undefined" && actualValue !== null) { + displayMessage += "\n" + String.format(Sys.Res.actualValue, actualValue); + } + var err = Error.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; +} +Error.argumentType = function Error$argumentType(paramName, actualType, expectedType, message) { + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "paramName", type: String, mayBeNull: true, optional: true}, + {name: "actualType", type: Type, mayBeNull: true, optional: true}, + {name: "expectedType", type: Type, mayBeNull: true, optional: true}, + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.ArgumentTypeException: "; + if (message) { + displayMessage += message; + } + else if (actualType && expectedType) { + displayMessage += + String.format(Sys.Res.argumentTypeWithTypes, actualType.getName(), expectedType.getName()); + } + else { + displayMessage += Sys.Res.argumentType; + } + if (paramName) { + displayMessage += "\n" + String.format(Sys.Res.paramName, paramName); + } + var err = Error.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; +} +Error.argumentUndefined = function Error$argumentUndefined(paramName, message) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "paramName", type: String, mayBeNull: true, optional: true}, + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.ArgumentUndefinedException: " + (message ? message : Sys.Res.argumentUndefined); + if (paramName) { + displayMessage += "\n" + String.format(Sys.Res.paramName, paramName); + } + var err = Error.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; +} +Error.format = function Error$format(message) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.FormatException: " + (message ? message : Sys.Res.format); + var err = Error.create(displayMessage, {name: 'Sys.FormatException'}); + err.popStackFrame(); + return err; +} +Error.invalidOperation = function Error$invalidOperation(message) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.InvalidOperationException: " + (message ? message : Sys.Res.invalidOperation); + var err = Error.create(displayMessage, {name: 'Sys.InvalidOperationException'}); + err.popStackFrame(); + return err; +} +Error.notImplemented = function Error$notImplemented(message) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.NotImplementedException: " + (message ? message : Sys.Res.notImplemented); + var err = Error.create(displayMessage, {name: 'Sys.NotImplementedException'}); + err.popStackFrame(); + return err; +} +Error.parameterCount = function Error$parameterCount(message) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "message", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var displayMessage = "Sys.ParameterCountException: " + (message ? message : Sys.Res.parameterCount); + var err = Error.create(displayMessage, {name: 'Sys.ParameterCountException'}); + err.popStackFrame(); + return err; +} +Error.prototype.popStackFrame = function Error$popStackFrame() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (typeof(this.stack) === "undefined" || this.stack === null || + typeof(this.fileName) === "undefined" || this.fileName === null || + typeof(this.lineNumber) === "undefined" || this.lineNumber === null) { + return; + } + var stackFrames = this.stack.split("\n"); + var currentFrame = stackFrames[0]; + var pattern = this.fileName + ":" + this.lineNumber; + while(typeof(currentFrame) !== "undefined" && + currentFrame !== null && + currentFrame.indexOf(pattern) === -1) { + stackFrames.shift(); + currentFrame = stackFrames[0]; + } + var nextFrame = stackFrames[1]; + if (typeof(nextFrame) === "undefined" || nextFrame === null) { + return; + } + var nextFrameParts = nextFrame.match(/@(.*):(\d+)$/); + if (typeof(nextFrameParts) === "undefined" || nextFrameParts === null) { + return; + } + this.fileName = nextFrameParts[1]; + this.lineNumber = parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack = stackFrames.join("\n"); +} + +Object.__typeName = 'Object'; +Object.__class = true; +Object.getType = function Object$getType(instance) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance"} + ]); + if (e) throw e; + var ctor = instance.constructor; + if (!ctor || (typeof(ctor) !== "function") || !ctor.__typeName || (ctor.__typeName === 'Object')) { + return Object; + } + return ctor; +} +Object.getTypeName = function Object$getTypeName(instance) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance"} + ]); + if (e) throw e; + return Object.getType(instance).getName(); +} + +String.__typeName = 'String'; +String.__class = true; +String.prototype.endsWith = function String$endsWith(suffix) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "suffix", type: String} + ]); + if (e) throw e; + return (this.substr(this.length - suffix.length) === suffix); +} +String.prototype.startsWith = function String$startsWith(prefix) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "prefix", type: String} + ]); + if (e) throw e; + return (this.substr(0, prefix.length) === prefix); +} +String.prototype.trim = function String$trim() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this.replace(/^\s+|\s+$/g, ''); +} +String.prototype.trimEnd = function String$trimEnd() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this.replace(/\s+$/, ''); +} +String.prototype.trimStart = function String$trimStart() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this.replace(/^\s+/, ''); +} +String.format = function String$format(format, args) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "format", type: String}, + {name: "args", mayBeNull: true, parameterArray: true} + ]); + if (e) throw e; + return String._toFormattedString(false, arguments); +} +String._toFormattedString = function String$_toFormattedString(useLocale, args) { + var result = ''; + var format = args[0]; + for (var i=0;;) { + var open = format.indexOf('{', i); + var close = format.indexOf('}', i); + if ((open < 0) && (close < 0)) { + result += format.slice(i); + break; + } + if ((close > 0) && ((close < open) || (open < 0))) { + if (format.charAt(close + 1) !== '}') { + throw Error.argument('format', Sys.Res.stringFormatBraceMismatch); + } + result += format.slice(i, close + 1); + i = close + 2; + continue; + } + result += format.slice(i, open); + i = open + 1; + if (format.charAt(i) === '{') { + result += '{'; + i++; + continue; + } + if (close < 0) throw Error.argument('format', Sys.Res.stringFormatBraceMismatch); + var brace = format.substring(i, close); + var colonIndex = brace.indexOf(':'); + var argNumber = parseInt((colonIndex < 0)? brace : brace.substring(0, colonIndex), 10) + 1; + if (isNaN(argNumber)) throw Error.argument('format', Sys.Res.stringFormatInvalid); + var argFormat = (colonIndex < 0)? '' : brace.substring(colonIndex + 1); + var arg = args[argNumber]; + if (typeof(arg) === "undefined" || arg === null) { + arg = ''; + } + if (arg.toFormattedString) { + result += arg.toFormattedString(argFormat); + } + else if (useLocale && arg.localeFormat) { + result += arg.localeFormat(argFormat); + } + else if (arg.format) { + result += arg.format(argFormat); + } + else + result += arg.toString(); + i = close + 1; + } + return result; +} + +Boolean.__typeName = 'Boolean'; +Boolean.__class = true; +Boolean.parse = function Boolean$parse(value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String} + ], false); + if (e) throw e; + var v = value.trim().toLowerCase(); + if (v === 'false') return false; + if (v === 'true') return true; + throw Error.argumentOutOfRange('value', value, Sys.Res.boolTrueOrFalse); +} + +Date.__typeName = 'Date'; +Date.__class = true; + +Number.__typeName = 'Number'; +Number.__class = true; + +RegExp.__typeName = 'RegExp'; +RegExp.__class = true; + +if (!window) this.window = this; +window.Type = Function; +Type.__fullyQualifiedIdentifierRegExp = new RegExp("^[^.0-9 \\s|,;:&*=+\\-()\\[\\]{}^%#@!~\\n\\r\\t\\f\\\\]([^ \\s|,;:&*=+\\-()\\[\\]{}^%#@!~\\n\\r\\t\\f\\\\]*[^. \\s|,;:&*=+\\-()\\[\\]{}^%#@!~\\n\\r\\t\\f\\\\])?$", "i"); +Type.__identifierRegExp = new RegExp("^[^.0-9 \\s|,;:&*=+\\-()\\[\\]{}^%#@!~\\n\\r\\t\\f\\\\][^. \\s|,;:&*=+\\-()\\[\\]{}^%#@!~\\n\\r\\t\\f\\\\]*$", "i"); +Type.prototype.callBaseMethod = function Type$callBaseMethod(instance, name, baseArguments) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance"}, + {name: "name", type: String}, + {name: "baseArguments", type: Array, mayBeNull: true, optional: true, elementMayBeNull: true} + ]); + if (e) throw e; + var baseMethod = Sys._getBaseMethod(this, instance, name); + if (!baseMethod) throw Error.invalidOperation(String.format(Sys.Res.methodNotFound, name)); + if (!baseArguments) { + return baseMethod.apply(instance); + } + else { + return baseMethod.apply(instance, baseArguments); + } +} +Type.prototype.getBaseMethod = function Type$getBaseMethod(instance, name) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance"}, + {name: "name", type: String} + ]); + if (e) throw e; + return Sys._getBaseMethod(this, instance, name); +} +Type.prototype.getBaseType = function Type$getBaseType() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return (typeof(this.__baseType) === "undefined") ? null : this.__baseType; +} +Type.prototype.getInterfaces = function Type$getInterfaces() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + var result = []; + var type = this; + while(type) { + var interfaces = type.__interfaces; + if (interfaces) { + for (var i = 0, l = interfaces.length; i < l; i++) { + var interfaceType = interfaces[i]; + if (!Array.contains(result, interfaceType)) { + result[result.length] = interfaceType; + } + } + } + type = type.__baseType; + } + return result; +} +Type.prototype.getName = function Type$getName() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return (typeof(this.__typeName) === "undefined") ? "" : this.__typeName; +} +Type.prototype.implementsInterface = function Type$implementsInterface(interfaceType) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "interfaceType", type: Type} + ]); + if (e) throw e; + this.resolveInheritance(); + var interfaceName = interfaceType.getName(); + var cache = this.__interfaceCache; + if (cache) { + var cacheEntry = cache[interfaceName]; + if (typeof(cacheEntry) !== 'undefined') return cacheEntry; + } + else { + cache = this.__interfaceCache = {}; + } + var baseType = this; + while (baseType) { + var interfaces = baseType.__interfaces; + if (interfaces) { + if (Array.indexOf(interfaces, interfaceType) !== -1) { + return cache[interfaceName] = true; + } + } + baseType = baseType.__baseType; + } + return cache[interfaceName] = false; +} +Type.prototype.inheritsFrom = function Type$inheritsFrom(parentType) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "parentType", type: Type} + ]); + if (e) throw e; + this.resolveInheritance(); + var baseType = this.__baseType; + while (baseType) { + if (baseType === parentType) { + return true; + } + baseType = baseType.__baseType; + } + return false; +} +Type.prototype.initializeBase = function Type$initializeBase(instance, baseArguments) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance"}, + {name: "baseArguments", type: Array, mayBeNull: true, optional: true, elementMayBeNull: true} + ]); + if (e) throw e; + if (!Sys._isInstanceOfType(this, instance)) throw Error.argumentType('instance', Object.getType(instance), this); + this.resolveInheritance(); + if (this.__baseType) { + if (!baseArguments) { + this.__baseType.apply(instance); + } + else { + this.__baseType.apply(instance, baseArguments); + } + } + return instance; +} +Type.prototype.isImplementedBy = function Type$isImplementedBy(instance) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance", mayBeNull: true} + ]); + if (e) throw e; + if (typeof(instance) === "undefined" || instance === null) return false; + var instanceType = Object.getType(instance); + return !!(instanceType.implementsInterface && instanceType.implementsInterface(this)); +} +Type.prototype.isInstanceOfType = function Type$isInstanceOfType(instance) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "instance", mayBeNull: true} + ]); + if (e) throw e; + return Sys._isInstanceOfType(this, instance); +} +Type.prototype.registerClass = function Type$registerClass(typeName, baseType, interfaceTypes) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "typeName", type: String}, + {name: "baseType", type: Type, mayBeNull: true, optional: true}, + {name: "interfaceTypes", type: Type, parameterArray: true} + ]); + if (e) throw e; + if (!Type.__fullyQualifiedIdentifierRegExp.test(typeName)) throw Error.argument('typeName', Sys.Res.notATypeName); + var parsedName; + try { + parsedName = eval(typeName); + } + catch(e) { + throw Error.argument('typeName', Sys.Res.argumentTypeName); + } + if (parsedName !== this) throw Error.argument('typeName', Sys.Res.badTypeName); + if (Sys.__registeredTypes[typeName]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, typeName)); + if ((arguments.length > 1) && (typeof(baseType) === 'undefined')) throw Error.argumentUndefined('baseType'); + if (baseType && !baseType.__class) throw Error.argument('baseType', Sys.Res.baseNotAClass); + this.prototype.constructor = this; + this.__typeName = typeName; + this.__class = true; + if (baseType) { + this.__baseType = baseType; + this.__basePrototypePending = true; + } + Sys.__upperCaseTypes[typeName.toUpperCase()] = this; + if (interfaceTypes) { + this.__interfaces = []; + this.resolveInheritance(); + for (var i = 2, l = arguments.length; i < l; i++) { + var interfaceType = arguments[i]; + if (!interfaceType.__interface) throw Error.argument('interfaceTypes[' + (i - 2) + ']', Sys.Res.notAnInterface); + for (var methodName in interfaceType.prototype) { + var method = interfaceType.prototype[methodName]; + if (!this.prototype[methodName]) { + this.prototype[methodName] = method; + } + } + this.__interfaces.push(interfaceType); + } + } + Sys.__registeredTypes[typeName] = true; + return this; +} +Type.prototype.registerInterface = function Type$registerInterface(typeName) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "typeName", type: String} + ]); + if (e) throw e; + if (!Type.__fullyQualifiedIdentifierRegExp.test(typeName)) throw Error.argument('typeName', Sys.Res.notATypeName); + var parsedName; + try { + parsedName = eval(typeName); + } + catch(e) { + throw Error.argument('typeName', Sys.Res.argumentTypeName); + } + if (parsedName !== this) throw Error.argument('typeName', Sys.Res.badTypeName); + if (Sys.__registeredTypes[typeName]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, typeName)); + Sys.__upperCaseTypes[typeName.toUpperCase()] = this; + this.prototype.constructor = this; + this.__typeName = typeName; + this.__interface = true; + Sys.__registeredTypes[typeName] = true; + return this; +} +Type.prototype.resolveInheritance = function Type$resolveInheritance() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this.__basePrototypePending) { + var baseType = this.__baseType; + baseType.resolveInheritance(); + for (var memberName in baseType.prototype) { + var memberValue = baseType.prototype[memberName]; + if (!this.prototype[memberName]) { + this.prototype[memberName] = memberValue; + } + } + delete this.__basePrototypePending; + } +} +Type.getRootNamespaces = function Type$getRootNamespaces() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return Array.clone(Sys.__rootNamespaces); +} +Type.isClass = function Type$isClass(type) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "type", mayBeNull: true} + ]); + if (e) throw e; + if ((typeof(type) === 'undefined') || (type === null)) return false; + return !!type.__class; +} +Type.isInterface = function Type$isInterface(type) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "type", mayBeNull: true} + ]); + if (e) throw e; + if ((typeof(type) === 'undefined') || (type === null)) return false; + return !!type.__interface; +} +Type.isNamespace = function Type$isNamespace(object) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "object", mayBeNull: true} + ]); + if (e) throw e; + if ((typeof(object) === 'undefined') || (object === null)) return false; + return !!object.__namespace; +} +Type.parse = function Type$parse(typeName, ns) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "typeName", type: String, mayBeNull: true}, + {name: "ns", mayBeNull: true, optional: true} + ]); + if (e) throw e; + var fn; + if (ns) { + fn = Sys.__upperCaseTypes[ns.getName().toUpperCase() + '.' + typeName.toUpperCase()]; + return fn || null; + } + if (!typeName) return null; + if (!Type.__htClasses) { + Type.__htClasses = {}; + } + fn = Type.__htClasses[typeName]; + if (!fn) { + fn = eval(typeName); + if (typeof(fn) !== 'function') throw Error.argument('typeName', Sys.Res.notATypeName); + Type.__htClasses[typeName] = fn; + } + return fn; +} +Type.registerNamespace = function Type$registerNamespace(namespacePath) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "namespacePath", type: String} + ]); + if (e) throw e; + Type._registerNamespace(namespacePath); +} +Type._registerNamespace = function Type$_registerNamespace(namespacePath) { + if (!Type.__fullyQualifiedIdentifierRegExp.test(namespacePath)) throw Error.argument('namespacePath', Sys.Res.invalidNameSpace); + var rootObject = window; + var namespaceParts = namespacePath.split('.'); + for (var i = 0; i < namespaceParts.length; i++) { + var currentPart = namespaceParts[i]; + var ns = rootObject[currentPart]; + var nsType = typeof(ns); + if ((nsType !== "undefined") && (ns !== null)) { + if (nsType === "function") { + throw Error.invalidOperation(String.format(Sys.Res.namespaceContainsClass, namespaceParts.splice(0, i + 1).join('.'))); + } + if ((typeof(ns) !== "object") || (ns instanceof Array)) { + throw Error.invalidOperation(String.format(Sys.Res.namespaceContainsNonObject, namespaceParts.splice(0, i + 1).join('.'))); + } + } + if (!ns) { + ns = rootObject[currentPart] = {}; + } + if (!ns.__namespace) { + if ((i === 0) && (namespacePath !== "Sys")) { + Sys.__rootNamespaces[Sys.__rootNamespaces.length] = ns; + } + ns.__namespace = true; + ns.__typeName = namespaceParts.slice(0, i + 1).join('.'); + var parsedName; + try { + parsedName = eval(ns.__typeName); + } + catch(e) { + parsedName = null; + } + if (parsedName !== ns) { + delete rootObject[currentPart]; + throw Error.argument('namespacePath', Sys.Res.invalidNameSpace); + } + ns.getName = function ns$getName() {return this.__typeName;} + } + rootObject = ns; + } +} +Type._checkDependency = function Type$_checkDependency(dependency, featureName) { + var scripts = Type._registerScript._scripts, isDependent = (scripts ? (!!scripts[dependency]) : false); + if ((typeof(featureName) !== 'undefined') && !isDependent) { + throw Error.invalidOperation(String.format(Sys.Res.requiredScriptReferenceNotIncluded, + featureName, dependency)); + } + return isDependent; +} +Type._registerScript = function Type$_registerScript(scriptName, dependencies) { + var scripts = Type._registerScript._scripts; + if (!scripts) { + Type._registerScript._scripts = scripts = {}; + } + if (scripts[scriptName]) { + throw Error.invalidOperation(String.format(Sys.Res.scriptAlreadyLoaded, scriptName)); + } + scripts[scriptName] = true; + if (dependencies) { + for (var i = 0, l = dependencies.length; i < l; i++) { + var dependency = dependencies[i]; + if (!Type._checkDependency(dependency)) { + throw Error.invalidOperation(String.format(Sys.Res.scriptDependencyNotFound, scriptName, dependency)); + } + } + } +} +Type._registerNamespace("Sys"); +Sys.__upperCaseTypes = {}; +Sys.__rootNamespaces = [Sys]; +Sys.__registeredTypes = {}; +Sys._isInstanceOfType = function Sys$_isInstanceOfType(type, instance) { + if (typeof(instance) === "undefined" || instance === null) return false; + if (instance instanceof type) return true; + var instanceType = Object.getType(instance); + return !!(instanceType === type) || + (instanceType.inheritsFrom && instanceType.inheritsFrom(type)) || + (instanceType.implementsInterface && instanceType.implementsInterface(type)); +} +Sys._getBaseMethod = function Sys$_getBaseMethod(type, instance, name) { + if (!Sys._isInstanceOfType(type, instance)) throw Error.argumentType('instance', Object.getType(instance), type); + var baseType = type.getBaseType(); + if (baseType) { + var baseMethod = baseType.prototype[name]; + return (baseMethod instanceof Function) ? baseMethod : null; + } + return null; +} +Sys._isDomElement = function Sys$_isDomElement(obj) { + var val = false; + if (typeof (obj.nodeType) !== 'number') { + var doc = obj.ownerDocument || obj.document || obj; + if (doc != obj) { + var w = doc.defaultView || doc.parentWindow; + val = (w != obj); + } + else { + val = (typeof (doc.body) === 'undefined'); + } + } + return !val; +} + +Array.__typeName = 'Array'; +Array.__class = true; +Array.add = Array.enqueue = function Array$enqueue(array, item) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "item", mayBeNull: true} + ]); + if (e) throw e; + array[array.length] = item; +} +Array.addRange = function Array$addRange(array, items) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "items", type: Array, elementMayBeNull: true} + ]); + if (e) throw e; + array.push.apply(array, items); +} +Array.clear = function Array$clear(array) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true} + ]); + if (e) throw e; + array.length = 0; +} +Array.clone = function Array$clone(array) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true} + ]); + if (e) throw e; + if (array.length === 1) { + return [array[0]]; + } + else { + return Array.apply(null, array); + } +} +Array.contains = function Array$contains(array, item) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "item", mayBeNull: true} + ]); + if (e) throw e; + return (Sys._indexOf(array, item) >= 0); +} +Array.dequeue = function Array$dequeue(array) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true} + ]); + if (e) throw e; + return array.shift(); +} +Array.forEach = function Array$forEach(array, method, instance) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "method", type: Function}, + {name: "instance", mayBeNull: true, optional: true} + ]); + if (e) throw e; + for (var i = 0, l = array.length; i < l; i++) { + var elt = array[i]; + if (typeof(elt) !== 'undefined') method.call(instance, elt, i, array); + } +} +Array.indexOf = function Array$indexOf(array, item, start) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "item", mayBeNull: true, optional: true}, + {name: "start", mayBeNull: true, optional: true} + ]); + if (e) throw e; + return Sys._indexOf(array, item, start); +} +Array.insert = function Array$insert(array, index, item) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "index", mayBeNull: true}, + {name: "item", mayBeNull: true} + ]); + if (e) throw e; + array.splice(index, 0, item); +} +Array.parse = function Array$parse(value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String, mayBeNull: true} + ]); + if (e) throw e; + if (!value) return []; + var v = eval(value); + if (!Array.isInstanceOfType(v)) throw Error.argument('value', Sys.Res.arrayParseBadFormat); + return v; +} +Array.remove = function Array$remove(array, item) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "item", mayBeNull: true} + ]); + if (e) throw e; + var index = Sys._indexOf(array, item); + if (index >= 0) { + array.splice(index, 1); + } + return (index >= 0); +} +Array.removeAt = function Array$removeAt(array, index) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "array", type: Array, elementMayBeNull: true}, + {name: "index", mayBeNull: true} + ]); + if (e) throw e; + array.splice(index, 1); +} +Sys._indexOf = function Sys$_indexOf(array, item, start) { + if (typeof(item) === "undefined") return -1; + var length = array.length; + if (length !== 0) { + start = start - 0; + if (isNaN(start)) { + start = 0; + } + else { + if (isFinite(start)) { + start = start - (start % 1); + } + if (start < 0) { + start = Math.max(0, length + start); + } + } + for (var i = start; i < length; i++) { + if ((typeof(array[i]) !== "undefined") && (array[i] === item)) { + return i; + } + } + } + return -1; +} +Type._registerScript._scripts = { + "MicrosoftAjaxCore.js": true, + "MicrosoftAjaxGlobalization.js": true, + "MicrosoftAjaxSerialization.js": true, + "MicrosoftAjaxComponentModel.js": true, + "MicrosoftAjaxHistory.js": true, + "MicrosoftAjaxNetwork.js" : true, + "MicrosoftAjaxWebServices.js": true }; + +Sys.IDisposable = function Sys$IDisposable() { + throw Error.notImplemented(); +} + function Sys$IDisposable$dispose() { + throw Error.notImplemented(); + } +Sys.IDisposable.prototype = { + dispose: Sys$IDisposable$dispose +} +Sys.IDisposable.registerInterface('Sys.IDisposable'); + +Sys.StringBuilder = function Sys$StringBuilder(initialText) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "initialText", mayBeNull: true, optional: true} + ]); + if (e) throw e; + this._parts = (typeof(initialText) !== 'undefined' && initialText !== null && initialText !== '') ? + [initialText.toString()] : []; + this._value = {}; + this._len = 0; +} + function Sys$StringBuilder$append(text) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "text", mayBeNull: true} + ]); + if (e) throw e; + this._parts[this._parts.length] = text; + } + function Sys$StringBuilder$appendLine(text) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "text", mayBeNull: true, optional: true} + ]); + if (e) throw e; + this._parts[this._parts.length] = + ((typeof(text) === 'undefined') || (text === null) || (text === '')) ? + '\r\n' : text + '\r\n'; + } + function Sys$StringBuilder$clear() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._parts = []; + this._value = {}; + this._len = 0; + } + function Sys$StringBuilder$isEmpty() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this._parts.length === 0) return true; + return this.toString() === ''; + } + function Sys$StringBuilder$toString(separator) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "separator", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + separator = separator || ''; + var parts = this._parts; + if (this._len !== parts.length) { + this._value = {}; + this._len = parts.length; + } + var val = this._value; + if (typeof(val[separator]) === 'undefined') { + if (separator !== '') { + for (var i = 0; i < parts.length;) { + if ((typeof(parts[i]) === 'undefined') || (parts[i] === '') || (parts[i] === null)) { + parts.splice(i, 1); + } + else { + i++; + } + } + } + val[separator] = this._parts.join(separator); + } + return val[separator]; + } +Sys.StringBuilder.prototype = { + append: Sys$StringBuilder$append, + appendLine: Sys$StringBuilder$appendLine, + clear: Sys$StringBuilder$clear, + isEmpty: Sys$StringBuilder$isEmpty, + toString: Sys$StringBuilder$toString +} +Sys.StringBuilder.registerClass('Sys.StringBuilder'); + +Sys.Browser = {}; +Sys.Browser.InternetExplorer = {}; +Sys.Browser.Firefox = {}; +Sys.Browser.Safari = {}; +Sys.Browser.Opera = {}; +Sys.Browser.agent = null; +Sys.Browser.hasDebuggerStatement = false; +Sys.Browser.name = navigator.appName; +Sys.Browser.version = parseFloat(navigator.appVersion); +Sys.Browser.documentMode = 0; +if (navigator.userAgent.indexOf(' MSIE ') > -1) { + Sys.Browser.agent = Sys.Browser.InternetExplorer; + Sys.Browser.version = parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]); + if (Sys.Browser.version >= 8) { + if (document.documentMode >= 7) { + Sys.Browser.documentMode = document.documentMode; + } + } + Sys.Browser.hasDebuggerStatement = true; +} +else if (navigator.userAgent.indexOf(' Firefox/') > -1) { + Sys.Browser.agent = Sys.Browser.Firefox; + Sys.Browser.version = parseFloat(navigator.userAgent.match(/ Firefox\/(\d+\.\d+)/)[1]); + Sys.Browser.name = 'Firefox'; + Sys.Browser.hasDebuggerStatement = true; +} +else if (navigator.userAgent.indexOf(' AppleWebKit/') > -1) { + Sys.Browser.agent = Sys.Browser.Safari; + Sys.Browser.version = parseFloat(navigator.userAgent.match(/ AppleWebKit\/(\d+(\.\d+)?)/)[1]); + Sys.Browser.name = 'Safari'; +} +else if (navigator.userAgent.indexOf('Opera/') > -1) { + Sys.Browser.agent = Sys.Browser.Opera; +} + +Sys.EventArgs = function Sys$EventArgs() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); +} +Sys.EventArgs.registerClass('Sys.EventArgs'); +Sys.EventArgs.Empty = new Sys.EventArgs(); + +Sys.CancelEventArgs = function Sys$CancelEventArgs() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + Sys.CancelEventArgs.initializeBase(this); + this._cancel = false; +} + function Sys$CancelEventArgs$get_cancel() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._cancel; + } + function Sys$CancelEventArgs$set_cancel(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]); + if (e) throw e; + this._cancel = value; + } +Sys.CancelEventArgs.prototype = { + get_cancel: Sys$CancelEventArgs$get_cancel, + set_cancel: Sys$CancelEventArgs$set_cancel +} +Sys.CancelEventArgs.registerClass('Sys.CancelEventArgs', Sys.EventArgs); +Type.registerNamespace('Sys.UI'); + +Sys._Debug = function Sys$_Debug() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); +} + function Sys$_Debug$_appendConsole(text) { + if ((typeof(Debug) !== 'undefined') && Debug.writeln) { + Debug.writeln(text); + } + if (window.console && window.console.log) { + window.console.log(text); + } + if (window.opera) { + window.opera.postError(text); + } + if (window.debugService) { + window.debugService.trace(text); + } + } + function Sys$_Debug$_appendTrace(text) { + var traceElement = document.getElementById('TraceConsole'); + if (traceElement && (traceElement.tagName.toUpperCase() === 'TEXTAREA')) { + traceElement.value += text + '\n'; + } + } + function Sys$_Debug$assert(condition, message, displayCaller) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "condition", type: Boolean}, + {name: "message", type: String, mayBeNull: true, optional: true}, + {name: "displayCaller", type: Boolean, optional: true} + ]); + if (e) throw e; + if (!condition) { + message = (displayCaller && this.assert.caller) ? + String.format(Sys.Res.assertFailedCaller, message, this.assert.caller) : + String.format(Sys.Res.assertFailed, message); + if (confirm(String.format(Sys.Res.breakIntoDebugger, message))) { + this.fail(message); + } + } + } + function Sys$_Debug$clearTrace() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + var traceElement = document.getElementById('TraceConsole'); + if (traceElement && (traceElement.tagName.toUpperCase() === 'TEXTAREA')) { + traceElement.value = ''; + } + } + function Sys$_Debug$fail(message) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "message", type: String, mayBeNull: true} + ]); + if (e) throw e; + this._appendConsole(message); + if (Sys.Browser.hasDebuggerStatement) { + eval('debugger'); + } + } + function Sys$_Debug$trace(text) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "text"} + ]); + if (e) throw e; + this._appendConsole(text); + this._appendTrace(text); + } + function Sys$_Debug$traceDump(object, name) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "object", mayBeNull: true}, + {name: "name", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var text = this._traceDump(object, name, true); + } + function Sys$_Debug$_traceDump(object, name, recursive, indentationPadding, loopArray) { + name = name? name : 'traceDump'; + indentationPadding = indentationPadding? indentationPadding : ''; + if (object === null) { + this.trace(indentationPadding + name + ': null'); + return; + } + switch(typeof(object)) { + case 'undefined': + this.trace(indentationPadding + name + ': Undefined'); + break; + case 'number': case 'string': case 'boolean': + this.trace(indentationPadding + name + ': ' + object); + break; + default: + if (Date.isInstanceOfType(object) || RegExp.isInstanceOfType(object)) { + this.trace(indentationPadding + name + ': ' + object.toString()); + break; + } + if (!loopArray) { + loopArray = []; + } + else if (Array.contains(loopArray, object)) { + this.trace(indentationPadding + name + ': ...'); + return; + } + Array.add(loopArray, object); + if ((object == window) || (object === document) || + (window.HTMLElement && (object instanceof HTMLElement)) || + (typeof(object.nodeName) === 'string')) { + var tag = object.tagName? object.tagName : 'DomElement'; + if (object.id) { + tag += ' - ' + object.id; + } + this.trace(indentationPadding + name + ' {' + tag + '}'); + } + else { + var typeName = Object.getTypeName(object); + this.trace(indentationPadding + name + (typeof(typeName) === 'string' ? ' {' + typeName + '}' : '')); + if ((indentationPadding === '') || recursive) { + indentationPadding += " "; + var i, length, properties, p, v; + if (Array.isInstanceOfType(object)) { + length = object.length; + for (i = 0; i < length; i++) { + this._traceDump(object[i], '[' + i + ']', recursive, indentationPadding, loopArray); + } + } + else { + for (p in object) { + v = object[p]; + if (!Function.isInstanceOfType(v)) { + this._traceDump(v, p, recursive, indentationPadding, loopArray); + } + } + } + } + } + Array.remove(loopArray, object); + } + } +Sys._Debug.prototype = { + _appendConsole: Sys$_Debug$_appendConsole, + _appendTrace: Sys$_Debug$_appendTrace, + assert: Sys$_Debug$assert, + clearTrace: Sys$_Debug$clearTrace, + fail: Sys$_Debug$fail, + trace: Sys$_Debug$trace, + traceDump: Sys$_Debug$traceDump, + _traceDump: Sys$_Debug$_traceDump +} +Sys._Debug.registerClass('Sys._Debug'); +Sys.Debug = new Sys._Debug(); + Sys.Debug.isDebug = true; + +function Sys$Enum$parse(value, ignoreCase) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String}, + {name: "ignoreCase", type: Boolean, optional: true} + ]); + if (e) throw e; + var values, parsed, val; + if (ignoreCase) { + values = this.__lowerCaseValues; + if (!values) { + this.__lowerCaseValues = values = {}; + var prototype = this.prototype; + for (var name in prototype) { + values[name.toLowerCase()] = prototype[name]; + } + } + } + else { + values = this.prototype; + } + if (!this.__flags) { + val = (ignoreCase ? value.toLowerCase() : value); + parsed = values[val.trim()]; + if (typeof(parsed) !== 'number') throw Error.argument('value', String.format(Sys.Res.enumInvalidValue, value, this.__typeName)); + return parsed; + } + else { + var parts = (ignoreCase ? value.toLowerCase() : value).split(','); + var v = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var part = parts[i].trim(); + parsed = values[part]; + if (typeof(parsed) !== 'number') throw Error.argument('value', String.format(Sys.Res.enumInvalidValue, value.split(',')[i].trim(), this.__typeName)); + v |= parsed; + } + return v; + } +} +function Sys$Enum$toString(value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", mayBeNull: true, optional: true} + ]); + if (e) throw e; + if ((typeof(value) === 'undefined') || (value === null)) return this.__string; + if ((typeof(value) != 'number') || ((value % 1) !== 0)) throw Error.argumentType('value', Object.getType(value), this); + var values = this.prototype; + var i; + if (!this.__flags || (value === 0)) { + for (i in values) { + if (values[i] === value) { + return i; + } + } + } + else { + var sorted = this.__sortedValues; + if (!sorted) { + sorted = []; + for (i in values) { + sorted[sorted.length] = {key: i, value: values[i]}; + } + sorted.sort(function(a, b) { + return a.value - b.value; + }); + this.__sortedValues = sorted; + } + var parts = []; + var v = value; + for (i = sorted.length - 1; i >= 0; i--) { + var kvp = sorted[i]; + var vali = kvp.value; + if (vali === 0) continue; + if ((vali & value) === vali) { + parts[parts.length] = kvp.key; + v -= vali; + if (v === 0) break; + } + } + if (parts.length && v === 0) return parts.reverse().join(', '); + } + throw Error.argumentOutOfRange('value', value, String.format(Sys.Res.enumInvalidValue, value, this.__typeName)); +} +Type.prototype.registerEnum = function Type$registerEnum(name, flags) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "name", type: String}, + {name: "flags", type: Boolean, optional: true} + ]); + if (e) throw e; + if (!Type.__fullyQualifiedIdentifierRegExp.test(name)) throw Error.argument('name', Sys.Res.notATypeName); + var parsedName; + try { + parsedName = eval(name); + } + catch(e) { + throw Error.argument('name', Sys.Res.argumentTypeName); + } + if (parsedName !== this) throw Error.argument('name', Sys.Res.badTypeName); + if (Sys.__registeredTypes[name]) throw Error.invalidOperation(String.format(Sys.Res.typeRegisteredTwice, name)); + for (var j in this.prototype) { + var val = this.prototype[j]; + if (!Type.__identifierRegExp.test(j)) throw Error.invalidOperation(String.format(Sys.Res.enumInvalidValueName, j)); + if (typeof(val) !== 'number' || (val % 1) !== 0) throw Error.invalidOperation(Sys.Res.enumValueNotInteger); + if (typeof(this[j]) !== 'undefined') throw Error.invalidOperation(String.format(Sys.Res.enumReservedName, j)); + } + Sys.__upperCaseTypes[name.toUpperCase()] = this; + for (var i in this.prototype) { + this[i] = this.prototype[i]; + } + this.__typeName = name; + this.parse = Sys$Enum$parse; + this.__string = this.toString(); + this.toString = Sys$Enum$toString; + this.__flags = flags; + this.__enum = true; + Sys.__registeredTypes[name] = true; +} +Type.isEnum = function Type$isEnum(type) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "type", mayBeNull: true} + ]); + if (e) throw e; + if ((typeof(type) === 'undefined') || (type === null)) return false; + return !!type.__enum; +} +Type.isFlags = function Type$isFlags(type) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "type", mayBeNull: true} + ]); + if (e) throw e; + if ((typeof(type) === 'undefined') || (type === null)) return false; + return !!type.__flags; +} +Sys.CollectionChange = function Sys$CollectionChange(action, newItems, newStartingIndex, oldItems, oldStartingIndex) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "action", type: Sys.NotifyCollectionChangedAction}, + {name: "newItems", mayBeNull: true, optional: true}, + {name: "newStartingIndex", type: Number, mayBeNull: true, integer: true, optional: true}, + {name: "oldItems", mayBeNull: true, optional: true}, + {name: "oldStartingIndex", type: Number, mayBeNull: true, integer: true, optional: true} + ]); + if (e) throw e; + this.action = action; + if (newItems) { + if (!(newItems instanceof Array)) { + newItems = [newItems]; + } + } + this.newItems = newItems || null; + if (typeof newStartingIndex !== "number") { + newStartingIndex = -1; + } + this.newStartingIndex = newStartingIndex; + if (oldItems) { + if (!(oldItems instanceof Array)) { + oldItems = [oldItems]; + } + } + this.oldItems = oldItems || null; + if (typeof oldStartingIndex !== "number") { + oldStartingIndex = -1; + } + this.oldStartingIndex = oldStartingIndex; +} +Sys.CollectionChange.registerClass("Sys.CollectionChange"); +Sys.NotifyCollectionChangedAction = function Sys$NotifyCollectionChangedAction() { + /// + /// + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); +} +Sys.NotifyCollectionChangedAction.prototype = { + add: 0, + remove: 1, + reset: 2 +} +Sys.NotifyCollectionChangedAction.registerEnum('Sys.NotifyCollectionChangedAction'); +Sys.NotifyCollectionChangedEventArgs = function Sys$NotifyCollectionChangedEventArgs(changes) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "changes", type: Array, elementType: Sys.CollectionChange} + ]); + if (e) throw e; + this._changes = changes; + Sys.NotifyCollectionChangedEventArgs.initializeBase(this); +} + function Sys$NotifyCollectionChangedEventArgs$get_changes() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._changes || []; + } +Sys.NotifyCollectionChangedEventArgs.prototype = { + get_changes: Sys$NotifyCollectionChangedEventArgs$get_changes +} +Sys.NotifyCollectionChangedEventArgs.registerClass("Sys.NotifyCollectionChangedEventArgs", Sys.EventArgs); +Sys.Observer = function Sys$Observer() { + throw Error.invalidOperation(); +} +Sys.Observer.registerClass("Sys.Observer"); +Sys.Observer.makeObservable = function Sys$Observer$makeObservable(target) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"} + ]); + if (e) throw e; + var isArray = target instanceof Array, + o = Sys.Observer; + Sys.Observer._ensureObservable(target); + if (target.setValue === o._observeMethods.setValue) return target; + o._addMethods(target, o._observeMethods); + if (isArray) { + o._addMethods(target, o._arrayMethods); + } + return target; +} +Sys.Observer._ensureObservable = function Sys$Observer$_ensureObservable(target) { + var type = typeof target; + if ((type === "string") || (type === "number") || (type === "boolean") || (type === "date")) { + throw Error.invalidOperation(String.format(Sys.Res.notObservable, type)); + } +} +Sys.Observer._addMethods = function Sys$Observer$_addMethods(target, methods) { + for (var m in methods) { + if (target[m] && (target[m] !== methods[m])) { + throw Error.invalidOperation(String.format(Sys.Res.observableConflict, m)); + } + target[m] = methods[m]; + } +} +Sys.Observer._addEventHandler = function Sys$Observer$_addEventHandler(target, eventName, handler) { + Sys.Observer._getContext(target, true).events._addHandler(eventName, handler); +} +Sys.Observer.addEventHandler = function Sys$Observer$addEventHandler(target, eventName, handler) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"}, + {name: "eventName", type: String}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + Sys.Observer._addEventHandler(target, eventName, handler); +} +Sys.Observer._removeEventHandler = function Sys$Observer$_removeEventHandler(target, eventName, handler) { + Sys.Observer._getContext(target, true).events._removeHandler(eventName, handler); +} +Sys.Observer.removeEventHandler = function Sys$Observer$removeEventHandler(target, eventName, handler) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"}, + {name: "eventName", type: String}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + Sys.Observer._removeEventHandler(target, eventName, handler); +} +Sys.Observer.raiseEvent = function Sys$Observer$raiseEvent(target, eventName, eventArgs) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"}, + {name: "eventName", type: String}, + {name: "eventArgs", type: Sys.EventArgs} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + var ctx = Sys.Observer._getContext(target); + if (!ctx) return; + var handler = ctx.events.getHandler(eventName); + if (handler) { + handler(target, eventArgs); + } +} +Sys.Observer.addPropertyChanged = function Sys$Observer$addPropertyChanged(target, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + Sys.Observer._addEventHandler(target, "propertyChanged", handler); +} +Sys.Observer.removePropertyChanged = function Sys$Observer$removePropertyChanged(target, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + Sys.Observer._removeEventHandler(target, "propertyChanged", handler); +} +Sys.Observer.beginUpdate = function Sys$Observer$beginUpdate(target) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + Sys.Observer._getContext(target, true).updating = true; +} +Sys.Observer.endUpdate = function Sys$Observer$endUpdate(target) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + var ctx = Sys.Observer._getContext(target); + if (!ctx || !ctx.updating) return; + ctx.updating = false; + var dirty = ctx.dirty; + ctx.dirty = false; + if (dirty) { + if (target instanceof Array) { + var changes = ctx.changes; + ctx.changes = null; + Sys.Observer.raiseCollectionChanged(target, changes); + } + Sys.Observer.raisePropertyChanged(target, ""); + } +} +Sys.Observer.isUpdating = function Sys$Observer$isUpdating(target) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + var ctx = Sys.Observer._getContext(target); + return ctx ? ctx.updating : false; +} +Sys.Observer._setValue = function Sys$Observer$_setValue(target, propertyName, value) { + var getter, setter, mainTarget = target, path = propertyName.split('.'); + for (var i = 0, l = (path.length - 1); i < l ; i++) { + var name = path[i]; + getter = target["get_" + name]; + if (typeof (getter) === "function") { + target = getter.call(target); + } + else { + target = target[name]; + } + var type = typeof (target); + if ((target === null) || (type === "undefined")) { + throw Error.invalidOperation(String.format(Sys.Res.nullReferenceInPath, propertyName)); + } + } + var currentValue, lastPath = path[l]; + getter = target["get_" + lastPath]; + setter = target["set_" + lastPath]; + if (typeof(getter) === 'function') { + currentValue = getter.call(target); + } + else { + currentValue = target[lastPath]; + } + if (typeof(setter) === 'function') { + setter.call(target, value); + } + else { + target[lastPath] = value; + } + if (currentValue !== value) { + var ctx = Sys.Observer._getContext(mainTarget); + if (ctx && ctx.updating) { + ctx.dirty = true; + return; + }; + Sys.Observer.raisePropertyChanged(mainTarget, path[0]); + } +} +Sys.Observer.setValue = function Sys$Observer$setValue(target, propertyName, value) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"}, + {name: "propertyName", type: String}, + {name: "value", mayBeNull: true} + ]); + if (e) throw e; + Sys.Observer._ensureObservable(target); + Sys.Observer._setValue(target, propertyName, value); +} +Sys.Observer.raisePropertyChanged = function Sys$Observer$raisePropertyChanged(target, propertyName) { + /// + /// + /// + Sys.Observer.raiseEvent(target, "propertyChanged", new Sys.PropertyChangedEventArgs(propertyName)); +} +Sys.Observer.addCollectionChanged = function Sys$Observer$addCollectionChanged(target, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._addEventHandler(target, "collectionChanged", handler); +} +Sys.Observer.removeCollectionChanged = function Sys$Observer$removeCollectionChanged(target, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._removeEventHandler(target, "collectionChanged", handler); +} +Sys.Observer._collectionChange = function Sys$Observer$_collectionChange(target, change) { + var ctx = Sys.Observer._getContext(target); + if (ctx && ctx.updating) { + ctx.dirty = true; + var changes = ctx.changes; + if (!changes) { + ctx.changes = changes = [change]; + } + else { + changes.push(change); + } + } + else { + Sys.Observer.raiseCollectionChanged(target, [change]); + Sys.Observer.raisePropertyChanged(target, 'length'); + } +} +Sys.Observer.add = function Sys$Observer$add(target, item) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true}, + {name: "item", mayBeNull: true} + ]); + if (e) throw e; + var change = new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add, [item], target.length); + Array.add(target, item); + Sys.Observer._collectionChange(target, change); +} +Sys.Observer.addRange = function Sys$Observer$addRange(target, items) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true}, + {name: "items", type: Array, elementMayBeNull: true} + ]); + if (e) throw e; + var change = new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add, items, target.length); + Array.addRange(target, items); + Sys.Observer._collectionChange(target, change); +} +Sys.Observer.clear = function Sys$Observer$clear(target) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true} + ]); + if (e) throw e; + var oldItems = Array.clone(target); + Array.clear(target); + Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.reset, null, -1, oldItems, 0)); +} +Sys.Observer.insert = function Sys$Observer$insert(target, index, item) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true}, + {name: "index", type: Number, integer: true}, + {name: "item", mayBeNull: true} + ]); + if (e) throw e; + Array.insert(target, index, item); + Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.add, [item], index)); +} +Sys.Observer.remove = function Sys$Observer$remove(target, item) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true}, + {name: "item", mayBeNull: true} + ]); + if (e) throw e; + var index = Array.indexOf(target, item); + if (index !== -1) { + Array.remove(target, item); + Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.remove, null, -1, [item], index)); + return true; + } + return false; +} +Sys.Observer.removeAt = function Sys$Observer$removeAt(target, index) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target", type: Array, elementMayBeNull: true}, + {name: "index", type: Number, integer: true} + ]); + if (e) throw e; + if ((index > -1) && (index < target.length)) { + var item = target[index]; + Array.removeAt(target, index); + Sys.Observer._collectionChange(target, new Sys.CollectionChange(Sys.NotifyCollectionChangedAction.remove, null, -1, [item], index)); + } +} +Sys.Observer.raiseCollectionChanged = function Sys$Observer$raiseCollectionChanged(target, changes) { + /// + /// + /// + Sys.Observer.raiseEvent(target, "collectionChanged", new Sys.NotifyCollectionChangedEventArgs(changes)); +} +Sys.Observer._observeMethods = { + add_propertyChanged: function(handler) { + Sys.Observer._addEventHandler(this, "propertyChanged", handler); + }, + remove_propertyChanged: function(handler) { + Sys.Observer._removeEventHandler(this, "propertyChanged", handler); + }, + addEventHandler: function(eventName, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "eventName", type: String}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._addEventHandler(this, eventName, handler); + }, + removeEventHandler: function(eventName, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "eventName", type: String}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.Observer._removeEventHandler(this, eventName, handler); + }, + get_isUpdating: function() { + /// + /// + return Sys.Observer.isUpdating(this); + }, + beginUpdate: function() { + /// + Sys.Observer.beginUpdate(this); + }, + endUpdate: function() { + /// + Sys.Observer.endUpdate(this); + }, + setValue: function(name, value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "name", type: String}, + {name: "value", mayBeNull: true} + ]); + if (e) throw e; + Sys.Observer._setValue(this, name, value); + }, + raiseEvent: function(eventName, eventArgs) { + /// + /// + /// + Sys.Observer.raiseEvent(this, eventName, eventArgs); + }, + raisePropertyChanged: function(name) { + /// + /// + Sys.Observer.raiseEvent(this, "propertyChanged", new Sys.PropertyChangedEventArgs(name)); + } +} +Sys.Observer._arrayMethods = { + add_collectionChanged: function(handler) { + Sys.Observer._addEventHandler(this, "collectionChanged", handler); + }, + remove_collectionChanged: function(handler) { + Sys.Observer._removeEventHandler(this, "collectionChanged", handler); + }, + add: function(item) { + /// + /// + Sys.Observer.add(this, item); + }, + addRange: function(items) { + /// + /// + Sys.Observer.addRange(this, items); + }, + clear: function() { + /// + Sys.Observer.clear(this); + }, + insert: function(index, item) { + /// + /// + /// + Sys.Observer.insert(this, index, item); + }, + remove: function(item) { + /// + /// + /// + return Sys.Observer.remove(this, item); + }, + removeAt: function(index) { + /// + /// + Sys.Observer.removeAt(this, index); + }, + raiseCollectionChanged: function(changes) { + /// + /// + Sys.Observer.raiseEvent(this, "collectionChanged", new Sys.NotifyCollectionChangedEventArgs(changes)); + } +} +Sys.Observer._getContext = function Sys$Observer$_getContext(obj, create) { + var ctx = obj._observerContext; + if (ctx) return ctx(); + if (create) { + return (obj._observerContext = Sys.Observer._createContext())(); + } + return null; +} +Sys.Observer._createContext = function Sys$Observer$_createContext() { + var ctx = { + events: new Sys.EventHandlerList() + }; + return function() { + return ctx; + } +} +Date._appendPreOrPostMatch = function Date$_appendPreOrPostMatch(preMatch, strBuilder) { + var quoteCount = 0; + var escaped = false; + for (var i = 0, il = preMatch.length; i < il; i++) { + var c = preMatch.charAt(i); + switch (c) { + case '\'': + if (escaped) strBuilder.append("'"); + else quoteCount++; + escaped = false; + break; + case '\\': + if (escaped) strBuilder.append("\\"); + escaped = !escaped; + break; + default: + strBuilder.append(c); + escaped = false; + break; + } + } + return quoteCount; +} +Date._expandFormat = function Date$_expandFormat(dtf, format) { + if (!format) { + format = "F"; + } + var len = format.length; + if (len === 1) { + switch (format) { + case "d": + return dtf.ShortDatePattern; + case "D": + return dtf.LongDatePattern; + case "t": + return dtf.ShortTimePattern; + case "T": + return dtf.LongTimePattern; + case "f": + return dtf.LongDatePattern + " " + dtf.ShortTimePattern; + case "F": + return dtf.FullDateTimePattern; + case "M": case "m": + return dtf.MonthDayPattern; + case "s": + return dtf.SortableDateTimePattern; + case "Y": case "y": + return dtf.YearMonthPattern; + default: + throw Error.format(Sys.Res.formatInvalidString); + } + } + else if ((len === 2) && (format.charAt(0) === "%")) { + format = format.charAt(1); + } + return format; +} +Date._expandYear = function Date$_expandYear(dtf, year) { + var now = new Date(), + era = Date._getEra(now); + if (year < 100) { + var curr = Date._getEraYear(now, dtf, era); + year += curr - (curr % 100); + if (year > dtf.Calendar.TwoDigitYearMax) { + year -= 100; + } + } + return year; +} +Date._getEra = function Date$_getEra(date, eras) { + if (!eras) return 0; + var start, ticks = date.getTime(); + for (var i = 0, l = eras.length; i < l; i += 4) { + start = eras[i+2]; + if ((start === null) || (ticks >= start)) { + return i; + } + } + return 0; +} +Date._getEraYear = function Date$_getEraYear(date, dtf, era, sortable) { + var year = date.getFullYear(); + if (!sortable && dtf.eras) { + year -= dtf.eras[era + 3]; + } + return year; +} +Date._getParseRegExp = function Date$_getParseRegExp(dtf, format) { + if (!dtf._parseRegExp) { + dtf._parseRegExp = {}; + } + else if (dtf._parseRegExp[format]) { + return dtf._parseRegExp[format]; + } + var expFormat = Date._expandFormat(dtf, format); + expFormat = expFormat.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1"); + var regexp = new Sys.StringBuilder("^"); + var groups = []; + var index = 0; + var quoteCount = 0; + var tokenRegExp = Date._getTokenRegExp(); + var match; + while ((match = tokenRegExp.exec(expFormat)) !== null) { + var preMatch = expFormat.slice(index, match.index); + index = tokenRegExp.lastIndex; + quoteCount += Date._appendPreOrPostMatch(preMatch, regexp); + if ((quoteCount%2) === 1) { + regexp.append(match[0]); + continue; + } + switch (match[0]) { + case 'dddd': case 'ddd': + case 'MMMM': case 'MMM': + case 'gg': case 'g': + regexp.append("(\\D+)"); + break; + case 'tt': case 't': + regexp.append("(\\D*)"); + break; + case 'yyyy': + regexp.append("(\\d{4})"); + break; + case 'fff': + regexp.append("(\\d{3})"); + break; + case 'ff': + regexp.append("(\\d{2})"); + break; + case 'f': + regexp.append("(\\d)"); + break; + case 'dd': case 'd': + case 'MM': case 'M': + case 'yy': case 'y': + case 'HH': case 'H': + case 'hh': case 'h': + case 'mm': case 'm': + case 'ss': case 's': + regexp.append("(\\d\\d?)"); + break; + case 'zzz': + regexp.append("([+-]?\\d\\d?:\\d{2})"); + break; + case 'zz': case 'z': + regexp.append("([+-]?\\d\\d?)"); + break; + case '/': + regexp.append("(\\" + dtf.DateSeparator + ")"); + break; + default: + Sys.Debug.fail("Invalid date format pattern"); + } + Array.add(groups, match[0]); + } + Date._appendPreOrPostMatch(expFormat.slice(index), regexp); + regexp.append("$"); + var regexpStr = regexp.toString().replace(/\s+/g, "\\s+"); + var parseRegExp = {'regExp': regexpStr, 'groups': groups}; + dtf._parseRegExp[format] = parseRegExp; + return parseRegExp; +} +Date._getTokenRegExp = function Date$_getTokenRegExp() { + return /\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g; +} +Date.parseLocale = function Date$parseLocale(value, formats) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String}, + {name: "formats", mayBeNull: true, optional: true, parameterArray: true} + ]); + if (e) throw e; + return Date._parse(value, Sys.CultureInfo.CurrentCulture, arguments); +} +Date.parseInvariant = function Date$parseInvariant(value, formats) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String}, + {name: "formats", mayBeNull: true, optional: true, parameterArray: true} + ]); + if (e) throw e; + return Date._parse(value, Sys.CultureInfo.InvariantCulture, arguments); +} +Date._parse = function Date$_parse(value, cultureInfo, args) { + var i, l, date, format, formats, custom = false; + for (i = 1, l = args.length; i < l; i++) { + format = args[i]; + if (format) { + custom = true; + date = Date._parseExact(value, format, cultureInfo); + if (date) return date; + } + } + if (! custom) { + formats = cultureInfo._getDateTimeFormats(); + for (i = 0, l = formats.length; i < l; i++) { + date = Date._parseExact(value, formats[i], cultureInfo); + if (date) return date; + } + } + return null; +} +Date._parseExact = function Date$_parseExact(value, format, cultureInfo) { + value = value.trim(); + var dtf = cultureInfo.dateTimeFormat, + parseInfo = Date._getParseRegExp(dtf, format), + match = new RegExp(parseInfo.regExp).exec(value); + if (match === null) return null; + + var groups = parseInfo.groups, + era = null, year = null, month = null, date = null, weekDay = null, + hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null, + pmHour = false; + for (var j = 0, jl = groups.length; j < jl; j++) { + var matchGroup = match[j+1]; + if (matchGroup) { + switch (groups[j]) { + case 'dd': case 'd': + date = parseInt(matchGroup, 10); + if ((date < 1) || (date > 31)) return null; + break; + case 'MMMM': + month = cultureInfo._getMonthIndex(matchGroup); + if ((month < 0) || (month > 11)) return null; + break; + case 'MMM': + month = cultureInfo._getAbbrMonthIndex(matchGroup); + if ((month < 0) || (month > 11)) return null; + break; + case 'M': case 'MM': + month = parseInt(matchGroup, 10) - 1; + if ((month < 0) || (month > 11)) return null; + break; + case 'y': case 'yy': + year = Date._expandYear(dtf,parseInt(matchGroup, 10)); + if ((year < 0) || (year > 9999)) return null; + break; + case 'yyyy': + year = parseInt(matchGroup, 10); + if ((year < 0) || (year > 9999)) return null; + break; + case 'h': case 'hh': + hour = parseInt(matchGroup, 10); + if (hour === 12) hour = 0; + if ((hour < 0) || (hour > 11)) return null; + break; + case 'H': case 'HH': + hour = parseInt(matchGroup, 10); + if ((hour < 0) || (hour > 23)) return null; + break; + case 'm': case 'mm': + min = parseInt(matchGroup, 10); + if ((min < 0) || (min > 59)) return null; + break; + case 's': case 'ss': + sec = parseInt(matchGroup, 10); + if ((sec < 0) || (sec > 59)) return null; + break; + case 'tt': case 't': + var upperToken = matchGroup.toUpperCase(); + pmHour = (upperToken === dtf.PMDesignator.toUpperCase()); + if (!pmHour && (upperToken !== dtf.AMDesignator.toUpperCase())) return null; + break; + case 'f': + msec = parseInt(matchGroup, 10) * 100; + if ((msec < 0) || (msec > 999)) return null; + break; + case 'ff': + msec = parseInt(matchGroup, 10) * 10; + if ((msec < 0) || (msec > 999)) return null; + break; + case 'fff': + msec = parseInt(matchGroup, 10); + if ((msec < 0) || (msec > 999)) return null; + break; + case 'dddd': + weekDay = cultureInfo._getDayIndex(matchGroup); + if ((weekDay < 0) || (weekDay > 6)) return null; + break; + case 'ddd': + weekDay = cultureInfo._getAbbrDayIndex(matchGroup); + if ((weekDay < 0) || (weekDay > 6)) return null; + break; + case 'zzz': + var offsets = matchGroup.split(/:/); + if (offsets.length !== 2) return null; + hourOffset = parseInt(offsets[0], 10); + if ((hourOffset < -12) || (hourOffset > 13)) return null; + var minOffset = parseInt(offsets[1], 10); + if ((minOffset < 0) || (minOffset > 59)) return null; + tzMinOffset = (hourOffset * 60) + (matchGroup.startsWith('-')? -minOffset : minOffset); + break; + case 'z': case 'zz': + hourOffset = parseInt(matchGroup, 10); + if ((hourOffset < -12) || (hourOffset > 13)) return null; + tzMinOffset = hourOffset * 60; + break; + case 'g': case 'gg': + var eraName = matchGroup; + if (!eraName || !dtf.eras) return null; + eraName = eraName.toLowerCase().trim(); + for (var i = 0, l = dtf.eras.length; i < l; i += 4) { + if (eraName === dtf.eras[i + 1].toLowerCase()) { + era = i; + break; + } + } + if (era === null) return null; + break; + } + } + } + var result = new Date(), defaults, convert = dtf.Calendar.convert; + if (convert) { + defaults = convert.fromGregorian(result); + } + if (!convert) { + defaults = [result.getFullYear(), result.getMonth(), result.getDate()]; + } + if (year === null) { + year = defaults[0]; + } + else if (dtf.eras) { + year += dtf.eras[(era || 0) + 3]; + } + if (month === null) { + month = defaults[1]; + } + if (date === null) { + date = defaults[2]; + } + if (convert) { + result = convert.toGregorian(year, month, date); + if (result === null) return null; + } + else { + result.setFullYear(year, month, date); + if (result.getDate() !== date) return null; + if ((weekDay !== null) && (result.getDay() !== weekDay)) { + return null; + } + } + if (pmHour && (hour < 12)) { + hour += 12; + } + result.setHours(hour, min, sec, msec); + if (tzMinOffset !== null) { + var adjustedMin = result.getMinutes() - (tzMinOffset + result.getTimezoneOffset()); + result.setHours(result.getHours() + parseInt(adjustedMin/60, 10), adjustedMin%60); + } + return result; +} +Date.prototype.format = function Date$format(format) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "format", type: String} + ]); + if (e) throw e; + return this._toFormattedString(format, Sys.CultureInfo.InvariantCulture); +} +Date.prototype.localeFormat = function Date$localeFormat(format) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "format", type: String} + ]); + if (e) throw e; + return this._toFormattedString(format, Sys.CultureInfo.CurrentCulture); +} +Date.prototype._toFormattedString = function Date$_toFormattedString(format, cultureInfo) { + var dtf = cultureInfo.dateTimeFormat, + convert = dtf.Calendar.convert; + if (!format || !format.length || (format === 'i')) { + if (cultureInfo && cultureInfo.name.length) { + if (convert) { + return this._toFormattedString(dtf.FullDateTimePattern, cultureInfo); + } + else { + var eraDate = new Date(this.getTime()); + var era = Date._getEra(this, dtf.eras); + eraDate.setFullYear(Date._getEraYear(this, dtf, era)); + return eraDate.toLocaleString(); + } + } + else { + return this.toString(); + } + } + var eras = dtf.eras, + sortable = (format === "s"); + format = Date._expandFormat(dtf, format); + var ret = new Sys.StringBuilder(); + var hour; + function addLeadingZero(num) { + if (num < 10) { + return '0' + num; + } + return num.toString(); + } + function addLeadingZeros(num) { + if (num < 10) { + return '00' + num; + } + if (num < 100) { + return '0' + num; + } + return num.toString(); + } + function padYear(year) { + if (year < 10) { + return '000' + year; + } + else if (year < 100) { + return '00' + year; + } + else if (year < 1000) { + return '0' + year; + } + return year.toString(); + } + + var foundDay, checkedDay, dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g; + function hasDay() { + if (foundDay || checkedDay) { + return foundDay; + } + foundDay = dayPartRegExp.test(format); + checkedDay = true; + return foundDay; + } + + var quoteCount = 0, + tokenRegExp = Date._getTokenRegExp(), + converted; + if (!sortable && convert) { + converted = convert.fromGregorian(this); + } + for (;;) { + var index = tokenRegExp.lastIndex; + var ar = tokenRegExp.exec(format); + var preMatch = format.slice(index, ar ? ar.index : format.length); + quoteCount += Date._appendPreOrPostMatch(preMatch, ret); + if (!ar) break; + if ((quoteCount%2) === 1) { + ret.append(ar[0]); + continue; + } + + function getPart(date, part) { + if (converted) { + return converted[part]; + } + switch (part) { + case 0: return date.getFullYear(); + case 1: return date.getMonth(); + case 2: return date.getDate(); + } + } + switch (ar[0]) { + case "dddd": + ret.append(dtf.DayNames[this.getDay()]); + break; + case "ddd": + ret.append(dtf.AbbreviatedDayNames[this.getDay()]); + break; + case "dd": + foundDay = true; + ret.append(addLeadingZero(getPart(this, 2))); + break; + case "d": + foundDay = true; + ret.append(getPart(this, 2)); + break; + case "MMMM": + ret.append((dtf.MonthGenitiveNames && hasDay()) + ? dtf.MonthGenitiveNames[getPart(this, 1)] + : dtf.MonthNames[getPart(this, 1)]); + break; + case "MMM": + ret.append((dtf.AbbreviatedMonthGenitiveNames && hasDay()) + ? dtf.AbbreviatedMonthGenitiveNames[getPart(this, 1)] + : dtf.AbbreviatedMonthNames[getPart(this, 1)]); + break; + case "MM": + ret.append(addLeadingZero(getPart(this, 1) + 1)); + break; + case "M": + ret.append(getPart(this, 1) + 1); + break; + case "yyyy": + ret.append(padYear(converted ? converted[0] : Date._getEraYear(this, dtf, Date._getEra(this, eras), sortable))); + break; + case "yy": + ret.append(addLeadingZero((converted ? converted[0] : Date._getEraYear(this, dtf, Date._getEra(this, eras), sortable)) % 100)); + break; + case "y": + ret.append((converted ? converted[0] : Date._getEraYear(this, dtf, Date._getEra(this, eras), sortable)) % 100); + break; + case "hh": + hour = this.getHours() % 12; + if (hour === 0) hour = 12; + ret.append(addLeadingZero(hour)); + break; + case "h": + hour = this.getHours() % 12; + if (hour === 0) hour = 12; + ret.append(hour); + break; + case "HH": + ret.append(addLeadingZero(this.getHours())); + break; + case "H": + ret.append(this.getHours()); + break; + case "mm": + ret.append(addLeadingZero(this.getMinutes())); + break; + case "m": + ret.append(this.getMinutes()); + break; + case "ss": + ret.append(addLeadingZero(this.getSeconds())); + break; + case "s": + ret.append(this.getSeconds()); + break; + case "tt": + ret.append((this.getHours() < 12) ? dtf.AMDesignator : dtf.PMDesignator); + break; + case "t": + ret.append(((this.getHours() < 12) ? dtf.AMDesignator : dtf.PMDesignator).charAt(0)); + break; + case "f": + ret.append(addLeadingZeros(this.getMilliseconds()).charAt(0)); + break; + case "ff": + ret.append(addLeadingZeros(this.getMilliseconds()).substr(0, 2)); + break; + case "fff": + ret.append(addLeadingZeros(this.getMilliseconds())); + break; + case "z": + hour = this.getTimezoneOffset() / 60; + ret.append(((hour <= 0) ? '+' : '-') + Math.floor(Math.abs(hour))); + break; + case "zz": + hour = this.getTimezoneOffset() / 60; + ret.append(((hour <= 0) ? '+' : '-') + addLeadingZero(Math.floor(Math.abs(hour)))); + break; + case "zzz": + hour = this.getTimezoneOffset() / 60; + ret.append(((hour <= 0) ? '+' : '-') + addLeadingZero(Math.floor(Math.abs(hour))) + + ":" + addLeadingZero(Math.abs(this.getTimezoneOffset() % 60))); + break; + case "g": + case "gg": + if (dtf.eras) { + ret.append(dtf.eras[Date._getEra(this, eras) + 1]); + } + break; + case "/": + ret.append(dtf.DateSeparator); + break; + default: + Sys.Debug.fail("Invalid date format pattern"); + } + } + return ret.toString(); +} +String.localeFormat = function String$localeFormat(format, args) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "format", type: String}, + {name: "args", mayBeNull: true, parameterArray: true} + ]); + if (e) throw e; + return String._toFormattedString(true, arguments); +} +Number.parseLocale = function Number$parseLocale(value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String} + ], false); + if (e) throw e; + return Number._parse(value, Sys.CultureInfo.CurrentCulture); +} +Number.parseInvariant = function Number$parseInvariant(value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String} + ], false); + if (e) throw e; + return Number._parse(value, Sys.CultureInfo.InvariantCulture); +} +Number._parse = function Number$_parse(value, cultureInfo) { + value = value.trim(); + + if (value.match(/^[+-]?infinity$/i)) { + return parseFloat(value); + } + if (value.match(/^0x[a-f0-9]+$/i)) { + return parseInt(value); + } + var numFormat = cultureInfo.numberFormat; + var signInfo = Number._parseNumberNegativePattern(value, numFormat, numFormat.NumberNegativePattern); + var sign = signInfo[0]; + var num = signInfo[1]; + + if ((sign === '') && (numFormat.NumberNegativePattern !== 1)) { + signInfo = Number._parseNumberNegativePattern(value, numFormat, 1); + sign = signInfo[0]; + num = signInfo[1]; + } + if (sign === '') sign = '+'; + + var exponent; + var intAndFraction; + var exponentPos = num.indexOf('e'); + if (exponentPos < 0) exponentPos = num.indexOf('E'); + if (exponentPos < 0) { + intAndFraction = num; + exponent = null; + } + else { + intAndFraction = num.substr(0, exponentPos); + exponent = num.substr(exponentPos + 1); + } + + var integer; + var fraction; + var decimalPos = intAndFraction.indexOf(numFormat.NumberDecimalSeparator); + if (decimalPos < 0) { + integer = intAndFraction; + fraction = null; + } + else { + integer = intAndFraction.substr(0, decimalPos); + fraction = intAndFraction.substr(decimalPos + numFormat.NumberDecimalSeparator.length); + } + + integer = integer.split(numFormat.NumberGroupSeparator).join(''); + var altNumGroupSeparator = numFormat.NumberGroupSeparator.replace(/\u00A0/g, " "); + if (numFormat.NumberGroupSeparator !== altNumGroupSeparator) { + integer = integer.split(altNumGroupSeparator).join(''); + } + + var p = sign + integer; + if (fraction !== null) { + p += '.' + fraction; + } + if (exponent !== null) { + var expSignInfo = Number._parseNumberNegativePattern(exponent, numFormat, 1); + if (expSignInfo[0] === '') { + expSignInfo[0] = '+'; + } + p += 'e' + expSignInfo[0] + expSignInfo[1]; + } + if (p.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/)) { + return parseFloat(p); + } + return Number.NaN; +} +Number._parseNumberNegativePattern = function Number$_parseNumberNegativePattern(value, numFormat, numberNegativePattern) { + var neg = numFormat.NegativeSign; + var pos = numFormat.PositiveSign; + switch (numberNegativePattern) { + case 4: + neg = ' ' + neg; + pos = ' ' + pos; + case 3: + if (value.endsWith(neg)) { + return ['-', value.substr(0, value.length - neg.length)]; + } + else if (value.endsWith(pos)) { + return ['+', value.substr(0, value.length - pos.length)]; + } + break; + case 2: + neg += ' '; + pos += ' '; + case 1: + if (value.startsWith(neg)) { + return ['-', value.substr(neg.length)]; + } + else if (value.startsWith(pos)) { + return ['+', value.substr(pos.length)]; + } + break; + case 0: + if (value.startsWith('(') && value.endsWith(')')) { + return ['-', value.substr(1, value.length - 2)]; + } + break; + default: + Sys.Debug.fail(""); + } + return ['', value]; +} +Number.prototype.format = function Number$format(format) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "format", type: String} + ]); + if (e) throw e; + return this._toFormattedString(format, Sys.CultureInfo.InvariantCulture); +} +Number.prototype.localeFormat = function Number$localeFormat(format) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "format", type: String} + ]); + if (e) throw e; + return this._toFormattedString(format, Sys.CultureInfo.CurrentCulture); +} +Number.prototype._toFormattedString = function Number$_toFormattedString(format, cultureInfo) { + if (!format || (format.length === 0) || (format === 'i')) { + if (cultureInfo && (cultureInfo.name.length > 0)) { + return this.toLocaleString(); + } + else { + return this.toString(); + } + } + + var _percentPositivePattern = ["n %", "n%", "%n" ]; + var _percentNegativePattern = ["-n %", "-n%", "-%n"]; + var _numberNegativePattern = ["(n)","-n","- n","n-","n -"]; + var _currencyPositivePattern = ["$n","n$","$ n","n $"]; + var _currencyNegativePattern = ["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"]; + function zeroPad(str, count, left) { + for (var l=str.length; l < count; l++) { + str = (left ? ('0' + str) : (str + '0')); + } + return str; + } + + function expandNumber(number, precision, groupSizes, sep, decimalChar) { + Sys.Debug.assert(groupSizes.length > 0, "groupSizes must be an array of at least 1"); + var curSize = groupSizes[0]; + var curGroupIndex = 1; + var factor = Math.pow(10, precision); + var rounded = (Math.round(number * factor) / factor); + if (!isFinite(rounded)) { + rounded = number; + } + number = rounded; + + var numberString = number.toString(); + var right = ""; + var exponent; + + + var split = numberString.split(/e/i); + numberString = split[0]; + exponent = (split.length > 1 ? parseInt(split[1]) : 0); + split = numberString.split('.'); + numberString = split[0]; + right = split.length > 1 ? split[1] : ""; + + var l; + if (exponent > 0) { + right = zeroPad(right, exponent, false); + numberString += right.slice(0, exponent); + right = right.substr(exponent); + } + else if (exponent < 0) { + exponent = -exponent; + numberString = zeroPad(numberString, exponent+1, true); + right = numberString.slice(-exponent, numberString.length) + right; + numberString = numberString.slice(0, -exponent); + } + if (precision > 0) { + if (right.length > precision) { + right = right.slice(0, precision); + } + else { + right = zeroPad(right, precision, false); + } + right = decimalChar + right; + } + else { + right = ""; + } + var stringIndex = numberString.length-1; + var ret = ""; + while (stringIndex >= 0) { + if (curSize === 0 || curSize > stringIndex) { + if (ret.length > 0) + return numberString.slice(0, stringIndex + 1) + sep + ret + right; + else + return numberString.slice(0, stringIndex + 1) + right; + } + if (ret.length > 0) + ret = numberString.slice(stringIndex - curSize + 1, stringIndex+1) + sep + ret; + else + ret = numberString.slice(stringIndex - curSize + 1, stringIndex+1); + stringIndex -= curSize; + if (curGroupIndex < groupSizes.length) { + curSize = groupSizes[curGroupIndex]; + curGroupIndex++; + } + } + return numberString.slice(0, stringIndex + 1) + sep + ret + right; + } + var nf = cultureInfo.numberFormat; + var number = Math.abs(this); + if (!format) + format = "D"; + var precision = -1; + if (format.length > 1) precision = parseInt(format.slice(1), 10); + var pattern; + switch (format.charAt(0)) { + case "d": + case "D": + pattern = 'n'; + if (precision !== -1) { + number = zeroPad(""+number, precision, true); + } + if (this < 0) number = -number; + break; + case "c": + case "C": + if (this < 0) pattern = _currencyNegativePattern[nf.CurrencyNegativePattern]; + else pattern = _currencyPositivePattern[nf.CurrencyPositivePattern]; + if (precision === -1) precision = nf.CurrencyDecimalDigits; + number = expandNumber(Math.abs(this), precision, nf.CurrencyGroupSizes, nf.CurrencyGroupSeparator, nf.CurrencyDecimalSeparator); + break; + case "n": + case "N": + if (this < 0) pattern = _numberNegativePattern[nf.NumberNegativePattern]; + else pattern = 'n'; + if (precision === -1) precision = nf.NumberDecimalDigits; + number = expandNumber(Math.abs(this), precision, nf.NumberGroupSizes, nf.NumberGroupSeparator, nf.NumberDecimalSeparator); + break; + case "p": + case "P": + if (this < 0) pattern = _percentNegativePattern[nf.PercentNegativePattern]; + else pattern = _percentPositivePattern[nf.PercentPositivePattern]; + if (precision === -1) precision = nf.PercentDecimalDigits; + number = expandNumber(Math.abs(this) * 100, precision, nf.PercentGroupSizes, nf.PercentGroupSeparator, nf.PercentDecimalSeparator); + break; + default: + throw Error.format(Sys.Res.formatBadFormatSpecifier); + } + var regex = /n|\$|-|%/g; + var ret = ""; + for (;;) { + var index = regex.lastIndex; + var ar = regex.exec(pattern); + ret += pattern.slice(index, ar ? ar.index : pattern.length); + if (!ar) + break; + switch (ar[0]) { + case "n": + ret += number; + break; + case "$": + ret += nf.CurrencySymbol; + break; + case "-": + if (/[1-9]/.test(number)) { + ret += nf.NegativeSign; + } + break; + case "%": + ret += nf.PercentSymbol; + break; + default: + Sys.Debug.fail("Invalid number format pattern"); + } + } + return ret; +} + +Sys.CultureInfo = function Sys$CultureInfo(name, numberFormat, dateTimeFormat) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "name", type: String}, + {name: "numberFormat", type: Object}, + {name: "dateTimeFormat", type: Object} + ]); + if (e) throw e; + this.name = name; + this.numberFormat = numberFormat; + this.dateTimeFormat = dateTimeFormat; +} + function Sys$CultureInfo$_getDateTimeFormats() { + if (! this._dateTimeFormats) { + var dtf = this.dateTimeFormat; + this._dateTimeFormats = + [ dtf.MonthDayPattern, + dtf.YearMonthPattern, + dtf.ShortDatePattern, + dtf.ShortTimePattern, + dtf.LongDatePattern, + dtf.LongTimePattern, + dtf.FullDateTimePattern, + dtf.RFC1123Pattern, + dtf.SortableDateTimePattern, + dtf.UniversalSortableDateTimePattern ]; + } + return this._dateTimeFormats; + } + function Sys$CultureInfo$_getIndex(value, a1, a2) { + var upper = this._toUpper(value), + i = Array.indexOf(a1, upper); + if (i === -1) { + i = Array.indexOf(a2, upper); + } + return i; + } + function Sys$CultureInfo$_getMonthIndex(value) { + if (!this._upperMonths) { + this._upperMonths = this._toUpperArray(this.dateTimeFormat.MonthNames); + this._upperMonthsGenitive = this._toUpperArray(this.dateTimeFormat.MonthGenitiveNames); + } + return this._getIndex(value, this._upperMonths, this._upperMonthsGenitive); + } + function Sys$CultureInfo$_getAbbrMonthIndex(value) { + if (!this._upperAbbrMonths) { + this._upperAbbrMonths = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames); + this._upperAbbrMonthsGenitive = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthGenitiveNames); + } + return this._getIndex(value, this._upperAbbrMonths, this._upperAbbrMonthsGenitive); + } + function Sys$CultureInfo$_getDayIndex(value) { + if (!this._upperDays) { + this._upperDays = this._toUpperArray(this.dateTimeFormat.DayNames); + } + return Array.indexOf(this._upperDays, this._toUpper(value)); + } + function Sys$CultureInfo$_getAbbrDayIndex(value) { + if (!this._upperAbbrDays) { + this._upperAbbrDays = this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames); + } + return Array.indexOf(this._upperAbbrDays, this._toUpper(value)); + } + function Sys$CultureInfo$_toUpperArray(arr) { + var result = []; + for (var i = 0, il = arr.length; i < il; i++) { + result[i] = this._toUpper(arr[i]); + } + return result; + } + function Sys$CultureInfo$_toUpper(value) { + return value.split("\u00A0").join(' ').toUpperCase(); + } +Sys.CultureInfo.prototype = { + _getDateTimeFormats: Sys$CultureInfo$_getDateTimeFormats, + _getIndex: Sys$CultureInfo$_getIndex, + _getMonthIndex: Sys$CultureInfo$_getMonthIndex, + _getAbbrMonthIndex: Sys$CultureInfo$_getAbbrMonthIndex, + _getDayIndex: Sys$CultureInfo$_getDayIndex, + _getAbbrDayIndex: Sys$CultureInfo$_getAbbrDayIndex, + _toUpperArray: Sys$CultureInfo$_toUpperArray, + _toUpper: Sys$CultureInfo$_toUpper +} +Sys.CultureInfo.registerClass('Sys.CultureInfo'); +Sys.CultureInfo._parse = function Sys$CultureInfo$_parse(value) { + var dtf = value.dateTimeFormat; + if (dtf && !dtf.eras) { + dtf.eras = value.eras; + } + return new Sys.CultureInfo(value.name, value.numberFormat, dtf); +} +Sys.CultureInfo.InvariantCulture = Sys.CultureInfo._parse({"name":"","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":true,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"\u00A4","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":true},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, dd MMMM yyyy HH:mm:ss","LongDatePattern":"dddd, dd MMMM yyyy","LongTimePattern":"HH:mm:ss","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"MM/dd/yyyy","ShortTimePattern":"HH:mm","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"yyyy MMMM","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":true,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]},"eras":[1,"A.D.",null,0]}); +if (typeof(__cultureInfo) === "object") { + Sys.CultureInfo.CurrentCulture = Sys.CultureInfo._parse(__cultureInfo); + delete __cultureInfo; +} +else { + Sys.CultureInfo.CurrentCulture = Sys.CultureInfo._parse({"name":"en-US","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":false,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"$","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":false},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, MMMM dd, yyyy h:mm:ss tt","LongDatePattern":"dddd, MMMM dd, yyyy","LongTimePattern":"h:mm:ss tt","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"M/d/yyyy","ShortTimePattern":"h:mm tt","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"MMMM, yyyy","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":false,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]},"eras":[1,"A.D.",null,0]}); +} +Type.registerNamespace('Sys.Serialization'); +Sys.Serialization.JavaScriptSerializer = function Sys$Serialization$JavaScriptSerializer() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); +} +Sys.Serialization.JavaScriptSerializer.registerClass('Sys.Serialization.JavaScriptSerializer'); +Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs = []; +Sys.Serialization.JavaScriptSerializer._charsToEscape = []; +Sys.Serialization.JavaScriptSerializer._dateRegEx = new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"', 'g'); +Sys.Serialization.JavaScriptSerializer._escapeChars = {}; +Sys.Serialization.JavaScriptSerializer._escapeRegEx = new RegExp('["\\\\\\x00-\\x1F]', 'i'); +Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal = new RegExp('["\\\\\\x00-\\x1F]', 'g'); +Sys.Serialization.JavaScriptSerializer._jsonRegEx = new RegExp('[^,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]', 'g'); +Sys.Serialization.JavaScriptSerializer._jsonStringRegEx = new RegExp('"(\\\\.|[^"\\\\])*"', 'g'); +Sys.Serialization.JavaScriptSerializer._serverTypeFieldName = '__type'; +Sys.Serialization.JavaScriptSerializer._init = function Sys$Serialization$JavaScriptSerializer$_init() { + var replaceChars = ['\\u0000','\\u0001','\\u0002','\\u0003','\\u0004','\\u0005','\\u0006','\\u0007', + '\\b','\\t','\\n','\\u000b','\\f','\\r','\\u000e','\\u000f','\\u0010','\\u0011', + '\\u0012','\\u0013','\\u0014','\\u0015','\\u0016','\\u0017','\\u0018','\\u0019', + '\\u001a','\\u001b','\\u001c','\\u001d','\\u001e','\\u001f']; + Sys.Serialization.JavaScriptSerializer._charsToEscape[0] = '\\'; + Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['\\'] = new RegExp('\\\\', 'g'); + Sys.Serialization.JavaScriptSerializer._escapeChars['\\'] = '\\\\'; + Sys.Serialization.JavaScriptSerializer._charsToEscape[1] = '"'; + Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['"'] = new RegExp('"', 'g'); + Sys.Serialization.JavaScriptSerializer._escapeChars['"'] = '\\"'; + for (var i = 0; i < 32; i++) { + var c = String.fromCharCode(i); + Sys.Serialization.JavaScriptSerializer._charsToEscape[i+2] = c; + Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[c] = new RegExp(c, 'g'); + Sys.Serialization.JavaScriptSerializer._escapeChars[c] = replaceChars[i]; + } +} +Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeBooleanWithBuilder(object, stringBuilder) { + stringBuilder.append(object.toString()); +} +Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeNumberWithBuilder(object, stringBuilder) { + if (isFinite(object)) { + stringBuilder.append(String(object)); + } + else { + throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers); + } +} +Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeStringWithBuilder(string, stringBuilder) { + stringBuilder.append('"'); + if (Sys.Serialization.JavaScriptSerializer._escapeRegEx.test(string)) { + if (Sys.Serialization.JavaScriptSerializer._charsToEscape.length === 0) { + Sys.Serialization.JavaScriptSerializer._init(); + } + if (string.length < 128) { + string = string.replace(Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal, + function(x) { return Sys.Serialization.JavaScriptSerializer._escapeChars[x]; }); + } + else { + for (var i = 0; i < 34; i++) { + var c = Sys.Serialization.JavaScriptSerializer._charsToEscape[i]; + if (string.indexOf(c) !== -1) { + if (Sys.Browser.agent === Sys.Browser.Opera || Sys.Browser.agent === Sys.Browser.FireFox) { + string = string.split(c).join(Sys.Serialization.JavaScriptSerializer._escapeChars[c]); + } + else { + string = string.replace(Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[c], + Sys.Serialization.JavaScriptSerializer._escapeChars[c]); + } + } + } + } + } + stringBuilder.append(string); + stringBuilder.append('"'); +} +Sys.Serialization.JavaScriptSerializer._serializeWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeWithBuilder(object, stringBuilder, sort, prevObjects) { + var i; + switch (typeof object) { + case 'object': + if (object) { + if (prevObjects){ + for( var j = 0; j < prevObjects.length; j++) { + if (prevObjects[j] === object) { + throw Error.invalidOperation(Sys.Res.cannotSerializeObjectWithCycle); + } + } + } + else { + prevObjects = new Array(); + } + try { + Array.add(prevObjects, object); + + if (Number.isInstanceOfType(object)){ + Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(object, stringBuilder); + } + else if (Boolean.isInstanceOfType(object)){ + Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(object, stringBuilder); + } + else if (String.isInstanceOfType(object)){ + Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(object, stringBuilder); + } + + else if (Array.isInstanceOfType(object)) { + stringBuilder.append('['); + + for (i = 0; i < object.length; ++i) { + if (i > 0) { + stringBuilder.append(','); + } + Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object[i], stringBuilder,false,prevObjects); + } + stringBuilder.append(']'); + } + else { + if (Date.isInstanceOfType(object)) { + stringBuilder.append('"\\/Date('); + stringBuilder.append(object.getTime()); + stringBuilder.append(')\\/"'); + break; + } + var properties = []; + var propertyCount = 0; + for (var name in object) { + if (name.startsWith('$')) { + continue; + } + if (name === Sys.Serialization.JavaScriptSerializer._serverTypeFieldName && propertyCount !== 0){ + properties[propertyCount++] = properties[0]; + properties[0] = name; + } + else{ + properties[propertyCount++] = name; + } + } + if (sort) properties.sort(); + stringBuilder.append('{'); + var needComma = false; + + for (i=0; i + /// + /// + var e = Function._validateParams(arguments, [ + {name: "object", mayBeNull: true} + ]); + if (e) throw e; + var stringBuilder = new Sys.StringBuilder(); + Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object, stringBuilder, false); + return stringBuilder.toString(); +} +Sys.Serialization.JavaScriptSerializer.deserialize = function Sys$Serialization$JavaScriptSerializer$deserialize(data, secure) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "data", type: String}, + {name: "secure", type: Boolean, optional: true} + ]); + if (e) throw e; + + if (data.length === 0) throw Error.argument('data', Sys.Res.cannotDeserializeEmptyString); + try { + var exp = data.replace(Sys.Serialization.JavaScriptSerializer._dateRegEx, "$1new Date($2)"); + + if (secure && Sys.Serialization.JavaScriptSerializer._jsonRegEx.test( + exp.replace(Sys.Serialization.JavaScriptSerializer._jsonStringRegEx, ''))) throw null; + return eval('(' + exp + ')'); + } + catch (e) { + throw Error.argument('data', Sys.Res.cannotDeserializeInvalidJson); + } +} +Type.registerNamespace('Sys.UI'); + +Sys.EventHandlerList = function Sys$EventHandlerList() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._list = {}; +} + function Sys$EventHandlerList$_addHandler(id, handler) { + Array.add(this._getEvent(id, true), handler); + } + function Sys$EventHandlerList$addHandler(id, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "id", type: String}, + {name: "handler", type: Function} + ]); + if (e) throw e; + this._addHandler(id, handler); + } + function Sys$EventHandlerList$_removeHandler(id, handler) { + var evt = this._getEvent(id); + if (!evt) return; + Array.remove(evt, handler); + } + function Sys$EventHandlerList$removeHandler(id, handler) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "id", type: String}, + {name: "handler", type: Function} + ]); + if (e) throw e; + this._removeHandler(id, handler); + } + function Sys$EventHandlerList$getHandler(id) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "id", type: String} + ]); + if (e) throw e; + var evt = this._getEvent(id); + if (!evt || (evt.length === 0)) return null; + evt = Array.clone(evt); + return function(source, args) { + for (var i = 0, l = evt.length; i < l; i++) { + evt[i](source, args); + } + }; + } + function Sys$EventHandlerList$_getEvent(id, create) { + if (!this._list[id]) { + if (!create) return null; + this._list[id] = []; + } + return this._list[id]; + } +Sys.EventHandlerList.prototype = { + _addHandler: Sys$EventHandlerList$_addHandler, + addHandler: Sys$EventHandlerList$addHandler, + _removeHandler: Sys$EventHandlerList$_removeHandler, + removeHandler: Sys$EventHandlerList$removeHandler, + getHandler: Sys$EventHandlerList$getHandler, + _getEvent: Sys$EventHandlerList$_getEvent +} +Sys.EventHandlerList.registerClass('Sys.EventHandlerList'); +Sys.CommandEventArgs = function Sys$CommandEventArgs(commandName, commandArgument, commandSource) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "commandName", type: String}, + {name: "commandArgument", mayBeNull: true}, + {name: "commandSource", mayBeNull: true} + ]); + if (e) throw e; + Sys.CommandEventArgs.initializeBase(this); + this._commandName = commandName; + this._commandArgument = commandArgument; + this._commandSource = commandSource; +} + function Sys$CommandEventArgs$get_commandName() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._commandName; + } + function Sys$CommandEventArgs$get_commandArgument() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._commandArgument; + } + function Sys$CommandEventArgs$get_commandSource() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._commandSource; + } +Sys.CommandEventArgs.prototype = { + _commandName: null, + _commandArgument: null, + _commandSource: null, + get_commandName: Sys$CommandEventArgs$get_commandName, + get_commandArgument: Sys$CommandEventArgs$get_commandArgument, + get_commandSource: Sys$CommandEventArgs$get_commandSource +} +Sys.CommandEventArgs.registerClass("Sys.CommandEventArgs", Sys.CancelEventArgs); + +Sys.INotifyPropertyChange = function Sys$INotifyPropertyChange() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); +} + function Sys$INotifyPropertyChange$add_propertyChanged(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + throw Error.notImplemented(); + } + function Sys$INotifyPropertyChange$remove_propertyChanged(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + throw Error.notImplemented(); + } +Sys.INotifyPropertyChange.prototype = { + add_propertyChanged: Sys$INotifyPropertyChange$add_propertyChanged, + remove_propertyChanged: Sys$INotifyPropertyChange$remove_propertyChanged +} +Sys.INotifyPropertyChange.registerInterface('Sys.INotifyPropertyChange'); + +Sys.PropertyChangedEventArgs = function Sys$PropertyChangedEventArgs(propertyName) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "propertyName", type: String} + ]); + if (e) throw e; + Sys.PropertyChangedEventArgs.initializeBase(this); + this._propertyName = propertyName; +} + + function Sys$PropertyChangedEventArgs$get_propertyName() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._propertyName; + } +Sys.PropertyChangedEventArgs.prototype = { + get_propertyName: Sys$PropertyChangedEventArgs$get_propertyName +} +Sys.PropertyChangedEventArgs.registerClass('Sys.PropertyChangedEventArgs', Sys.EventArgs); + +Sys.INotifyDisposing = function Sys$INotifyDisposing() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); +} + function Sys$INotifyDisposing$add_disposing(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + throw Error.notImplemented(); + } + function Sys$INotifyDisposing$remove_disposing(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + throw Error.notImplemented(); + } +Sys.INotifyDisposing.prototype = { + add_disposing: Sys$INotifyDisposing$add_disposing, + remove_disposing: Sys$INotifyDisposing$remove_disposing +} +Sys.INotifyDisposing.registerInterface("Sys.INotifyDisposing"); + +Sys.Component = function Sys$Component() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (Sys.Application) Sys.Application.registerDisposableObject(this); +} + function Sys$Component$get_events() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._events) { + this._events = new Sys.EventHandlerList(); + } + return this._events; + } + function Sys$Component$get_id() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._id; + } + function Sys$Component$set_id(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + if (this._idSet) throw Error.invalidOperation(Sys.Res.componentCantSetIdTwice); + this._idSet = true; + var oldId = this.get_id(); + if (oldId && Sys.Application.findComponent(oldId)) throw Error.invalidOperation(Sys.Res.componentCantSetIdAfterAddedToApp); + this._id = value; + } + function Sys$Component$get_isInitialized() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._initialized; + } + function Sys$Component$get_isUpdating() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._updating; + } + function Sys$Component$add_disposing(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().addHandler("disposing", handler); + } + function Sys$Component$remove_disposing(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().removeHandler("disposing", handler); + } + function Sys$Component$add_propertyChanged(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().addHandler("propertyChanged", handler); + } + function Sys$Component$remove_propertyChanged(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().removeHandler("propertyChanged", handler); + } + function Sys$Component$beginUpdate() { + this._updating = true; + } + function Sys$Component$dispose() { + if (this._events) { + var handler = this._events.getHandler("disposing"); + if (handler) { + handler(this, Sys.EventArgs.Empty); + } + } + delete this._events; + Sys.Application.unregisterDisposableObject(this); + Sys.Application.removeComponent(this); + } + function Sys$Component$endUpdate() { + this._updating = false; + if (!this._initialized) this.initialize(); + this.updated(); + } + function Sys$Component$initialize() { + this._initialized = true; + } + function Sys$Component$raisePropertyChanged(propertyName) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "propertyName", type: String} + ]); + if (e) throw e; + if (!this._events) return; + var handler = this._events.getHandler("propertyChanged"); + if (handler) { + handler(this, new Sys.PropertyChangedEventArgs(propertyName)); + } + } + function Sys$Component$updated() { + } +Sys.Component.prototype = { + _id: null, + _idSet: false, + _initialized: false, + _updating: false, + get_events: Sys$Component$get_events, + get_id: Sys$Component$get_id, + set_id: Sys$Component$set_id, + get_isInitialized: Sys$Component$get_isInitialized, + get_isUpdating: Sys$Component$get_isUpdating, + add_disposing: Sys$Component$add_disposing, + remove_disposing: Sys$Component$remove_disposing, + add_propertyChanged: Sys$Component$add_propertyChanged, + remove_propertyChanged: Sys$Component$remove_propertyChanged, + beginUpdate: Sys$Component$beginUpdate, + dispose: Sys$Component$dispose, + endUpdate: Sys$Component$endUpdate, + initialize: Sys$Component$initialize, + raisePropertyChanged: Sys$Component$raisePropertyChanged, + updated: Sys$Component$updated +} +Sys.Component.registerClass('Sys.Component', null, Sys.IDisposable, Sys.INotifyPropertyChange, Sys.INotifyDisposing); +function Sys$Component$_setProperties(target, properties) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "target"}, + {name: "properties"} + ]); + if (e) throw e; + var current; + var targetType = Object.getType(target); + var isObject = (targetType === Object) || (targetType === Sys.UI.DomElement); + var isComponent = Sys.Component.isInstanceOfType(target) && !target.get_isUpdating(); + if (isComponent) target.beginUpdate(); + for (var name in properties) { + var val = properties[name]; + var getter = isObject ? null : target["get_" + name]; + if (isObject || typeof(getter) !== 'function') { + var targetVal = target[name]; + if (!isObject && typeof(targetVal) === 'undefined') throw Error.invalidOperation(String.format(Sys.Res.propertyUndefined, name)); + if (!val || (typeof(val) !== 'object') || (isObject && !targetVal)) { + target[name] = val; + } + else { + Sys$Component$_setProperties(targetVal, val); + } + } + else { + var setter = target["set_" + name]; + if (typeof(setter) === 'function') { + setter.apply(target, [val]); + } + else if (val instanceof Array) { + current = getter.apply(target); + if (!(current instanceof Array)) throw new Error.invalidOperation(String.format(Sys.Res.propertyNotAnArray, name)); + for (var i = 0, j = current.length, l= val.length; i < l; i++, j++) { + current[j] = val[i]; + } + } + else if ((typeof(val) === 'object') && (Object.getType(val) === Object)) { + current = getter.apply(target); + if ((typeof(current) === 'undefined') || (current === null)) throw new Error.invalidOperation(String.format(Sys.Res.propertyNullOrUndefined, name)); + Sys$Component$_setProperties(current, val); + } + else { + throw new Error.invalidOperation(String.format(Sys.Res.propertyNotWritable, name)); + } + } + } + if (isComponent) target.endUpdate(); +} +function Sys$Component$_setReferences(component, references) { + for (var name in references) { + var setter = component["set_" + name]; + var reference = $find(references[name]); + if (typeof(setter) !== 'function') throw new Error.invalidOperation(String.format(Sys.Res.propertyNotWritable, name)); + if (!reference) throw Error.invalidOperation(String.format(Sys.Res.referenceNotFound, references[name])); + setter.apply(component, [reference]); + } +} +var $create = Sys.Component.create = function Sys$Component$create(type, properties, events, references, element) { + /// + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "type", type: Type}, + {name: "properties", mayBeNull: true, optional: true}, + {name: "events", mayBeNull: true, optional: true}, + {name: "references", mayBeNull: true, optional: true}, + {name: "element", mayBeNull: true, domElement: true, optional: true} + ]); + if (e) throw e; + if (!type.inheritsFrom(Sys.Component)) { + throw Error.argument('type', String.format(Sys.Res.createNotComponent, type.getName())); + } + if (type.inheritsFrom(Sys.UI.Behavior) || type.inheritsFrom(Sys.UI.Control)) { + if (!element) throw Error.argument('element', Sys.Res.createNoDom); + } + else if (element) throw Error.argument('element', Sys.Res.createComponentOnDom); + var component = (element ? new type(element): new type()); + var app = Sys.Application; + var creatingComponents = app.get_isCreatingComponents(); + component.beginUpdate(); + if (properties) { + Sys$Component$_setProperties(component, properties); + } + if (events) { + for (var name in events) { + if (!(component["add_" + name] instanceof Function)) throw new Error.invalidOperation(String.format(Sys.Res.undefinedEvent, name)); + if (!(events[name] instanceof Function)) throw new Error.invalidOperation(Sys.Res.eventHandlerNotFunction); + component["add_" + name](events[name]); + } + } + if (component.get_id()) { + app.addComponent(component); + } + if (creatingComponents) { + app._createdComponents[app._createdComponents.length] = component; + if (references) { + app._addComponentToSecondPass(component, references); + } + else { + component.endUpdate(); + } + } + else { + if (references) { + Sys$Component$_setReferences(component, references); + } + component.endUpdate(); + } + return component; +} + +Sys.UI.MouseButton = function Sys$UI$MouseButton() { + /// + /// + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); +} +Sys.UI.MouseButton.prototype = { + leftButton: 0, + middleButton: 1, + rightButton: 2 +} +Sys.UI.MouseButton.registerEnum("Sys.UI.MouseButton"); + +Sys.UI.Key = function Sys$UI$Key() { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); +} +Sys.UI.Key.prototype = { + backspace: 8, + tab: 9, + enter: 13, + esc: 27, + space: 32, + pageUp: 33, + pageDown: 34, + end: 35, + home: 36, + left: 37, + up: 38, + right: 39, + down: 40, + del: 127 +} +Sys.UI.Key.registerEnum("Sys.UI.Key"); + +Sys.UI.Point = function Sys$UI$Point(x, y) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "x", type: Number, integer: true}, + {name: "y", type: Number, integer: true} + ]); + if (e) throw e; + this.x = x; + this.y = y; +} +Sys.UI.Point.registerClass('Sys.UI.Point'); + +Sys.UI.Bounds = function Sys$UI$Bounds(x, y, width, height) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "x", type: Number, integer: true}, + {name: "y", type: Number, integer: true}, + {name: "width", type: Number, integer: true}, + {name: "height", type: Number, integer: true} + ]); + if (e) throw e; + this.x = x; + this.y = y; + this.height = height; + this.width = width; +} +Sys.UI.Bounds.registerClass('Sys.UI.Bounds'); + +Sys.UI.DomEvent = function Sys$UI$DomEvent(eventObject) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "eventObject"} + ]); + if (e) throw e; + var ev = eventObject; + var etype = this.type = ev.type.toLowerCase(); + this.rawEvent = ev; + this.altKey = ev.altKey; + if (typeof(ev.button) !== 'undefined') { + this.button = (typeof(ev.which) !== 'undefined') ? ev.button : + (ev.button === 4) ? Sys.UI.MouseButton.middleButton : + (ev.button === 2) ? Sys.UI.MouseButton.rightButton : + Sys.UI.MouseButton.leftButton; + } + if (etype === 'keypress') { + this.charCode = ev.charCode || ev.keyCode; + } + else if (ev.keyCode && (ev.keyCode === 46)) { + this.keyCode = 127; + } + else { + this.keyCode = ev.keyCode; + } + this.clientX = ev.clientX; + this.clientY = ev.clientY; + this.ctrlKey = ev.ctrlKey; + this.target = ev.target ? ev.target : ev.srcElement; + if (!etype.startsWith('key')) { + if ((typeof(ev.offsetX) !== 'undefined') && (typeof(ev.offsetY) !== 'undefined')) { + this.offsetX = ev.offsetX; + this.offsetY = ev.offsetY; + } + else if (this.target && (this.target.nodeType !== 3) && (typeof(ev.clientX) === 'number')) { + var loc = Sys.UI.DomElement.getLocation(this.target); + var w = Sys.UI.DomElement._getWindow(this.target); + this.offsetX = (w.pageXOffset || 0) + ev.clientX - loc.x; + this.offsetY = (w.pageYOffset || 0) + ev.clientY - loc.y; + } + } + this.screenX = ev.screenX; + this.screenY = ev.screenY; + this.shiftKey = ev.shiftKey; +} + function Sys$UI$DomEvent$preventDefault() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this.rawEvent.preventDefault) { + this.rawEvent.preventDefault(); + } + else if (window.event) { + this.rawEvent.returnValue = false; + } + } + function Sys$UI$DomEvent$stopPropagation() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this.rawEvent.stopPropagation) { + this.rawEvent.stopPropagation(); + } + else if (window.event) { + this.rawEvent.cancelBubble = true; + } + } +Sys.UI.DomEvent.prototype = { + preventDefault: Sys$UI$DomEvent$preventDefault, + stopPropagation: Sys$UI$DomEvent$stopPropagation +} +Sys.UI.DomEvent.registerClass('Sys.UI.DomEvent'); +var $addHandler = Sys.UI.DomEvent.addHandler = function Sys$UI$DomEvent$addHandler(element, eventName, handler, autoRemove) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element"}, + {name: "eventName", type: String}, + {name: "handler", type: Function}, + {name: "autoRemove", type: Boolean, optional: true} + ]); + if (e) throw e; + Sys.UI.DomEvent._ensureDomNode(element); + if (eventName === "error") throw Error.invalidOperation(Sys.Res.addHandlerCantBeUsedForError); + if (!element._events) { + element._events = {}; + } + var eventCache = element._events[eventName]; + if (!eventCache) { + element._events[eventName] = eventCache = []; + } + var browserHandler; + if (element.addEventListener) { + browserHandler = function(e) { + return handler.call(element, new Sys.UI.DomEvent(e)); + } + element.addEventListener(eventName, browserHandler, false); + } + else if (element.attachEvent) { + browserHandler = function() { + var e = {}; + try {e = Sys.UI.DomElement._getWindow(element).event} catch(ex) {} + return handler.call(element, new Sys.UI.DomEvent(e)); + } + element.attachEvent('on' + eventName, browserHandler); + } + eventCache[eventCache.length] = {handler: handler, browserHandler: browserHandler, autoRemove: autoRemove }; + if (autoRemove) { + var d = element.dispose; + if (d !== Sys.UI.DomEvent._disposeHandlers) { + element.dispose = Sys.UI.DomEvent._disposeHandlers; + if (typeof(d) !== "undefined") { + element._chainDispose = d; + } + } + } +} +var $addHandlers = Sys.UI.DomEvent.addHandlers = function Sys$UI$DomEvent$addHandlers(element, events, handlerOwner, autoRemove) { + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element"}, + {name: "events", type: Object}, + {name: "handlerOwner", optional: true}, + {name: "autoRemove", type: Boolean, optional: true} + ]); + if (e) throw e; + Sys.UI.DomEvent._ensureDomNode(element); + for (var name in events) { + var handler = events[name]; + if (typeof(handler) !== 'function') throw Error.invalidOperation(Sys.Res.cantAddNonFunctionhandler); + if (handlerOwner) { + handler = Function.createDelegate(handlerOwner, handler); + } + $addHandler(element, name, handler, autoRemove || false); + } +} +var $clearHandlers = Sys.UI.DomEvent.clearHandlers = function Sys$UI$DomEvent$clearHandlers(element) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element"} + ]); + if (e) throw e; + Sys.UI.DomEvent._ensureDomNode(element); + Sys.UI.DomEvent._clearHandlers(element, false); +} +Sys.UI.DomEvent._clearHandlers = function Sys$UI$DomEvent$_clearHandlers(element, autoRemoving) { + if (element._events) { + var cache = element._events; + for (var name in cache) { + var handlers = cache[name]; + for (var i = handlers.length - 1; i >= 0; i--) { + var entry = handlers[i]; + if (!autoRemoving || entry.autoRemove) { + $removeHandler(element, name, entry.handler); + } + } + } + element._events = null; + } +} +Sys.UI.DomEvent._disposeHandlers = function Sys$UI$DomEvent$_disposeHandlers() { + Sys.UI.DomEvent._clearHandlers(this, true); + var d = this._chainDispose, type = typeof(d); + if (type !== "undefined") { + this.dispose = d; + this._chainDispose = null; + if (type === "function") { + this.dispose(); + } + } +} +var $removeHandler = Sys.UI.DomEvent.removeHandler = function Sys$UI$DomEvent$removeHandler(element, eventName, handler) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element"}, + {name: "eventName", type: String}, + {name: "handler", type: Function} + ]); + if (e) throw e; + Sys.UI.DomEvent._removeHandler(element, eventName, handler); +} +Sys.UI.DomEvent._removeHandler = function Sys$UI$DomEvent$_removeHandler(element, eventName, handler) { + Sys.UI.DomEvent._ensureDomNode(element); + var browserHandler = null; + if ((typeof(element._events) !== 'object') || !element._events) throw Error.invalidOperation(Sys.Res.eventHandlerInvalid); + var cache = element._events[eventName]; + if (!(cache instanceof Array)) throw Error.invalidOperation(Sys.Res.eventHandlerInvalid); + for (var i = 0, l = cache.length; i < l; i++) { + if (cache[i].handler === handler) { + browserHandler = cache[i].browserHandler; + break; + } + } + if (typeof(browserHandler) !== 'function') throw Error.invalidOperation(Sys.Res.eventHandlerInvalid); + if (element.removeEventListener) { + element.removeEventListener(eventName, browserHandler, false); + } + else if (element.detachEvent) { + element.detachEvent('on' + eventName, browserHandler); + } + cache.splice(i, 1); +} +Sys.UI.DomEvent._ensureDomNode = function Sys$UI$DomEvent$_ensureDomNode(element) { + if (element.tagName && (element.tagName.toUpperCase() === "SCRIPT")) return; + + var doc = element.ownerDocument || element.document || element; + if ((typeof(element.document) !== 'object') && (element != doc) && (typeof(element.nodeType) !== 'number')) { + throw Error.argument("element", Sys.Res.argumentDomNode); + } +} + +Sys.UI.DomElement = function Sys$UI$DomElement() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); +} +Sys.UI.DomElement.registerClass('Sys.UI.DomElement'); +Sys.UI.DomElement.addCssClass = function Sys$UI$DomElement$addCssClass(element, className) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "className", type: String} + ]); + if (e) throw e; + if (!Sys.UI.DomElement.containsCssClass(element, className)) { + if (element.className === '') { + element.className = className; + } + else { + element.className += ' ' + className; + } + } +} +Sys.UI.DomElement.containsCssClass = function Sys$UI$DomElement$containsCssClass(element, className) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "className", type: String} + ]); + if (e) throw e; + return Array.contains(element.className.split(' '), className); +} +Sys.UI.DomElement.getBounds = function Sys$UI$DomElement$getBounds(element) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + var offset = Sys.UI.DomElement.getLocation(element); + return new Sys.UI.Bounds(offset.x, offset.y, element.offsetWidth || 0, element.offsetHeight || 0); +} +var $get = Sys.UI.DomElement.getElementById = function Sys$UI$DomElement$getElementById(id, element) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "id", type: String}, + {name: "element", mayBeNull: true, domElement: true, optional: true} + ]); + if (e) throw e; + if (!element) return document.getElementById(id); + if (element.getElementById) return element.getElementById(id); + var nodeQueue = []; + var childNodes = element.childNodes; + for (var i = 0; i < childNodes.length; i++) { + var node = childNodes[i]; + if (node.nodeType == 1) { + nodeQueue[nodeQueue.length] = node; + } + } + while (nodeQueue.length) { + node = nodeQueue.shift(); + if (node.id == id) { + return node; + } + childNodes = node.childNodes; + for (i = 0; i < childNodes.length; i++) { + node = childNodes[i]; + if (node.nodeType == 1) { + nodeQueue[nodeQueue.length] = node; + } + } + } + return null; +} +if (document.documentElement.getBoundingClientRect) { + Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + if (element.self || element.nodeType === 9) return new Sys.UI.Point(0,0); + var clientRect = element.getBoundingClientRect(); + if (!clientRect) { + return new Sys.UI.Point(0,0); + } + var documentElement = element.ownerDocument.documentElement, + offsetX = Math.floor(clientRect.left + 0.5) + documentElement.scrollLeft, + offsetY = Math.floor(clientRect.top + 0.5) + documentElement.scrollTop; + if (Sys.Browser.agent === Sys.Browser.InternetExplorer) { + try { + var f = element.ownerDocument.parentWindow.frameElement || null; + if (f) { + var offset = (f.frameBorder === "0" || f.frameBorder === "no") ? 2 : 0; + offsetX += offset; + offsetY += offset; + } + } + catch(ex) { + } + if (Sys.Browser.version <= 7) { + + var multiplier, before, rect, d = document.createElement("div"); + d.style.cssText = "position:absolute !important;left:0px !important;right:0px !important;height:0px !important;width:1px !important;display:hidden !important"; + try { + before = document.body.childNodes[0]; + document.body.insertBefore(d, before); + rect = d.getBoundingClientRect(); + document.body.removeChild(d); + multiplier = (rect.right - rect.left); + } + catch (e) { + } + if (multiplier && (multiplier !== 1)) { + offsetX = Math.floor(offsetX / multiplier); + offsetY = Math.floor(offsetY / multiplier); + } + } + if ((document.documentMode || 0) < 8) { + offsetX -= 2; + offsetY -= 2; + } + } + return new Sys.UI.Point(offsetX, offsetY); + } +} +else if (Sys.Browser.agent === Sys.Browser.Safari) { + Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + if ((element.window && (element.window === element)) || element.nodeType === 9) return new Sys.UI.Point(0,0); + var offsetX = 0, offsetY = 0, + parent, + previous = null, + previousStyle = null, + currentStyle; + for (parent = element; parent; previous = parent, previousStyle = currentStyle, parent = parent.offsetParent) { + currentStyle = Sys.UI.DomElement._getCurrentStyle(parent); + var tagName = parent.tagName ? parent.tagName.toUpperCase() : null; + if ((parent.offsetLeft || parent.offsetTop) && + ((tagName !== "BODY") || (!previousStyle || previousStyle.position !== "absolute"))) { + offsetX += parent.offsetLeft; + offsetY += parent.offsetTop; + } + if (previous && Sys.Browser.version >= 3) { + offsetX += parseInt(currentStyle.borderLeftWidth); + offsetY += parseInt(currentStyle.borderTopWidth); + } + } + currentStyle = Sys.UI.DomElement._getCurrentStyle(element); + var elementPosition = currentStyle ? currentStyle.position : null; + if (!elementPosition || (elementPosition !== "absolute")) { + for (parent = element.parentNode; parent; parent = parent.parentNode) { + tagName = parent.tagName ? parent.tagName.toUpperCase() : null; + if ((tagName !== "BODY") && (tagName !== "HTML") && (parent.scrollLeft || parent.scrollTop)) { + offsetX -= (parent.scrollLeft || 0); + offsetY -= (parent.scrollTop || 0); + } + currentStyle = Sys.UI.DomElement._getCurrentStyle(parent); + var parentPosition = currentStyle ? currentStyle.position : null; + if (parentPosition && (parentPosition === "absolute")) break; + } + } + return new Sys.UI.Point(offsetX, offsetY); + } +} +else { + Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + if ((element.window && (element.window === element)) || element.nodeType === 9) return new Sys.UI.Point(0,0); + var offsetX = 0, offsetY = 0, + parent, + previous = null, + previousStyle = null, + currentStyle = null; + for (parent = element; parent; previous = parent, previousStyle = currentStyle, parent = parent.offsetParent) { + var tagName = parent.tagName ? parent.tagName.toUpperCase() : null; + currentStyle = Sys.UI.DomElement._getCurrentStyle(parent); + if ((parent.offsetLeft || parent.offsetTop) && + !((tagName === "BODY") && + (!previousStyle || previousStyle.position !== "absolute"))) { + offsetX += parent.offsetLeft; + offsetY += parent.offsetTop; + } + if (previous !== null && currentStyle) { + if ((tagName !== "TABLE") && (tagName !== "TD") && (tagName !== "HTML")) { + offsetX += parseInt(currentStyle.borderLeftWidth) || 0; + offsetY += parseInt(currentStyle.borderTopWidth) || 0; + } + if (tagName === "TABLE" && + (currentStyle.position === "relative" || currentStyle.position === "absolute")) { + offsetX += parseInt(currentStyle.marginLeft) || 0; + offsetY += parseInt(currentStyle.marginTop) || 0; + } + } + } + currentStyle = Sys.UI.DomElement._getCurrentStyle(element); + var elementPosition = currentStyle ? currentStyle.position : null; + if (!elementPosition || (elementPosition !== "absolute")) { + for (parent = element.parentNode; parent; parent = parent.parentNode) { + tagName = parent.tagName ? parent.tagName.toUpperCase() : null; + if ((tagName !== "BODY") && (tagName !== "HTML") && (parent.scrollLeft || parent.scrollTop)) { + offsetX -= (parent.scrollLeft || 0); + offsetY -= (parent.scrollTop || 0); + currentStyle = Sys.UI.DomElement._getCurrentStyle(parent); + if (currentStyle) { + offsetX += parseInt(currentStyle.borderLeftWidth) || 0; + offsetY += parseInt(currentStyle.borderTopWidth) || 0; + } + } + } + } + return new Sys.UI.Point(offsetX, offsetY); + } +} +Sys.UI.DomElement.isDomElement = function Sys$UI$DomElement$isDomElement(obj) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "obj"} + ]); + if (e) throw e; + return Sys._isDomElement(obj); +} +Sys.UI.DomElement.removeCssClass = function Sys$UI$DomElement$removeCssClass(element, className) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "className", type: String} + ]); + if (e) throw e; + var currentClassName = ' ' + element.className + ' '; + var index = currentClassName.indexOf(' ' + className + ' '); + if (index >= 0) { + element.className = (currentClassName.substr(0, index) + ' ' + + currentClassName.substring(index + className.length + 1, currentClassName.length)).trim(); + } +} +Sys.UI.DomElement.resolveElement = function Sys$UI$DomElement$resolveElement(elementOrElementId, containerElement) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "elementOrElementId", mayBeNull: true}, + {name: "containerElement", mayBeNull: true, domElement: true, optional: true} + ]); + if (e) throw e; + var el = elementOrElementId; + if (!el) return null; + if (typeof(el) === "string") { + el = Sys.UI.DomElement.getElementById(el, containerElement); + if (!el) { + throw Error.argument("elementOrElementId", String.format(Sys.Res.elementNotFound, elementOrElementId)); + } + } + else if(!Sys.UI.DomElement.isDomElement(el)) { + throw Error.argument("elementOrElementId", Sys.Res.expectedElementOrId); + } + return el; +} +Sys.UI.DomElement.raiseBubbleEvent = function Sys$UI$DomElement$raiseBubbleEvent(source, args) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "source", domElement: true}, + {name: "args", type: Sys.EventArgs} + ]); + if (e) throw e; + var target = source; + while (target) { + var control = target.control; + if (control && control.onBubbleEvent && control.raiseBubbleEvent) { + Sys.UI.DomElement._raiseBubbleEventFromControl(control, source, args); + return; + } + target = target.parentNode; + } +} +Sys.UI.DomElement._raiseBubbleEventFromControl = function Sys$UI$DomElement$_raiseBubbleEventFromControl(control, source, args) { + if (!control.onBubbleEvent(source, args)) { + control._raiseBubbleEvent(source, args); + } +} +Sys.UI.DomElement.setLocation = function Sys$UI$DomElement$setLocation(element, x, y) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "x", type: Number, integer: true}, + {name: "y", type: Number, integer: true} + ]); + if (e) throw e; + var style = element.style; + style.position = 'absolute'; + style.left = x + "px"; + style.top = y + "px"; +} +Sys.UI.DomElement.toggleCssClass = function Sys$UI$DomElement$toggleCssClass(element, className) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "className", type: String} + ]); + if (e) throw e; + if (Sys.UI.DomElement.containsCssClass(element, className)) { + Sys.UI.DomElement.removeCssClass(element, className); + } + else { + Sys.UI.DomElement.addCssClass(element, className); + } +} +Sys.UI.DomElement.getVisibilityMode = function Sys$UI$DomElement$getVisibilityMode(element) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + return (element._visibilityMode === Sys.UI.VisibilityMode.hide) ? + Sys.UI.VisibilityMode.hide : + Sys.UI.VisibilityMode.collapse; +} +Sys.UI.DomElement.setVisibilityMode = function Sys$UI$DomElement$setVisibilityMode(element, value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "value", type: Sys.UI.VisibilityMode} + ]); + if (e) throw e; + Sys.UI.DomElement._ensureOldDisplayMode(element); + if (element._visibilityMode !== value) { + element._visibilityMode = value; + if (Sys.UI.DomElement.getVisible(element) === false) { + if (element._visibilityMode === Sys.UI.VisibilityMode.hide) { + element.style.display = element._oldDisplayMode; + } + else { + element.style.display = 'none'; + } + } + element._visibilityMode = value; + } +} +Sys.UI.DomElement.getVisible = function Sys$UI$DomElement$getVisible(element) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + var style = element.currentStyle || Sys.UI.DomElement._getCurrentStyle(element); + if (!style) return true; + return (style.visibility !== 'hidden') && (style.display !== 'none'); +} +Sys.UI.DomElement.setVisible = function Sys$UI$DomElement$setVisible(element, value) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "value", type: Boolean} + ]); + if (e) throw e; + if (value !== Sys.UI.DomElement.getVisible(element)) { + Sys.UI.DomElement._ensureOldDisplayMode(element); + element.style.visibility = value ? 'visible' : 'hidden'; + if (value || (element._visibilityMode === Sys.UI.VisibilityMode.hide)) { + element.style.display = element._oldDisplayMode; + } + else { + element.style.display = 'none'; + } + } +} +Sys.UI.DomElement._ensureOldDisplayMode = function Sys$UI$DomElement$_ensureOldDisplayMode(element) { + if (!element._oldDisplayMode) { + var style = element.currentStyle || Sys.UI.DomElement._getCurrentStyle(element); + element._oldDisplayMode = style ? style.display : null; + if (!element._oldDisplayMode || element._oldDisplayMode === 'none') { + switch(element.tagName.toUpperCase()) { + case 'DIV': case 'P': case 'ADDRESS': case 'BLOCKQUOTE': case 'BODY': case 'COL': + case 'COLGROUP': case 'DD': case 'DL': case 'DT': case 'FIELDSET': case 'FORM': + case 'H1': case 'H2': case 'H3': case 'H4': case 'H5': case 'H6': case 'HR': + case 'IFRAME': case 'LEGEND': case 'OL': case 'PRE': case 'TABLE': case 'TD': + case 'TH': case 'TR': case 'UL': + element._oldDisplayMode = 'block'; + break; + case 'LI': + element._oldDisplayMode = 'list-item'; + break; + default: + element._oldDisplayMode = 'inline'; + } + } + } +} +Sys.UI.DomElement._getWindow = function Sys$UI$DomElement$_getWindow(element) { + var doc = element.ownerDocument || element.document || element; + return doc.defaultView || doc.parentWindow; +} +Sys.UI.DomElement._getCurrentStyle = function Sys$UI$DomElement$_getCurrentStyle(element) { + if (element.nodeType === 3) return null; + var w = Sys.UI.DomElement._getWindow(element); + if (element.documentElement) element = element.documentElement; + var computedStyle = (w && (element !== w) && w.getComputedStyle) ? + w.getComputedStyle(element, null) : + element.currentStyle || element.style; + if (!computedStyle && (Sys.Browser.agent === Sys.Browser.Safari) && element.style) { + var oldDisplay = element.style.display; + var oldPosition = element.style.position; + element.style.position = 'absolute'; + element.style.display = 'block'; + var style = w.getComputedStyle(element, null); + element.style.display = oldDisplay; + element.style.position = oldPosition; + computedStyle = {}; + for (var n in style) { + computedStyle[n] = style[n]; + } + computedStyle.display = 'none'; + } + return computedStyle; +} + +Sys.IContainer = function Sys$IContainer() { + throw Error.notImplemented(); +} + function Sys$IContainer$addComponent(component) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "component", type: Sys.Component} + ]); + if (e) throw e; + throw Error.notImplemented(); + } + function Sys$IContainer$removeComponent(component) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "component", type: Sys.Component} + ]); + if (e) throw e; + throw Error.notImplemented(); + } + function Sys$IContainer$findComponent(id) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "id", type: String} + ]); + if (e) throw e; + throw Error.notImplemented(); + } + function Sys$IContainer$getComponents() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } +Sys.IContainer.prototype = { + addComponent: Sys$IContainer$addComponent, + removeComponent: Sys$IContainer$removeComponent, + findComponent: Sys$IContainer$findComponent, + getComponents: Sys$IContainer$getComponents +} +Sys.IContainer.registerInterface("Sys.IContainer"); + +Sys.ApplicationLoadEventArgs = function Sys$ApplicationLoadEventArgs(components, isPartialLoad) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "components", type: Array, elementType: Sys.Component}, + {name: "isPartialLoad", type: Boolean} + ]); + if (e) throw e; + Sys.ApplicationLoadEventArgs.initializeBase(this); + this._components = components; + this._isPartialLoad = isPartialLoad; +} + + function Sys$ApplicationLoadEventArgs$get_components() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._components; + } + function Sys$ApplicationLoadEventArgs$get_isPartialLoad() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._isPartialLoad; + } +Sys.ApplicationLoadEventArgs.prototype = { + get_components: Sys$ApplicationLoadEventArgs$get_components, + get_isPartialLoad: Sys$ApplicationLoadEventArgs$get_isPartialLoad +} +Sys.ApplicationLoadEventArgs.registerClass('Sys.ApplicationLoadEventArgs', Sys.EventArgs); + +Sys._Application = function Sys$_Application() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + Sys._Application.initializeBase(this); + this._disposableObjects = []; + this._components = {}; + this._createdComponents = []; + this._secondPassComponents = []; + this._unloadHandlerDelegate = Function.createDelegate(this, this._unloadHandler); + Sys.UI.DomEvent.addHandler(window, "unload", this._unloadHandlerDelegate); + this._domReady(); +} + function Sys$_Application$get_isCreatingComponents() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._creatingComponents; + } + function Sys$_Application$get_isDisposing() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._disposing; + } + function Sys$_Application$add_init(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + if (this._initialized) { + handler(this, Sys.EventArgs.Empty); + } + else { + this.get_events().addHandler("init", handler); + } + } + function Sys$_Application$remove_init(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().removeHandler("init", handler); + } + function Sys$_Application$add_load(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().addHandler("load", handler); + } + function Sys$_Application$remove_load(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().removeHandler("load", handler); + } + function Sys$_Application$add_unload(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().addHandler("unload", handler); + } + function Sys$_Application$remove_unload(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this.get_events().removeHandler("unload", handler); + } + function Sys$_Application$addComponent(component) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "component", type: Sys.Component} + ]); + if (e) throw e; + var id = component.get_id(); + if (!id) throw Error.invalidOperation(Sys.Res.cantAddWithoutId); + if (typeof(this._components[id]) !== 'undefined') throw Error.invalidOperation(String.format(Sys.Res.appDuplicateComponent, id)); + this._components[id] = component; + } + function Sys$_Application$beginCreateComponents() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._creatingComponents = true; + } + function Sys$_Application$dispose() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._disposing) { + this._disposing = true; + if (this._timerCookie) { + window.clearTimeout(this._timerCookie); + delete this._timerCookie; + } + if (this._endRequestHandler) { + Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler); + delete this._endRequestHandler; + } + if (this._beginRequestHandler) { + Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler); + delete this._beginRequestHandler; + } + if (window.pageUnload) { + window.pageUnload(this, Sys.EventArgs.Empty); + } + var unloadHandler = this.get_events().getHandler("unload"); + if (unloadHandler) { + unloadHandler(this, Sys.EventArgs.Empty); + } + var disposableObjects = Array.clone(this._disposableObjects); + for (var i = 0, l = disposableObjects.length; i < l; i++) { + var object = disposableObjects[i]; + if (typeof(object) !== "undefined") { + object.dispose(); + } + } + Array.clear(this._disposableObjects); + Sys.UI.DomEvent.removeHandler(window, "unload", this._unloadHandlerDelegate); + if (Sys._ScriptLoader) { + var sl = Sys._ScriptLoader.getInstance(); + if(sl) { + sl.dispose(); + } + } + Sys._Application.callBaseMethod(this, 'dispose'); + } + } + function Sys$_Application$disposeElement(element, childNodesOnly) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element"}, + {name: "childNodesOnly", type: Boolean} + ]); + if (e) throw e; + if (element.nodeType === 1) { + var children = element.getElementsByTagName("*"); + for (var i = children.length - 1; i >= 0; i--) { + this._disposeElementInternal(children[i]); + } + if (!childNodesOnly) { + this._disposeElementInternal(element); + } + } + } + function Sys$_Application$endCreateComponents() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + var components = this._secondPassComponents; + for (var i = 0, l = components.length; i < l; i++) { + var component = components[i].component; + Sys$Component$_setReferences(component, components[i].references); + component.endUpdate(); + } + this._secondPassComponents = []; + this._creatingComponents = false; + } + function Sys$_Application$findComponent(id, parent) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "id", type: String}, + {name: "parent", mayBeNull: true, optional: true} + ]); + if (e) throw e; + return (parent ? + ((Sys.IContainer.isInstanceOfType(parent)) ? + parent.findComponent(id) : + parent[id] || null) : + Sys.Application._components[id] || null); + } + function Sys$_Application$getComponents() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + var res = []; + var components = this._components; + for (var name in components) { + res[res.length] = components[name]; + } + return res; + } + function Sys$_Application$initialize() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if(!this.get_isInitialized() && !this._disposing) { + Sys._Application.callBaseMethod(this, 'initialize'); + this._raiseInit(); + if (this.get_stateString) { + if (Sys.WebForms && Sys.WebForms.PageRequestManager) { + this._beginRequestHandler = Function.createDelegate(this, this._onPageRequestManagerBeginRequest); + Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(this._beginRequestHandler); + this._endRequestHandler = Function.createDelegate(this, this._onPageRequestManagerEndRequest); + Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler); + } + var loadedEntry = this.get_stateString(); + if (loadedEntry !== this._currentEntry) { + this._navigate(loadedEntry); + } + else { + this._ensureHistory(); + } + } + this.raiseLoad(); + } + } + function Sys$_Application$notifyScriptLoaded() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + } + function Sys$_Application$registerDisposableObject(object) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "object", type: Sys.IDisposable} + ]); + if (e) throw e; + if (!this._disposing) { + var objects = this._disposableObjects, + i = objects.length; + objects[i] = object; + object.__msdisposeindex = i; + } + } + function Sys$_Application$raiseLoad() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + var h = this.get_events().getHandler("load"); + var args = new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents), !!this._loaded); + this._loaded = true; + if (h) { + h(this, args); + } + if (window.pageLoad) { + window.pageLoad(this, args); + } + this._createdComponents = []; + } + function Sys$_Application$removeComponent(component) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "component", type: Sys.Component} + ]); + if (e) throw e; + var id = component.get_id(); + if (id) delete this._components[id]; + } + function Sys$_Application$unregisterDisposableObject(object) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "object", type: Sys.IDisposable} + ]); + if (e) throw e; + if (!this._disposing) { + var i = object.__msdisposeindex; + if (typeof(i) === "number") { + var disposableObjects = this._disposableObjects; + delete disposableObjects[i]; + delete object.__msdisposeindex; + if (++this._deleteCount > 1000) { + var newArray = []; + for (var j = 0, l = disposableObjects.length; j < l; j++) { + object = disposableObjects[j]; + if (typeof(object) !== "undefined") { + object.__msdisposeindex = newArray.length; + newArray.push(object); + } + } + this._disposableObjects = newArray; + this._deleteCount = 0; + } + } + } + } + function Sys$_Application$_addComponentToSecondPass(component, references) { + this._secondPassComponents[this._secondPassComponents.length] = {component: component, references: references}; + } + function Sys$_Application$_disposeComponents(list) { + if (list) { + for (var i = list.length - 1; i >= 0; i--) { + var item = list[i]; + if (typeof(item.dispose) === "function") { + item.dispose(); + } + } + } + } + function Sys$_Application$_disposeElementInternal(element) { + var d = element.dispose; + if (d && typeof(d) === "function") { + element.dispose(); + } + else { + var c = element.control; + if (c && typeof(c.dispose) === "function") { + c.dispose(); + } + } + var list = element._behaviors; + if (list) { + this._disposeComponents(list); + } + list = element._components; + if (list) { + this._disposeComponents(list); + element._components = null; + } + } + function Sys$_Application$_domReady() { + var check, er, app = this; + function init() { app.initialize(); } + var onload = function() { + Sys.UI.DomEvent.removeHandler(window, "load", onload); + init(); + } + Sys.UI.DomEvent.addHandler(window, "load", onload); + + if (document.addEventListener) { + try { + document.addEventListener("DOMContentLoaded", check = function() { + document.removeEventListener("DOMContentLoaded", check, false); + init(); + }, false); + } + catch (er) { } + } + else if (document.attachEvent) { + if ((window == window.top) && document.documentElement.doScroll) { + var timeout, el = document.createElement("div"); + check = function() { + try { + el.doScroll("left"); + } + catch (er) { + timeout = window.setTimeout(check, 0); + return; + } + el = null; + init(); + } + check(); + } + else { + document.attachEvent("onreadystatechange", check = function() { + if (document.readyState === "complete") { + document.detachEvent("onreadystatechange", check); + init(); + } + }); + } + } + } + function Sys$_Application$_raiseInit() { + var handler = this.get_events().getHandler("init"); + if (handler) { + this.beginCreateComponents(); + handler(this, Sys.EventArgs.Empty); + this.endCreateComponents(); + } + } + function Sys$_Application$_unloadHandler(event) { + this.dispose(); + } +Sys._Application.prototype = { + _creatingComponents: false, + _disposing: false, + _deleteCount: 0, + get_isCreatingComponents: Sys$_Application$get_isCreatingComponents, + get_isDisposing: Sys$_Application$get_isDisposing, + add_init: Sys$_Application$add_init, + remove_init: Sys$_Application$remove_init, + add_load: Sys$_Application$add_load, + remove_load: Sys$_Application$remove_load, + add_unload: Sys$_Application$add_unload, + remove_unload: Sys$_Application$remove_unload, + addComponent: Sys$_Application$addComponent, + beginCreateComponents: Sys$_Application$beginCreateComponents, + dispose: Sys$_Application$dispose, + disposeElement: Sys$_Application$disposeElement, + endCreateComponents: Sys$_Application$endCreateComponents, + findComponent: Sys$_Application$findComponent, + getComponents: Sys$_Application$getComponents, + initialize: Sys$_Application$initialize, + notifyScriptLoaded: Sys$_Application$notifyScriptLoaded, + registerDisposableObject: Sys$_Application$registerDisposableObject, + raiseLoad: Sys$_Application$raiseLoad, + removeComponent: Sys$_Application$removeComponent, + unregisterDisposableObject: Sys$_Application$unregisterDisposableObject, + _addComponentToSecondPass: Sys$_Application$_addComponentToSecondPass, + _disposeComponents: Sys$_Application$_disposeComponents, + _disposeElementInternal: Sys$_Application$_disposeElementInternal, + _domReady: Sys$_Application$_domReady, + _raiseInit: Sys$_Application$_raiseInit, + _unloadHandler: Sys$_Application$_unloadHandler +} +Sys._Application.registerClass('Sys._Application', Sys.Component, Sys.IContainer); +Sys.Application = new Sys._Application(); +var $find = Sys.Application.findComponent; + +Sys.UI.Behavior = function Sys$UI$Behavior(element) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + Sys.UI.Behavior.initializeBase(this); + this._element = element; + var behaviors = element._behaviors; + if (!behaviors) { + element._behaviors = [this]; + } + else { + behaviors[behaviors.length] = this; + } +} + function Sys$UI$Behavior$get_element() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._element; + } + function Sys$UI$Behavior$get_id() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + var baseId = Sys.UI.Behavior.callBaseMethod(this, 'get_id'); + if (baseId) return baseId; + if (!this._element || !this._element.id) return ''; + return this._element.id + '$' + this.get_name(); + } + function Sys$UI$Behavior$get_name() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this._name) return this._name; + var name = Object.getTypeName(this); + var i = name.lastIndexOf('.'); + if (i !== -1) name = name.substr(i + 1); + if (!this.get_isInitialized()) this._name = name; + return name; + } + function Sys$UI$Behavior$set_name(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + if ((value === '') || (value.charAt(0) === ' ') || (value.charAt(value.length - 1) === ' ')) + throw Error.argument('value', Sys.Res.invalidId); + if (typeof(this._element[value]) !== 'undefined') + throw Error.invalidOperation(String.format(Sys.Res.behaviorDuplicateName, value)); + if (this.get_isInitialized()) throw Error.invalidOperation(Sys.Res.cantSetNameAfterInit); + this._name = value; + } + function Sys$UI$Behavior$initialize() { + Sys.UI.Behavior.callBaseMethod(this, 'initialize'); + var name = this.get_name(); + if (name) this._element[name] = this; + } + function Sys$UI$Behavior$dispose() { + Sys.UI.Behavior.callBaseMethod(this, 'dispose'); + var e = this._element; + if (e) { + var name = this.get_name(); + if (name) { + e[name] = null; + } + var behaviors = e._behaviors; + Array.remove(behaviors, this); + if (behaviors.length === 0) { + e._behaviors = null; + } + delete this._element; + } + } +Sys.UI.Behavior.prototype = { + _name: null, + get_element: Sys$UI$Behavior$get_element, + get_id: Sys$UI$Behavior$get_id, + get_name: Sys$UI$Behavior$get_name, + set_name: Sys$UI$Behavior$set_name, + initialize: Sys$UI$Behavior$initialize, + dispose: Sys$UI$Behavior$dispose +} +Sys.UI.Behavior.registerClass('Sys.UI.Behavior', Sys.Component); +Sys.UI.Behavior.getBehaviorByName = function Sys$UI$Behavior$getBehaviorByName(element, name) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "name", type: String} + ]); + if (e) throw e; + var b = element[name]; + return (b && Sys.UI.Behavior.isInstanceOfType(b)) ? b : null; +} +Sys.UI.Behavior.getBehaviors = function Sys$UI$Behavior$getBehaviors(element) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + if (!element._behaviors) return []; + return Array.clone(element._behaviors); +} +Sys.UI.Behavior.getBehaviorsByType = function Sys$UI$Behavior$getBehaviorsByType(element, type) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true}, + {name: "type", type: Type} + ]); + if (e) throw e; + var behaviors = element._behaviors; + var results = []; + if (behaviors) { + for (var i = 0, l = behaviors.length; i < l; i++) { + if (type.isInstanceOfType(behaviors[i])) { + results[results.length] = behaviors[i]; + } + } + } + return results; +} + +Sys.UI.VisibilityMode = function Sys$UI$VisibilityMode() { + /// + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); +} +Sys.UI.VisibilityMode.prototype = { + hide: 0, + collapse: 1 +} +Sys.UI.VisibilityMode.registerEnum("Sys.UI.VisibilityMode"); + +Sys.UI.Control = function Sys$UI$Control(element) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "element", domElement: true} + ]); + if (e) throw e; + if (typeof(element.control) !== 'undefined') throw Error.invalidOperation(Sys.Res.controlAlreadyDefined); + Sys.UI.Control.initializeBase(this); + this._element = element; + element.control = this; + var role = this.get_role(); + if (role) { + element.setAttribute("role", role); + } +} + function Sys$UI$Control$get_element() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._element; + } + function Sys$UI$Control$get_id() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._element) return ''; + return this._element.id; + } + function Sys$UI$Control$set_id(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + throw Error.invalidOperation(Sys.Res.cantSetId); + } + function Sys$UI$Control$get_parent() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this._parent) return this._parent; + if (!this._element) return null; + + var parentElement = this._element.parentNode; + while (parentElement) { + if (parentElement.control) { + return parentElement.control; + } + parentElement = parentElement.parentNode; + } + return null; + } + function Sys$UI$Control$set_parent(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Sys.UI.Control}]); + if (e) throw e; + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + var parents = [this]; + var current = value; + while (current) { + if (Array.contains(parents, current)) throw Error.invalidOperation(Sys.Res.circularParentChain); + parents[parents.length] = current; + current = current.get_parent(); + } + this._parent = value; + } + function Sys$UI$Control$get_role() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return null; + } + function Sys$UI$Control$get_visibilityMode() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + return Sys.UI.DomElement.getVisibilityMode(this._element); + } + function Sys$UI$Control$set_visibilityMode(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Sys.UI.VisibilityMode}]); + if (e) throw e; + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + Sys.UI.DomElement.setVisibilityMode(this._element, value); + } + function Sys$UI$Control$get_visible() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + return Sys.UI.DomElement.getVisible(this._element); + } + function Sys$UI$Control$set_visible(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]); + if (e) throw e; + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + Sys.UI.DomElement.setVisible(this._element, value) + } + function Sys$UI$Control$addCssClass(className) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "className", type: String} + ]); + if (e) throw e; + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + Sys.UI.DomElement.addCssClass(this._element, className); + } + function Sys$UI$Control$dispose() { + Sys.UI.Control.callBaseMethod(this, 'dispose'); + if (this._element) { + this._element.control = null; + delete this._element; + } + if (this._parent) delete this._parent; + } + function Sys$UI$Control$onBubbleEvent(source, args) { + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "source"}, + {name: "args", type: Sys.EventArgs} + ]); + if (e) throw e; + return false; + } + function Sys$UI$Control$raiseBubbleEvent(source, args) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "source"}, + {name: "args", type: Sys.EventArgs} + ]); + if (e) throw e; + this._raiseBubbleEvent(source, args); + } + function Sys$UI$Control$_raiseBubbleEvent(source, args) { + var currentTarget = this.get_parent(); + while (currentTarget) { + if (currentTarget.onBubbleEvent(source, args)) { + return; + } + currentTarget = currentTarget.get_parent(); + } + } + function Sys$UI$Control$removeCssClass(className) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "className", type: String} + ]); + if (e) throw e; + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + Sys.UI.DomElement.removeCssClass(this._element, className); + } + function Sys$UI$Control$toggleCssClass(className) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "className", type: String} + ]); + if (e) throw e; + if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); + Sys.UI.DomElement.toggleCssClass(this._element, className); + } +Sys.UI.Control.prototype = { + _parent: null, + _visibilityMode: Sys.UI.VisibilityMode.hide, + get_element: Sys$UI$Control$get_element, + get_id: Sys$UI$Control$get_id, + set_id: Sys$UI$Control$set_id, + get_parent: Sys$UI$Control$get_parent, + set_parent: Sys$UI$Control$set_parent, + get_role: Sys$UI$Control$get_role, + get_visibilityMode: Sys$UI$Control$get_visibilityMode, + set_visibilityMode: Sys$UI$Control$set_visibilityMode, + get_visible: Sys$UI$Control$get_visible, + set_visible: Sys$UI$Control$set_visible, + addCssClass: Sys$UI$Control$addCssClass, + dispose: Sys$UI$Control$dispose, + onBubbleEvent: Sys$UI$Control$onBubbleEvent, + raiseBubbleEvent: Sys$UI$Control$raiseBubbleEvent, + _raiseBubbleEvent: Sys$UI$Control$_raiseBubbleEvent, + removeCssClass: Sys$UI$Control$removeCssClass, + toggleCssClass: Sys$UI$Control$toggleCssClass +} +Sys.UI.Control.registerClass('Sys.UI.Control', Sys.Component); +Sys.HistoryEventArgs = function Sys$HistoryEventArgs(state) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "state", type: Object} + ]); + if (e) throw e; + Sys.HistoryEventArgs.initializeBase(this); + this._state = state; +} + function Sys$HistoryEventArgs$get_state() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._state; + } +Sys.HistoryEventArgs.prototype = { + get_state: Sys$HistoryEventArgs$get_state +} +Sys.HistoryEventArgs.registerClass('Sys.HistoryEventArgs', Sys.EventArgs); +Sys.Application._appLoadHandler = null; +Sys.Application._beginRequestHandler = null; +Sys.Application._clientId = null; +Sys.Application._currentEntry = ''; +Sys.Application._endRequestHandler = null; +Sys.Application._history = null; +Sys.Application._enableHistory = false; +Sys.Application._historyEnabledInScriptManager = false; +Sys.Application._historyFrame = null; +Sys.Application._historyInitialized = false; +Sys.Application._historyPointIsNew = false; +Sys.Application._ignoreTimer = false; +Sys.Application._initialState = null; +Sys.Application._state = {}; +Sys.Application._timerCookie = 0; +Sys.Application._timerHandler = null; +Sys.Application._uniqueId = null; +Sys._Application.prototype.get_stateString = function Sys$_Application$get_stateString() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + var hash = null; + + if (Sys.Browser.agent === Sys.Browser.Firefox) { + var href = window.location.href; + var hashIndex = href.indexOf('#'); + if (hashIndex !== -1) { + hash = href.substring(hashIndex + 1); + } + else { + hash = ""; + } + return hash; + } + else { + hash = window.location.hash; + } + + if ((hash.length > 0) && (hash.charAt(0) === '#')) { + hash = hash.substring(1); + } + return hash; +}; +Sys._Application.prototype.get_enableHistory = function Sys$_Application$get_enableHistory() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._enableHistory; +}; +Sys._Application.prototype.set_enableHistory = function Sys$_Application$set_enableHistory(value) { + if (this._initialized && !this._initializing) { + throw Error.invalidOperation(Sys.Res.historyCannotEnableHistory); + } + else if (this._historyEnabledInScriptManager && !value) { + throw Error.invalidOperation(Sys.Res.invalidHistorySettingCombination); + } + this._enableHistory = value; +}; +Sys._Application.prototype.add_navigate = function Sys$_Application$add_navigate(handler) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "handler", type: Function} + ]); + if (e) throw e; + this.get_events().addHandler("navigate", handler); +}; +Sys._Application.prototype.remove_navigate = function Sys$_Application$remove_navigate(handler) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "handler", type: Function} + ]); + if (e) throw e; + this.get_events().removeHandler("navigate", handler); +}; +Sys._Application.prototype.addHistoryPoint = function Sys$_Application$addHistoryPoint(state, title) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "state", type: Object}, + {name: "title", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + if (!this._enableHistory) throw Error.invalidOperation(Sys.Res.historyCannotAddHistoryPointWithHistoryDisabled); + for (var n in state) { + var v = state[n]; + var t = typeof(v); + if ((v !== null) && ((t === 'object') || (t === 'function') || (t === 'undefined'))) { + throw Error.argument('state', Sys.Res.stateMustBeStringDictionary); + } + } + this._ensureHistory(); + var initialState = this._state; + for (var key in state) { + var value = state[key]; + if (value === null) { + if (typeof(initialState[key]) !== 'undefined') { + delete initialState[key]; + } + } + else { + initialState[key] = value; + } + } + var entry = this._serializeState(initialState); + this._historyPointIsNew = true; + this._setState(entry, title); + this._raiseNavigate(); +}; +Sys._Application.prototype.setServerId = function Sys$_Application$setServerId(clientId, uniqueId) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "clientId", type: String}, + {name: "uniqueId", type: String} + ]); + if (e) throw e; + this._clientId = clientId; + this._uniqueId = uniqueId; +}; +Sys._Application.prototype.setServerState = function Sys$_Application$setServerState(value) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "value", type: String} + ]); + if (e) throw e; + this._ensureHistory(); + this._state.__s = value; + this._updateHiddenField(value); +}; +Sys._Application.prototype._deserializeState = function Sys$_Application$_deserializeState(entry) { + var result = {}; + entry = entry || ''; + var serverSeparator = entry.indexOf('&&'); + if ((serverSeparator !== -1) && (serverSeparator + 2 < entry.length)) { + result.__s = entry.substr(serverSeparator + 2); + entry = entry.substr(0, serverSeparator); + } + var tokens = entry.split('&'); + for (var i = 0, l = tokens.length; i < l; i++) { + var token = tokens[i]; + var equal = token.indexOf('='); + if ((equal !== -1) && (equal + 1 < token.length)) { + var name = token.substr(0, equal); + var value = token.substr(equal + 1); + result[name] = decodeURIComponent(value); + } + } + return result; +}; +Sys._Application.prototype._enableHistoryInScriptManager = function Sys$_Application$_enableHistoryInScriptManager() { + this._enableHistory = true; + this._historyEnabledInScriptManager = true; +}; +Sys._Application.prototype._ensureHistory = function Sys$_Application$_ensureHistory() { + if (!this._historyInitialized && this._enableHistory) { + if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && (Sys.Browser.documentMode < 8)) { + this._historyFrame = document.getElementById('__historyFrame'); + if (!this._historyFrame) throw Error.invalidOperation(Sys.Res.historyMissingFrame); + this._ignoreIFrame = true; + } + this._timerHandler = Function.createDelegate(this, this._onIdle); + this._timerCookie = window.setTimeout(this._timerHandler, 100); + + try { + this._initialState = this._deserializeState(this.get_stateString()); + } catch(e) {} + + this._historyInitialized = true; + } +}; +Sys._Application.prototype._navigate = function Sys$_Application$_navigate(entry) { + this._ensureHistory(); + var state = this._deserializeState(entry); + + if (this._uniqueId) { + var oldServerEntry = this._state.__s || ''; + var newServerEntry = state.__s || ''; + if (newServerEntry !== oldServerEntry) { + this._updateHiddenField(newServerEntry); + __doPostBack(this._uniqueId, newServerEntry); + this._state = state; + return; + } + } + this._setState(entry); + this._state = state; + this._raiseNavigate(); +}; +Sys._Application.prototype._onIdle = function Sys$_Application$_onIdle() { + delete this._timerCookie; + + var entry = this.get_stateString(); + if (entry !== this._currentEntry) { + if (!this._ignoreTimer) { + this._historyPointIsNew = false; + this._navigate(entry); + } + } + else { + this._ignoreTimer = false; + } + this._timerCookie = window.setTimeout(this._timerHandler, 100); +}; +Sys._Application.prototype._onIFrameLoad = function Sys$_Application$_onIFrameLoad(entry) { + this._ensureHistory(); + if (!this._ignoreIFrame) { + this._historyPointIsNew = false; + this._navigate(entry); + } + this._ignoreIFrame = false; +}; +Sys._Application.prototype._onPageRequestManagerBeginRequest = function Sys$_Application$_onPageRequestManagerBeginRequest(sender, args) { + this._ignoreTimer = true; +}; +Sys._Application.prototype._onPageRequestManagerEndRequest = function Sys$_Application$_onPageRequestManagerEndRequest(sender, args) { + var dataItem = args.get_dataItems()[this._clientId]; + var eventTarget = document.getElementById("__EVENTTARGET"); + if (eventTarget && eventTarget.value === this._uniqueId) { + eventTarget.value = ''; + } + if (typeof(dataItem) !== 'undefined') { + this.setServerState(dataItem); + this._historyPointIsNew = true; + } + else { + this._ignoreTimer = false; + } + var entry = this._serializeState(this._state); + if (entry !== this._currentEntry) { + this._ignoreTimer = true; + this._setState(entry); + this._raiseNavigate(); + } +}; +Sys._Application.prototype._raiseNavigate = function Sys$_Application$_raiseNavigate() { + var h = this.get_events().getHandler("navigate"); + var stateClone = {}; + for (var key in this._state) { + if (key !== '__s') { + stateClone[key] = this._state[key]; + } + } + var args = new Sys.HistoryEventArgs(stateClone); + if (h) { + h(this, args); + } + var err; + try { + if ((Sys.Browser.agent === Sys.Browser.Firefox) && window.location.hash && + (!window.frameElement || window.top.location.hash)) { + window.history.go(0); + } + } + catch(err) { + } +}; +Sys._Application.prototype._serializeState = function Sys$_Application$_serializeState(state) { + var serialized = []; + for (var key in state) { + var value = state[key]; + if (key === '__s') { + var serverState = value; + } + else { + if (key.indexOf('=') !== -1) throw Error.argument('state', Sys.Res.stateFieldNameInvalid); + serialized[serialized.length] = key + '=' + encodeURIComponent(value); + } + } + return serialized.join('&') + (serverState ? '&&' + serverState : ''); +}; +Sys._Application.prototype._setState = function Sys$_Application$_setState(entry, title) { + if (this._enableHistory) { + entry = entry || ''; + if (entry !== this._currentEntry) { + if (window.theForm) { + var action = window.theForm.action; + var hashIndex = action.indexOf('#'); + window.theForm.action = ((hashIndex !== -1) ? action.substring(0, hashIndex) : action) + '#' + entry; + } + + if (this._historyFrame && this._historyPointIsNew) { + this._ignoreIFrame = true; + var frameDoc = this._historyFrame.contentWindow.document; + frameDoc.open("javascript:''"); + frameDoc.write("" + (title || document.title) + + "parent.Sys.Application._onIFrameLoad(" + + Sys.Serialization.JavaScriptSerializer.serialize(entry) + + ");"); + frameDoc.close(); + } + this._ignoreTimer = false; + this._currentEntry = entry; + if (this._historyFrame || this._historyPointIsNew) { + var currentHash = this.get_stateString(); + if (entry !== currentHash) { + var loc = document.location; + if (loc.href.length - loc.hash.length + entry.length > 1024) { + throw Error.invalidOperation(Sys.Res.urlMustBeLessThan1024chars); + } + window.location.hash = entry; + this._currentEntry = this.get_stateString(); + if ((typeof(title) !== 'undefined') && (title !== null)) { + document.title = title; + } + } + } + this._historyPointIsNew = false; + } + } +}; +Sys._Application.prototype._updateHiddenField = function Sys$_Application$_updateHiddenField(value) { + if (this._clientId) { + var serverStateField = document.getElementById(this._clientId); + if (serverStateField) { + serverStateField.value = value; + } + } +}; + +if (!window.XMLHttpRequest) { + window.XMLHttpRequest = function window$XMLHttpRequest() { + var progIDs = [ 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP' ]; + for (var i = 0, l = progIDs.length; i < l; i++) { + try { + return new ActiveXObject(progIDs[i]); + } + catch (ex) { + } + } + return null; + } +} +Type.registerNamespace('Sys.Net'); + +Sys.Net.WebRequestExecutor = function Sys$Net$WebRequestExecutor() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._webRequest = null; + this._resultObject = null; +} + function Sys$Net$WebRequestExecutor$get_webRequest() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._webRequest; + } + function Sys$Net$WebRequestExecutor$_set_webRequest(value) { + if (this.get_started()) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'set_webRequest')); + } + this._webRequest = value; + } + function Sys$Net$WebRequestExecutor$get_started() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_responseAvailable() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_timedOut() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_aborted() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_responseData() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_statusCode() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_statusText() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_xml() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$get_object() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._resultObject) { + this._resultObject = Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData()); + } + return this._resultObject; + } + function Sys$Net$WebRequestExecutor$executeRequest() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$abort() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$getResponseHeader(header) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "header", type: String} + ]); + if (e) throw e; + throw Error.notImplemented(); + } + function Sys$Net$WebRequestExecutor$getAllResponseHeaders() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + throw Error.notImplemented(); + } +Sys.Net.WebRequestExecutor.prototype = { + get_webRequest: Sys$Net$WebRequestExecutor$get_webRequest, + _set_webRequest: Sys$Net$WebRequestExecutor$_set_webRequest, + get_started: Sys$Net$WebRequestExecutor$get_started, + get_responseAvailable: Sys$Net$WebRequestExecutor$get_responseAvailable, + get_timedOut: Sys$Net$WebRequestExecutor$get_timedOut, + get_aborted: Sys$Net$WebRequestExecutor$get_aborted, + get_responseData: Sys$Net$WebRequestExecutor$get_responseData, + get_statusCode: Sys$Net$WebRequestExecutor$get_statusCode, + get_statusText: Sys$Net$WebRequestExecutor$get_statusText, + get_xml: Sys$Net$WebRequestExecutor$get_xml, + get_object: Sys$Net$WebRequestExecutor$get_object, + executeRequest: Sys$Net$WebRequestExecutor$executeRequest, + abort: Sys$Net$WebRequestExecutor$abort, + getResponseHeader: Sys$Net$WebRequestExecutor$getResponseHeader, + getAllResponseHeaders: Sys$Net$WebRequestExecutor$getAllResponseHeaders +} +Sys.Net.WebRequestExecutor.registerClass('Sys.Net.WebRequestExecutor'); + +Sys.Net.XMLDOM = function Sys$Net$XMLDOM(markup) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "markup", type: String} + ]); + if (e) throw e; + if (!window.DOMParser) { + var progIDs = [ 'Msxml2.DOMDocument.3.0', 'Msxml2.DOMDocument' ]; + for (var i = 0, l = progIDs.length; i < l; i++) { + try { + var xmlDOM = new ActiveXObject(progIDs[i]); + xmlDOM.async = false; + xmlDOM.loadXML(markup); + xmlDOM.setProperty('SelectionLanguage', 'XPath'); + return xmlDOM; + } + catch (ex) { + } + } + } + else { + try { + var domParser = new window.DOMParser(); + return domParser.parseFromString(markup, 'text/xml'); + } + catch (ex) { + } + } + return null; +} +Sys.Net.XMLHttpExecutor = function Sys$Net$XMLHttpExecutor() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + Sys.Net.XMLHttpExecutor.initializeBase(this); + var _this = this; + this._xmlHttpRequest = null; + this._webRequest = null; + this._responseAvailable = false; + this._timedOut = false; + this._timer = null; + this._aborted = false; + this._started = false; + this._onReadyStateChange = (function () { + + if (_this._xmlHttpRequest.readyState === 4 ) { + try { + if (typeof(_this._xmlHttpRequest.status) === "undefined") { + return; + } + } + catch(ex) { + return; + } + + _this._clearTimer(); + _this._responseAvailable = true; + _this._webRequest.completed(Sys.EventArgs.Empty); + if (_this._xmlHttpRequest != null) { + _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; + _this._xmlHttpRequest = null; + } + } + }); + this._clearTimer = (function() { + if (_this._timer != null) { + window.clearTimeout(_this._timer); + _this._timer = null; + } + }); + this._onTimeout = (function() { + if (!_this._responseAvailable) { + _this._clearTimer(); + _this._timedOut = true; + _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; + _this._xmlHttpRequest.abort(); + _this._webRequest.completed(Sys.EventArgs.Empty); + _this._xmlHttpRequest = null; + } + }); +} + function Sys$Net$XMLHttpExecutor$get_timedOut() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._timedOut; + } + function Sys$Net$XMLHttpExecutor$get_started() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._started; + } + function Sys$Net$XMLHttpExecutor$get_responseAvailable() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._responseAvailable; + } + function Sys$Net$XMLHttpExecutor$get_aborted() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._aborted; + } + function Sys$Net$XMLHttpExecutor$executeRequest() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._webRequest = this.get_webRequest(); + if (this._started) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'executeRequest')); + } + if (this._webRequest === null) { + throw Error.invalidOperation(Sys.Res.nullWebRequest); + } + var body = this._webRequest.get_body(); + var headers = this._webRequest.get_headers(); + this._xmlHttpRequest = new XMLHttpRequest(); + this._xmlHttpRequest.onreadystatechange = this._onReadyStateChange; + var verb = this._webRequest.get_httpVerb(); + this._xmlHttpRequest.open(verb, this._webRequest.getResolvedUrl(), true ); + this._xmlHttpRequest.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + if (headers) { + for (var header in headers) { + var val = headers[header]; + if (typeof(val) !== "function") + this._xmlHttpRequest.setRequestHeader(header, val); + } + } + if (verb.toLowerCase() === "post") { + if ((headers === null) || !headers['Content-Type']) { + this._xmlHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8'); + } + if (!body) { + body = ""; + } + } + var timeout = this._webRequest.get_timeout(); + if (timeout > 0) { + this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), timeout); + } + this._xmlHttpRequest.send(body); + this._started = true; + } + function Sys$Net$XMLHttpExecutor$getResponseHeader(header) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "header", type: String} + ]); + if (e) throw e; + if (!this._responseAvailable) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getResponseHeader')); + } + if (!this._xmlHttpRequest) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getResponseHeader')); + } + var result; + try { + result = this._xmlHttpRequest.getResponseHeader(header); + } catch (e) { + } + if (!result) result = ""; + return result; + } + function Sys$Net$XMLHttpExecutor$getAllResponseHeaders() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._responseAvailable) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getAllResponseHeaders')); + } + if (!this._xmlHttpRequest) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getAllResponseHeaders')); + } + return this._xmlHttpRequest.getAllResponseHeaders(); + } + function Sys$Net$XMLHttpExecutor$get_responseData() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._responseAvailable) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_responseData')); + } + if (!this._xmlHttpRequest) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_responseData')); + } + return this._xmlHttpRequest.responseText; + } + function Sys$Net$XMLHttpExecutor$get_statusCode() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._responseAvailable) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusCode')); + } + if (!this._xmlHttpRequest) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusCode')); + } + var result = 0; + try { + result = this._xmlHttpRequest.status; + } + catch(ex) { + } + return result; + } + function Sys$Net$XMLHttpExecutor$get_statusText() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._responseAvailable) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusText')); + } + if (!this._xmlHttpRequest) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusText')); + } + return this._xmlHttpRequest.statusText; + } + function Sys$Net$XMLHttpExecutor$get_xml() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._responseAvailable) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_xml')); + } + if (!this._xmlHttpRequest) { + throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_xml')); + } + var xml = this._xmlHttpRequest.responseXML; + if (!xml || !xml.documentElement) { + xml = Sys.Net.XMLDOM(this._xmlHttpRequest.responseText); + if (!xml || !xml.documentElement) + return null; + } + else if (navigator.userAgent.indexOf('MSIE') !== -1) { + xml.setProperty('SelectionLanguage', 'XPath'); + } + if (xml.documentElement.namespaceURI === "http://www.mozilla.org/newlayout/xml/parsererror.xml" && + xml.documentElement.tagName === "parsererror") { + return null; + } + + if (xml.documentElement.firstChild && xml.documentElement.firstChild.tagName === "parsererror") { + return null; + } + + return xml; + } + function Sys$Net$XMLHttpExecutor$abort() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (!this._started) { + throw Error.invalidOperation(Sys.Res.cannotAbortBeforeStart); + } + if (this._aborted || this._responseAvailable || this._timedOut) + return; + this._aborted = true; + this._clearTimer(); + if (this._xmlHttpRequest && !this._responseAvailable) { + this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; + this._xmlHttpRequest.abort(); + + this._xmlHttpRequest = null; + this._webRequest.completed(Sys.EventArgs.Empty); + } + } +Sys.Net.XMLHttpExecutor.prototype = { + get_timedOut: Sys$Net$XMLHttpExecutor$get_timedOut, + get_started: Sys$Net$XMLHttpExecutor$get_started, + get_responseAvailable: Sys$Net$XMLHttpExecutor$get_responseAvailable, + get_aborted: Sys$Net$XMLHttpExecutor$get_aborted, + executeRequest: Sys$Net$XMLHttpExecutor$executeRequest, + getResponseHeader: Sys$Net$XMLHttpExecutor$getResponseHeader, + getAllResponseHeaders: Sys$Net$XMLHttpExecutor$getAllResponseHeaders, + get_responseData: Sys$Net$XMLHttpExecutor$get_responseData, + get_statusCode: Sys$Net$XMLHttpExecutor$get_statusCode, + get_statusText: Sys$Net$XMLHttpExecutor$get_statusText, + get_xml: Sys$Net$XMLHttpExecutor$get_xml, + abort: Sys$Net$XMLHttpExecutor$abort +} +Sys.Net.XMLHttpExecutor.registerClass('Sys.Net.XMLHttpExecutor', Sys.Net.WebRequestExecutor); + +Sys.Net._WebRequestManager = function Sys$Net$_WebRequestManager() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._defaultTimeout = 0; + this._defaultExecutorType = "Sys.Net.XMLHttpExecutor"; +} + function Sys$Net$_WebRequestManager$add_invokingRequest(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this._get_eventHandlerList().addHandler("invokingRequest", handler); + } + function Sys$Net$_WebRequestManager$remove_invokingRequest(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this._get_eventHandlerList().removeHandler("invokingRequest", handler); + } + function Sys$Net$_WebRequestManager$add_completedRequest(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this._get_eventHandlerList().addHandler("completedRequest", handler); + } + function Sys$Net$_WebRequestManager$remove_completedRequest(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this._get_eventHandlerList().removeHandler("completedRequest", handler); + } + function Sys$Net$_WebRequestManager$_get_eventHandlerList() { + if (!this._events) { + this._events = new Sys.EventHandlerList(); + } + return this._events; + } + function Sys$Net$_WebRequestManager$get_defaultTimeout() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._defaultTimeout; + } + function Sys$Net$_WebRequestManager$set_defaultTimeout(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Number}]); + if (e) throw e; + if (value < 0) { + throw Error.argumentOutOfRange("value", value, Sys.Res.invalidTimeout); + } + this._defaultTimeout = value; + } + function Sys$Net$_WebRequestManager$get_defaultExecutorType() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._defaultExecutorType; + } + function Sys$Net$_WebRequestManager$set_defaultExecutorType(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + this._defaultExecutorType = value; + } + function Sys$Net$_WebRequestManager$executeRequest(webRequest) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "webRequest", type: Sys.Net.WebRequest} + ]); + if (e) throw e; + var executor = webRequest.get_executor(); + if (!executor) { + var failed = false; + try { + var executorType = eval(this._defaultExecutorType); + executor = new executorType(); + } catch (e) { + failed = true; + } + if (failed || !Sys.Net.WebRequestExecutor.isInstanceOfType(executor) || !executor) { + throw Error.argument("defaultExecutorType", String.format(Sys.Res.invalidExecutorType, this._defaultExecutorType)); + } + webRequest.set_executor(executor); + } + if (executor.get_aborted()) { + return; + } + var evArgs = new Sys.Net.NetworkRequestEventArgs(webRequest); + var handler = this._get_eventHandlerList().getHandler("invokingRequest"); + if (handler) { + handler(this, evArgs); + } + if (!evArgs.get_cancel()) { + executor.executeRequest(); + } + } +Sys.Net._WebRequestManager.prototype = { + add_invokingRequest: Sys$Net$_WebRequestManager$add_invokingRequest, + remove_invokingRequest: Sys$Net$_WebRequestManager$remove_invokingRequest, + add_completedRequest: Sys$Net$_WebRequestManager$add_completedRequest, + remove_completedRequest: Sys$Net$_WebRequestManager$remove_completedRequest, + _get_eventHandlerList: Sys$Net$_WebRequestManager$_get_eventHandlerList, + get_defaultTimeout: Sys$Net$_WebRequestManager$get_defaultTimeout, + set_defaultTimeout: Sys$Net$_WebRequestManager$set_defaultTimeout, + get_defaultExecutorType: Sys$Net$_WebRequestManager$get_defaultExecutorType, + set_defaultExecutorType: Sys$Net$_WebRequestManager$set_defaultExecutorType, + executeRequest: Sys$Net$_WebRequestManager$executeRequest +} +Sys.Net._WebRequestManager.registerClass('Sys.Net._WebRequestManager'); +Sys.Net.WebRequestManager = new Sys.Net._WebRequestManager(); + +Sys.Net.NetworkRequestEventArgs = function Sys$Net$NetworkRequestEventArgs(webRequest) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "webRequest", type: Sys.Net.WebRequest} + ]); + if (e) throw e; + Sys.Net.NetworkRequestEventArgs.initializeBase(this); + this._webRequest = webRequest; +} + function Sys$Net$NetworkRequestEventArgs$get_webRequest() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._webRequest; + } +Sys.Net.NetworkRequestEventArgs.prototype = { + get_webRequest: Sys$Net$NetworkRequestEventArgs$get_webRequest +} +Sys.Net.NetworkRequestEventArgs.registerClass('Sys.Net.NetworkRequestEventArgs', Sys.CancelEventArgs); + +Sys.Net.WebRequest = function Sys$Net$WebRequest() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._url = ""; + this._headers = { }; + this._body = null; + this._userContext = null; + this._httpVerb = null; + this._executor = null; + this._invokeCalled = false; + this._timeout = 0; +} + function Sys$Net$WebRequest$add_completed(handler) { + /// + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this._get_eventHandlerList().addHandler("completed", handler); + } + function Sys$Net$WebRequest$remove_completed(handler) { + var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); + if (e) throw e; + this._get_eventHandlerList().removeHandler("completed", handler); + } + function Sys$Net$WebRequest$completed(eventArgs) { + /// + /// + var e = Function._validateParams(arguments, [ + {name: "eventArgs", type: Sys.EventArgs} + ]); + if (e) throw e; + var handler = Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest"); + if (handler) { + handler(this._executor, eventArgs); + } + handler = this._get_eventHandlerList().getHandler("completed"); + if (handler) { + handler(this._executor, eventArgs); + } + } + function Sys$Net$WebRequest$_get_eventHandlerList() { + if (!this._events) { + this._events = new Sys.EventHandlerList(); + } + return this._events; + } + function Sys$Net$WebRequest$get_url() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._url; + } + function Sys$Net$WebRequest$set_url(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + this._url = value; + } + function Sys$Net$WebRequest$get_headers() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._headers; + } + function Sys$Net$WebRequest$get_httpVerb() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this._httpVerb === null) { + if (this._body === null) { + return "GET"; + } + return "POST"; + } + return this._httpVerb; + } + function Sys$Net$WebRequest$set_httpVerb(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + if (value.length === 0) { + throw Error.argument('value', Sys.Res.invalidHttpVerb); + } + this._httpVerb = value; + } + function Sys$Net$WebRequest$get_body() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._body; + } + function Sys$Net$WebRequest$set_body(value) { + var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); + if (e) throw e; + this._body = value; + } + function Sys$Net$WebRequest$get_userContext() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._userContext; + } + function Sys$Net$WebRequest$set_userContext(value) { + var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); + if (e) throw e; + this._userContext = value; + } + function Sys$Net$WebRequest$get_executor() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._executor; + } + function Sys$Net$WebRequest$set_executor(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Sys.Net.WebRequestExecutor}]); + if (e) throw e; + if (this._executor !== null && this._executor.get_started()) { + throw Error.invalidOperation(Sys.Res.setExecutorAfterActive); + } + this._executor = value; + this._executor._set_webRequest(this); + } + function Sys$Net$WebRequest$get_timeout() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this._timeout === 0) { + return Sys.Net.WebRequestManager.get_defaultTimeout(); + } + return this._timeout; + } + function Sys$Net$WebRequest$set_timeout(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Number}]); + if (e) throw e; + if (value < 0) { + throw Error.argumentOutOfRange("value", value, Sys.Res.invalidTimeout); + } + this._timeout = value; + } + function Sys$Net$WebRequest$getResolvedUrl() { + /// + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return Sys.Net.WebRequest._resolveUrl(this._url); + } + function Sys$Net$WebRequest$invoke() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + if (this._invokeCalled) { + throw Error.invalidOperation(Sys.Res.invokeCalledTwice); + } + Sys.Net.WebRequestManager.executeRequest(this); + this._invokeCalled = true; + } +Sys.Net.WebRequest.prototype = { + add_completed: Sys$Net$WebRequest$add_completed, + remove_completed: Sys$Net$WebRequest$remove_completed, + completed: Sys$Net$WebRequest$completed, + _get_eventHandlerList: Sys$Net$WebRequest$_get_eventHandlerList, + get_url: Sys$Net$WebRequest$get_url, + set_url: Sys$Net$WebRequest$set_url, + get_headers: Sys$Net$WebRequest$get_headers, + get_httpVerb: Sys$Net$WebRequest$get_httpVerb, + set_httpVerb: Sys$Net$WebRequest$set_httpVerb, + get_body: Sys$Net$WebRequest$get_body, + set_body: Sys$Net$WebRequest$set_body, + get_userContext: Sys$Net$WebRequest$get_userContext, + set_userContext: Sys$Net$WebRequest$set_userContext, + get_executor: Sys$Net$WebRequest$get_executor, + set_executor: Sys$Net$WebRequest$set_executor, + get_timeout: Sys$Net$WebRequest$get_timeout, + set_timeout: Sys$Net$WebRequest$set_timeout, + getResolvedUrl: Sys$Net$WebRequest$getResolvedUrl, + invoke: Sys$Net$WebRequest$invoke +} +Sys.Net.WebRequest._resolveUrl = function Sys$Net$WebRequest$_resolveUrl(url, baseUrl) { + if (url && url.indexOf('://') !== -1) { + return url; + } + if (!baseUrl || baseUrl.length === 0) { + var baseElement = document.getElementsByTagName('base')[0]; + if (baseElement && baseElement.href && baseElement.href.length > 0) { + baseUrl = baseElement.href; + } + else { + baseUrl = document.URL; + } + } + var qsStart = baseUrl.indexOf('?'); + if (qsStart !== -1) { + baseUrl = baseUrl.substr(0, qsStart); + } + qsStart = baseUrl.indexOf('#'); + if (qsStart !== -1) { + baseUrl = baseUrl.substr(0, qsStart); + } + baseUrl = baseUrl.substr(0, baseUrl.lastIndexOf('/') + 1); + if (!url || url.length === 0) { + return baseUrl; + } + if (url.charAt(0) === '/') { + var slashslash = baseUrl.indexOf('://'); + if (slashslash === -1) { + throw Error.argument("baseUrl", Sys.Res.badBaseUrl1); + } + var nextSlash = baseUrl.indexOf('/', slashslash + 3); + if (nextSlash === -1) { + throw Error.argument("baseUrl", Sys.Res.badBaseUrl2); + } + return baseUrl.substr(0, nextSlash) + url; + } + else { + var lastSlash = baseUrl.lastIndexOf('/'); + if (lastSlash === -1) { + throw Error.argument("baseUrl", Sys.Res.badBaseUrl3); + } + return baseUrl.substr(0, lastSlash+1) + url; + } +} +Sys.Net.WebRequest._createQueryString = function Sys$Net$WebRequest$_createQueryString(queryString, encodeMethod, addParams) { + encodeMethod = encodeMethod || encodeURIComponent; + var i = 0, obj, val, arg, sb = new Sys.StringBuilder(); + if (queryString) { + for (arg in queryString) { + obj = queryString[arg]; + if (typeof(obj) === "function") continue; + val = Sys.Serialization.JavaScriptSerializer.serialize(obj); + if (i++) { + sb.append('&'); + } + sb.append(arg); + sb.append('='); + sb.append(encodeMethod(val)); + } + } + if (addParams) { + if (i) { + sb.append('&'); + } + sb.append(addParams); + } + return sb.toString(); +} +Sys.Net.WebRequest._createUrl = function Sys$Net$WebRequest$_createUrl(url, queryString, addParams) { + if (!queryString && !addParams) { + return url; + } + var qs = Sys.Net.WebRequest._createQueryString(queryString, null, addParams); + return qs.length + ? url + ((url && url.indexOf('?') >= 0) ? "&" : "?") + qs + : url; +} +Sys.Net.WebRequest.registerClass('Sys.Net.WebRequest'); + +Sys._ScriptLoaderTask = function Sys$_ScriptLoaderTask(scriptElement, completedCallback) { + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "scriptElement", domElement: true}, + {name: "completedCallback", type: Function} + ]); + if (e) throw e; + this._scriptElement = scriptElement; + this._completedCallback = completedCallback; +} + function Sys$_ScriptLoaderTask$get_scriptElement() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._scriptElement; + } + function Sys$_ScriptLoaderTask$dispose() { + if(this._disposed) { + return; + } + this._disposed = true; + this._removeScriptElementHandlers(); + Sys._ScriptLoaderTask._clearScript(this._scriptElement); + this._scriptElement = null; + } + function Sys$_ScriptLoaderTask$execute() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + this._addScriptElementHandlers(); + var headElements = document.getElementsByTagName('head'); + if (headElements.length === 0) { + throw new Error.invalidOperation(Sys.Res.scriptLoadFailedNoHead); + } + else { + headElements[0].appendChild(this._scriptElement); + } + } + function Sys$_ScriptLoaderTask$_addScriptElementHandlers() { + this._scriptLoadDelegate = Function.createDelegate(this, this._scriptLoadHandler); + + if (Sys.Browser.agent !== Sys.Browser.InternetExplorer) { + this._scriptElement.readyState = 'loaded'; + $addHandler(this._scriptElement, 'load', this._scriptLoadDelegate); + } + else { + $addHandler(this._scriptElement, 'readystatechange', this._scriptLoadDelegate); + } + if (this._scriptElement.addEventListener) { + this._scriptErrorDelegate = Function.createDelegate(this, this._scriptErrorHandler); + this._scriptElement.addEventListener('error', this._scriptErrorDelegate, false); + } + } + function Sys$_ScriptLoaderTask$_removeScriptElementHandlers() { + if(this._scriptLoadDelegate) { + var scriptElement = this.get_scriptElement(); + if (Sys.Browser.agent !== Sys.Browser.InternetExplorer) { + $removeHandler(scriptElement, 'load', this._scriptLoadDelegate); + } + else { + $removeHandler(scriptElement, 'readystatechange', this._scriptLoadDelegate); + } + if (this._scriptErrorDelegate) { + this._scriptElement.removeEventListener('error', this._scriptErrorDelegate, false); + this._scriptErrorDelegate = null; + } + this._scriptLoadDelegate = null; + } + } + function Sys$_ScriptLoaderTask$_scriptErrorHandler() { + if(this._disposed) { + return; + } + + this._completedCallback(this.get_scriptElement(), false); + } + function Sys$_ScriptLoaderTask$_scriptLoadHandler() { + if(this._disposed) { + return; + } + var scriptElement = this.get_scriptElement(); + if ((scriptElement.readyState !== 'loaded') && + (scriptElement.readyState !== 'complete')) { + return; + } + + this._completedCallback(scriptElement, true); + } +Sys._ScriptLoaderTask.prototype = { + get_scriptElement: Sys$_ScriptLoaderTask$get_scriptElement, + dispose: Sys$_ScriptLoaderTask$dispose, + execute: Sys$_ScriptLoaderTask$execute, + _addScriptElementHandlers: Sys$_ScriptLoaderTask$_addScriptElementHandlers, + _removeScriptElementHandlers: Sys$_ScriptLoaderTask$_removeScriptElementHandlers, + _scriptErrorHandler: Sys$_ScriptLoaderTask$_scriptErrorHandler, + _scriptLoadHandler: Sys$_ScriptLoaderTask$_scriptLoadHandler +} +Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask", null, Sys.IDisposable); +Sys._ScriptLoaderTask._clearScript = function Sys$_ScriptLoaderTask$_clearScript(scriptElement) { + if (!Sys.Debug.isDebug) { + scriptElement.parentNode.removeChild(scriptElement); + } +} +Type.registerNamespace('Sys.Net'); + +Sys.Net.WebServiceProxy = function Sys$Net$WebServiceProxy() { +} + function Sys$Net$WebServiceProxy$get_timeout() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._timeout || 0; + } + function Sys$Net$WebServiceProxy$set_timeout(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Number}]); + if (e) throw e; + if (value < 0) { throw Error.argumentOutOfRange('value', value, Sys.Res.invalidTimeout); } + this._timeout = value; + } + function Sys$Net$WebServiceProxy$get_defaultUserContext() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return (typeof(this._userContext) === "undefined") ? null : this._userContext; + } + function Sys$Net$WebServiceProxy$set_defaultUserContext(value) { + var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); + if (e) throw e; + this._userContext = value; + } + function Sys$Net$WebServiceProxy$get_defaultSucceededCallback() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._succeeded || null; + } + function Sys$Net$WebServiceProxy$set_defaultSucceededCallback(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); + if (e) throw e; + this._succeeded = value; + } + function Sys$Net$WebServiceProxy$get_defaultFailedCallback() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._failed || null; + } + function Sys$Net$WebServiceProxy$set_defaultFailedCallback(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); + if (e) throw e; + this._failed = value; + } + function Sys$Net$WebServiceProxy$get_enableJsonp() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return !!this._jsonp; + } + function Sys$Net$WebServiceProxy$set_enableJsonp(value) { + var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]); + if (e) throw e; + this._jsonp = value; + } + function Sys$Net$WebServiceProxy$get_path() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._path || null; + } + function Sys$Net$WebServiceProxy$set_path(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + this._path = value; + } + function Sys$Net$WebServiceProxy$get_jsonpCallbackParameter() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._callbackParameter || "callback"; + } + function Sys$Net$WebServiceProxy$set_jsonpCallbackParameter(value) { + var e = Function._validateParams(arguments, [{name: "value", type: String}]); + if (e) throw e; + this._callbackParameter = value; + } + function Sys$Net$WebServiceProxy$_invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "servicePath", type: String}, + {name: "methodName", type: String}, + {name: "useGet", type: Boolean}, + {name: "params"}, + {name: "onSuccess", type: Function, mayBeNull: true, optional: true}, + {name: "onFailure", type: Function, mayBeNull: true, optional: true}, + {name: "userContext", mayBeNull: true, optional: true} + ]); + if (e) throw e; + onSuccess = onSuccess || this.get_defaultSucceededCallback(); + onFailure = onFailure || this.get_defaultFailedCallback(); + if (userContext === null || typeof userContext === 'undefined') userContext = this.get_defaultUserContext(); + return Sys.Net.WebServiceProxy.invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, this.get_timeout(), this.get_enableJsonp(), this.get_jsonpCallbackParameter()); + } +Sys.Net.WebServiceProxy.prototype = { + get_timeout: Sys$Net$WebServiceProxy$get_timeout, + set_timeout: Sys$Net$WebServiceProxy$set_timeout, + get_defaultUserContext: Sys$Net$WebServiceProxy$get_defaultUserContext, + set_defaultUserContext: Sys$Net$WebServiceProxy$set_defaultUserContext, + get_defaultSucceededCallback: Sys$Net$WebServiceProxy$get_defaultSucceededCallback, + set_defaultSucceededCallback: Sys$Net$WebServiceProxy$set_defaultSucceededCallback, + get_defaultFailedCallback: Sys$Net$WebServiceProxy$get_defaultFailedCallback, + set_defaultFailedCallback: Sys$Net$WebServiceProxy$set_defaultFailedCallback, + get_enableJsonp: Sys$Net$WebServiceProxy$get_enableJsonp, + set_enableJsonp: Sys$Net$WebServiceProxy$set_enableJsonp, + get_path: Sys$Net$WebServiceProxy$get_path, + set_path: Sys$Net$WebServiceProxy$set_path, + get_jsonpCallbackParameter: Sys$Net$WebServiceProxy$get_jsonpCallbackParameter, + set_jsonpCallbackParameter: Sys$Net$WebServiceProxy$set_jsonpCallbackParameter, + _invoke: Sys$Net$WebServiceProxy$_invoke +} +Sys.Net.WebServiceProxy.registerClass('Sys.Net.WebServiceProxy'); +Sys.Net.WebServiceProxy.invoke = function Sys$Net$WebServiceProxy$invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, timeout, enableJsonp, jsonpCallbackParameter) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "servicePath", type: String}, + {name: "methodName", type: String, mayBeNull: true, optional: true}, + {name: "useGet", type: Boolean, optional: true}, + {name: "params", mayBeNull: true, optional: true}, + {name: "onSuccess", type: Function, mayBeNull: true, optional: true}, + {name: "onFailure", type: Function, mayBeNull: true, optional: true}, + {name: "userContext", mayBeNull: true, optional: true}, + {name: "timeout", type: Number, optional: true}, + {name: "enableJsonp", type: Boolean, mayBeNull: true, optional: true}, + {name: "jsonpCallbackParameter", type: String, mayBeNull: true, optional: true} + ]); + if (e) throw e; + var schemeHost = (enableJsonp !== false) ? Sys.Net.WebServiceProxy._xdomain.exec(servicePath) : null, + tempCallback, jsonp = schemeHost && (schemeHost.length === 3) && + ((schemeHost[1] !== location.protocol) || (schemeHost[2] !== location.host)); + useGet = jsonp || useGet; + if (jsonp) { + jsonpCallbackParameter = jsonpCallbackParameter || "callback"; + tempCallback = "_jsonp" + Sys._jsonp++; + } + if (!params) params = {}; + var urlParams = params; + if (!useGet || !urlParams) urlParams = {}; + var script, error, timeoutcookie = null, loader, body = null, + url = Sys.Net.WebRequest._createUrl(methodName + ? (servicePath+"/"+encodeURIComponent(methodName)) + : servicePath, urlParams, jsonp ? (jsonpCallbackParameter + "=Sys." + tempCallback) : null); + if (jsonp) { + script = document.createElement("script"); + script.src = url; + loader = new Sys._ScriptLoaderTask(script, function(script, loaded) { + if (!loaded || tempCallback) { + jsonpComplete({ Message: String.format(Sys.Res.webServiceFailedNoMsg, methodName) }, -1); + } + }); + function jsonpComplete(data, statusCode) { + if (timeoutcookie !== null) { + window.clearTimeout(timeoutcookie); + timeoutcookie = null; + } + loader.dispose(); + delete Sys[tempCallback]; + tempCallback = null; + if ((typeof(statusCode) !== "undefined") && (statusCode !== 200)) { + if (onFailure) { + error = new Sys.Net.WebServiceError(false, + data.Message || String.format(Sys.Res.webServiceFailedNoMsg, methodName), + data.StackTrace || null, + data.ExceptionType || null, + data); + error._statusCode = statusCode; + onFailure(error, userContext, methodName); + } + else { + if (data.StackTrace && data.Message) { + error = data.StackTrace + "-- " + data.Message; + } + else { + error = data.StackTrace || data.Message; + } + error = String.format(error ? Sys.Res.webServiceFailed : Sys.Res.webServiceFailedNoMsg, methodName, error); + throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); + } + } + else if (onSuccess) { + onSuccess(data, userContext, methodName); + } + } + Sys[tempCallback] = jsonpComplete; + loader.execute(); + return null; + } + var request = new Sys.Net.WebRequest(); + request.set_url(url); + request.get_headers()['Content-Type'] = 'application/json; charset=utf-8'; + if (!useGet) { + body = Sys.Serialization.JavaScriptSerializer.serialize(params); + if (body === "{}") body = ""; + } + request.set_body(body); + request.add_completed(onComplete); + if (timeout && timeout > 0) request.set_timeout(timeout); + request.invoke(); + + function onComplete(response, eventArgs) { + if (response.get_responseAvailable()) { + var statusCode = response.get_statusCode(); + var result = null; + + try { + var contentType = response.getResponseHeader("Content-Type"); + if (contentType.startsWith("application/json")) { + result = response.get_object(); + } + else if (contentType.startsWith("text/xml")) { + result = response.get_xml(); + } + else { + result = response.get_responseData(); + } + } catch (ex) { + } + var error = response.getResponseHeader("jsonerror"); + var errorObj = (error === "true"); + if (errorObj) { + if (result) { + result = new Sys.Net.WebServiceError(false, result.Message, result.StackTrace, result.ExceptionType, result); + } + } + else if (contentType.startsWith("application/json")) { + result = (!result || (typeof(result.d) === "undefined")) ? result : result.d; + } + if (((statusCode < 200) || (statusCode >= 300)) || errorObj) { + if (onFailure) { + if (!result || !errorObj) { + result = new Sys.Net.WebServiceError(false , String.format(Sys.Res.webServiceFailedNoMsg, methodName)); + } + result._statusCode = statusCode; + onFailure(result, userContext, methodName); + } + else { + if (result && errorObj) { + error = result.get_exceptionType() + "-- " + result.get_message(); + } + else { + error = response.get_responseData(); + } + throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); + } + } + else if (onSuccess) { + onSuccess(result, userContext, methodName); + } + } + else { + var msg; + if (response.get_timedOut()) { + msg = String.format(Sys.Res.webServiceTimedOut, methodName); + } + else { + msg = String.format(Sys.Res.webServiceFailedNoMsg, methodName) + } + if (onFailure) { + onFailure(new Sys.Net.WebServiceError(response.get_timedOut(), msg, "", ""), userContext, methodName); + } + else { + throw Sys.Net.WebServiceProxy._createFailedError(methodName, msg); + } + } + } + return request; +} +Sys.Net.WebServiceProxy._createFailedError = function Sys$Net$WebServiceProxy$_createFailedError(methodName, errorMessage) { + var displayMessage = "Sys.Net.WebServiceFailedException: " + errorMessage; + var e = Error.create(displayMessage, { 'name': 'Sys.Net.WebServiceFailedException', 'methodName': methodName }); + e.popStackFrame(); + return e; +} +Sys.Net.WebServiceProxy._defaultFailedCallback = function Sys$Net$WebServiceProxy$_defaultFailedCallback(err, methodName) { + var error = err.get_exceptionType() + "-- " + err.get_message(); + throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); +} +Sys.Net.WebServiceProxy._generateTypedConstructor = function Sys$Net$WebServiceProxy$_generateTypedConstructor(type) { + return function(properties) { + if (properties) { + for (var name in properties) { + this[name] = properties[name]; + } + } + this.__type = type; + } +} +Sys._jsonp = 0; +Sys.Net.WebServiceProxy._xdomain = /^\s*([a-zA-Z0-9\+\-\.]+\:)\/\/([^?#\/]+)/; + +Sys.Net.WebServiceError = function Sys$Net$WebServiceError(timedOut, message, stackTrace, exceptionType, errorObject) { + /// + /// + /// + /// + /// + /// + var e = Function._validateParams(arguments, [ + {name: "timedOut", type: Boolean}, + {name: "message", type: String, mayBeNull: true}, + {name: "stackTrace", type: String, mayBeNull: true, optional: true}, + {name: "exceptionType", type: String, mayBeNull: true, optional: true}, + {name: "errorObject", type: Object, mayBeNull: true, optional: true} + ]); + if (e) throw e; + this._timedOut = timedOut; + this._message = message; + this._stackTrace = stackTrace; + this._exceptionType = exceptionType; + this._errorObject = errorObject; + this._statusCode = -1; +} + function Sys$Net$WebServiceError$get_timedOut() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._timedOut; + } + function Sys$Net$WebServiceError$get_statusCode() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._statusCode; + } + function Sys$Net$WebServiceError$get_message() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._message; + } + function Sys$Net$WebServiceError$get_stackTrace() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._stackTrace || ""; + } + function Sys$Net$WebServiceError$get_exceptionType() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._exceptionType || ""; + } + function Sys$Net$WebServiceError$get_errorObject() { + /// + if (arguments.length !== 0) throw Error.parameterCount(); + return this._errorObject || null; + } +Sys.Net.WebServiceError.prototype = { + get_timedOut: Sys$Net$WebServiceError$get_timedOut, + get_statusCode: Sys$Net$WebServiceError$get_statusCode, + get_message: Sys$Net$WebServiceError$get_message, + get_stackTrace: Sys$Net$WebServiceError$get_stackTrace, + get_exceptionType: Sys$Net$WebServiceError$get_exceptionType, + get_errorObject: Sys$Net$WebServiceError$get_errorObject +} +Sys.Net.WebServiceError.registerClass('Sys.Net.WebServiceError'); + + +Type.registerNamespace('Sys'); + +Sys.Res={ +'urlMustBeLessThan1024chars':'The history state must be small enough to not make the url larger than 1024 characters.', +'argumentTypeName':'Value is not the name of an existing type.', +'cantBeCalledAfterDispose':'Can\'t be called after dispose.', +'componentCantSetIdAfterAddedToApp':'The id property of a component can\'t be set after it\'s been added to the Application object.', +'behaviorDuplicateName':'A behavior with name \'{0}\' already exists or it is the name of an existing property on the target element.', +'notATypeName':'Value is not a valid type name.', +'elementNotFound':'An element with id \'{0}\' could not be found.', +'stateMustBeStringDictionary':'The state object can only have null and string fields.', +'boolTrueOrFalse':'Value must be \'true\' or \'false\'.', +'scriptLoadFailedNoHead':'ScriptLoader requires pages to contain a element.', +'stringFormatInvalid':'The format string is invalid.', +'referenceNotFound':'Component \'{0}\' was not found.', +'enumReservedName':'\'{0}\' is a reserved name that can\'t be used as an enum value name.', +'circularParentChain':'The chain of control parents can\'t have circular references.', +'namespaceContainsNonObject':'Object {0} already exists and is not an object.', +'undefinedEvent':'\'{0}\' is not an event.', +'propertyUndefined':'\'{0}\' is not a property or an existing field.', +'observableConflict':'Object already contains a member with the name \'{0}\'.', +'historyCannotEnableHistory':'Cannot set enableHistory after initialization.', +'eventHandlerInvalid':'Handler was not added through the Sys.UI.DomEvent.addHandler method.', +'scriptLoadFailedDebug':'The script \'{0}\' failed to load. Check for:\r\n Inaccessible path.\r\n Script errors. (IE) Enable \'Display a notification about every script error\' under advanced settings.', +'propertyNotWritable':'\'{0}\' is not a writable property.', +'enumInvalidValueName':'\'{0}\' is not a valid name for an enum value.', +'controlAlreadyDefined':'A control is already associated with the element.', +'addHandlerCantBeUsedForError':'Can\'t add a handler for the error event using this method. Please set the window.onerror property instead.', +'cantAddNonFunctionhandler':'Can\'t add a handler that is not a function.', +'invalidNameSpace':'Value is not a valid namespace identifier.', +'notAnInterface':'Value is not a valid interface.', +'eventHandlerNotFunction':'Handler must be a function.', +'propertyNotAnArray':'\'{0}\' is not an Array property.', +'namespaceContainsClass':'Object {0} already exists as a class, enum, or interface.', +'typeRegisteredTwice':'Type {0} has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.', +'cantSetNameAfterInit':'The name property can\'t be set on this object after initialization.', +'historyMissingFrame':'For the history feature to work in IE, the page must have an iFrame element with id \'__historyFrame\' pointed to a page that gets its title from the \'title\' query string parameter and calls Sys.Application._onIFrameLoad() on the parent window. This can be done by setting EnableHistory to true on ScriptManager.', +'appDuplicateComponent':'Two components with the same id \'{0}\' can\'t be added to the application.', +'historyCannotAddHistoryPointWithHistoryDisabled':'A history point can only be added if enableHistory is set to true.', +'baseNotAClass':'Value is not a class.', +'expectedElementOrId':'Value must be a DOM element or DOM element Id.', +'methodNotFound':'No method found with name \'{0}\'.', +'arrayParseBadFormat':'Value must be a valid string representation for an array. It must start with a \'[\' and end with a \']\'.', +'stateFieldNameInvalid':'State field names must not contain any \'=\' characters.', +'cantSetId':'The id property can\'t be set on this object.', +'stringFormatBraceMismatch':'The format string contains an unmatched opening or closing brace.', +'enumValueNotInteger':'An enumeration definition can only contain integer values.', +'propertyNullOrUndefined':'Cannot set the properties of \'{0}\' because it returned a null value.', +'argumentDomNode':'Value must be a DOM element or a text node.', +'componentCantSetIdTwice':'The id property of a component can\'t be set more than once.', +'createComponentOnDom':'Value must be null for Components that are not Controls or Behaviors.', +'createNotComponent':'{0} does not derive from Sys.Component.', +'createNoDom':'Value must not be null for Controls and Behaviors.', +'cantAddWithoutId':'Can\'t add a component that doesn\'t have an id.', +'notObservable':'Instances of type \'{0}\' cannot be observed.', +'badTypeName':'Value is not the name of the type being registered or the name is a reserved word.', +'argumentInteger':'Value must be an integer.', +'invokeCalledTwice':'Cannot call invoke more than once.', +'webServiceFailed':'The server method \'{0}\' failed with the following error: {1}', +'argumentType':'Object cannot be converted to the required type.', +'argumentNull':'Value cannot be null.', +'scriptAlreadyLoaded':'The script \'{0}\' has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit.', +'scriptDependencyNotFound':'The script \'{0}\' failed to load because it is dependent on script \'{1}\'.', +'formatBadFormatSpecifier':'Format specifier was invalid.', +'requiredScriptReferenceNotIncluded':'\'{0}\' requires that you have included a script reference to \'{1}\'.', +'webServiceFailedNoMsg':'The server method \'{0}\' failed.', +'argumentDomElement':'Value must be a DOM element.', +'invalidExecutorType':'Could not create a valid Sys.Net.WebRequestExecutor from: {0}.', +'cannotCallBeforeResponse':'Cannot call {0} when responseAvailable is false.', +'actualValue':'Actual value was {0}.', +'enumInvalidValue':'\'{0}\' is not a valid value for enum {1}.', +'scriptLoadFailed':'The script \'{0}\' could not be loaded.', +'parameterCount':'Parameter count mismatch.', +'cannotDeserializeEmptyString':'Cannot deserialize empty string.', +'formatInvalidString':'Input string was not in a correct format.', +'invalidTimeout':'Value must be greater than or equal to zero.', +'cannotAbortBeforeStart':'Cannot abort when executor has not started.', +'argument':'Value does not fall within the expected range.', +'cannotDeserializeInvalidJson':'Cannot deserialize. The data does not correspond to valid JSON.', +'invalidHttpVerb':'httpVerb cannot be set to an empty or null string.', +'nullWebRequest':'Cannot call executeRequest with a null webRequest.', +'eventHandlerInvalid':'Handler was not added through the Sys.UI.DomEvent.addHandler method.', +'cannotSerializeNonFiniteNumbers':'Cannot serialize non finite numbers.', +'argumentUndefined':'Value cannot be undefined.', +'webServiceInvalidReturnType':'The server method \'{0}\' returned an invalid type. Expected type: {1}', +'servicePathNotSet':'The path to the web service has not been set.', +'argumentTypeWithTypes':'Object of type \'{0}\' cannot be converted to type \'{1}\'.', +'cannotCallOnceStarted':'Cannot call {0} once started.', +'badBaseUrl1':'Base URL does not contain ://.', +'badBaseUrl2':'Base URL does not contain another /.', +'badBaseUrl3':'Cannot find last / in base URL.', +'setExecutorAfterActive':'Cannot set executor after it has become active.', +'paramName':'Parameter name: {0}', +'nullReferenceInPath':'Null reference while evaluating data path: \'{0}\'.', +'cannotCallOutsideHandler':'Cannot call {0} outside of a completed event handler.', +'cannotSerializeObjectWithCycle':'Cannot serialize object with cyclic reference within child properties.', +'format':'One of the identified items was in an invalid format.', +'assertFailedCaller':'Assertion Failed: {0}\r\nat {1}', +'argumentOutOfRange':'Specified argument was out of the range of valid values.', +'webServiceTimedOut':'The server method \'{0}\' timed out.', +'notImplemented':'The method or operation is not implemented.', +'assertFailed':'Assertion Failed: {0}', +'invalidOperation':'Operation is not valid due to the current state of the object.', +'breakIntoDebugger':'{0}\r\n\r\nBreak into debugger?' +}; diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftAjax.js b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftAjax.js new file mode 100644 index 0000000..52e6626 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftAjax.js @@ -0,0 +1,6 @@ +//---------------------------------------------------------- +// Copyright (C) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------- +// MicrosoftAjax.js +Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;c=d)break;a=Function._validateParameter(g[b],f,h);if(a){a.popStackFrame();return a}}return null};Function._validateParameterCount=function(j,d,i){var a,c,b=d.length,e=j.length;if(eb){c=true;for(a=0;a0&&(d=0};Array.dequeue=function(a){return a.shift()};Array.forEach=function(b,e,d){for(var a=0,f=b.length;a=0)b.splice(a,1);return a>=0};Array.removeAt=function(a,b){a.splice(b,1)};Sys._indexOf=function(d,e,a){if(typeof e==="undefined")return -1;var c=d.length;if(c!==0){a=a-0;if(isNaN(a))a=0;else{if(isFinite(a))a=a-a%1;if(a<0)a=Math.max(0,c+a)}for(var b=a;b-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);if(Sys.Browser.version>=8)if(document.documentMode>=7)Sys.Browser.documentMode=document.documentMode;Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" Firefox/")>-1){Sys.Browser.agent=Sys.Browser.Firefox;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)[1]);Sys.Browser.name="Firefox";Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" AppleWebKit/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/AppleWebKit\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name="Safari"}else if(navigator.userAgent.indexOf("Opera/")>-1)Sys.Browser.agent=Sys.Browser.Opera;Sys.EventArgs=function(){};Sys.EventArgs.registerClass("Sys.EventArgs");Sys.EventArgs.Empty=new Sys.EventArgs;Sys.CancelEventArgs=function(){Sys.CancelEventArgs.initializeBase(this);this._cancel=false};Sys.CancelEventArgs.prototype={get_cancel:function(){return this._cancel},set_cancel:function(a){this._cancel=a}};Sys.CancelEventArgs.registerClass("Sys.CancelEventArgs",Sys.EventArgs);Type.registerNamespace("Sys.UI");Sys._Debug=function(){};Sys._Debug.prototype={_appendConsole:function(a){if(typeof Debug!=="undefined"&&Debug.writeln)Debug.writeln(a);if(window.console&&window.console.log)window.console.log(a);if(window.opera)window.opera.postError(a);if(window.debugService)window.debugService.trace(a)},_appendTrace:function(b){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value+=b+"\n"},assert:function(c,a,b){if(!c){a=b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.assert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.format(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value=""},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement)eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){var c=this._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=c?c:"traceDump";b=b?b:"";if(a===null){this.trace(b+c+": null");return}switch(typeof a){case "undefined":this.trace(b+c+": Undefined");break;case "number":case "string":case "boolean":this.trace(b+c+": "+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a)){this.trace(b+c+": "+a.toString());break}if(!d)d=[];else if(Array.contains(d,a)){this.trace(b+c+": ...");return}Array.add(d,a);if(a==window||a===document||window.HTMLElement&&a instanceof HTMLElement||typeof a.nodeName==="string"){var k=a.tagName?a.tagName:"DomElement";if(a.id)k+=" - "+a.id;this.trace(b+c+" {"+k+"}")}else{var i=Object.getTypeName(a);this.trace(b+c+(typeof i==="string"?" {"+i+"}":""));if(b===""||f){b+=" ";var e,j,l,g,h;if(Array.isInstanceOfType(a)){j=a.length;for(e=0;e=0;d--){var k=h[d].trim();b=a[k];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c.split(",")[d].trim(),this.__typeName));j|=b}return j}}function Sys$Enum$toString(c){if(typeof c==="undefined"||c===null)return this.__string;var d=this.prototype,a;if(!this.__flags||c===0){for(a in d)if(d[a]===c)return a}else{var b=this.__sortedValues;if(!b){b=[];for(a in d)b[b.length]={key:a,value:d[a]};b.sort(function(a,b){return a.value-b.value});this.__sortedValues=b}var e=[],g=c;for(a=b.length-1;a>=0;a--){var h=b[a],f=h.value;if(f===0)continue;if((f&c)===f){e[e.length]=h.key;g-=f;if(g===0)break}}if(e.length&&g===0)return e.reverse().join(", ")}return ""}Type.prototype.registerEnum=function(b,c){Sys.__upperCaseTypes[b.toUpperCase()]=this;for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=b;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=c;this.__enum=true};Type.isEnum=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__enum};Type.isFlags=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__flags};Sys.CollectionChange=function(e,a,c,b,d){this.action=e;if(a)if(!(a instanceof Array))a=[a];this.newItems=a||null;if(typeof c!=="number")c=-1;this.newStartingIndex=c;if(b)if(!(b instanceof Array))b=[b];this.oldItems=b||null;if(typeof d!=="number")d=-1;this.oldStartingIndex=d};Sys.CollectionChange.registerClass("Sys.CollectionChange");Sys.NotifyCollectionChangedAction=function(){throw Error.notImplemented()};Sys.NotifyCollectionChangedAction.prototype={add:0,remove:1,reset:2};Sys.NotifyCollectionChangedAction.registerEnum("Sys.NotifyCollectionChangedAction");Sys.NotifyCollectionChangedEventArgs=function(a){this._changes=a;Sys.NotifyCollectionChangedEventArgs.initializeBase(this)};Sys.NotifyCollectionChangedEventArgs.prototype={get_changes:function(){return this._changes||[]}};Sys.NotifyCollectionChangedEventArgs.registerClass("Sys.NotifyCollectionChangedEventArgs",Sys.EventArgs);Sys.Observer=function(){};Sys.Observer.registerClass("Sys.Observer");Sys.Observer.makeObservable=function(a){var c=a instanceof Array,b=Sys.Observer;if(a.setValue===b._observeMethods.setValue)return a;b._addMethods(a,b._observeMethods);if(c)b._addMethods(a,b._arrayMethods);return a};Sys.Observer._addMethods=function(c,b){for(var a in b)c[a]=b[a]};Sys.Observer._addEventHandler=function(c,a,b){Sys.Observer._getContext(c,true).events._addHandler(a,b)};Sys.Observer.addEventHandler=function(c,a,b){Sys.Observer._addEventHandler(c,a,b)};Sys.Observer._removeEventHandler=function(c,a,b){Sys.Observer._getContext(c,true).events._removeHandler(a,b)};Sys.Observer.removeEventHandler=function(c,a,b){Sys.Observer._removeEventHandler(c,a,b)};Sys.Observer.raiseEvent=function(b,e,d){var c=Sys.Observer._getContext(b);if(!c)return;var a=c.events.getHandler(e);if(a)a(b,d)};Sys.Observer.addPropertyChanged=function(b,a){Sys.Observer._addEventHandler(b,"propertyChanged",a)};Sys.Observer.removePropertyChanged=function(b,a){Sys.Observer._removeEventHandler(b,"propertyChanged",a)};Sys.Observer.beginUpdate=function(a){Sys.Observer._getContext(a,true).updating=true};Sys.Observer.endUpdate=function(b){var a=Sys.Observer._getContext(b);if(!a||!a.updating)return;a.updating=false;var d=a.dirty;a.dirty=false;if(d){if(b instanceof Array){var c=a.changes;a.changes=null;Sys.Observer.raiseCollectionChanged(b,c)}Sys.Observer.raisePropertyChanged(b,"")}};Sys.Observer.isUpdating=function(b){var a=Sys.Observer._getContext(b);return a?a.updating:false};Sys.Observer._setValue=function(a,j,g){var b,f,k=a,d=j.split(".");for(var i=0,m=d.length-1;i-1&&ac.Calendar.TwoDigitYearMax)a-=100}return a};Date._getEra=function(e,c){if(!c)return 0;var b,d=e.getTime();for(var a=0,f=c.length;a=b)return a}return 0};Date._getEraYear=function(d,b,e,c){var a=d.getFullYear();if(!c&&b.eras)a-=b.eras[e+3];return a};Date._getParseRegExp=function(b,e){if(!b._parseRegExp)b._parseRegExp={};else if(b._parseRegExp[e])return b._parseRegExp[e];var c=Date._expandFormat(b,e);c=c.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var a=new Sys.StringBuilder("^"),j=[],f=0,i=0,h=Date._getTokenRegExp(),d;while((d=h.exec(c))!==null){var l=c.slice(f,d.index);f=h.lastIndex;i+=Date._appendPreOrPostMatch(l,a);if(i%2===1){a.append(d[0]);continue}switch(d[0]){case "dddd":case "ddd":case "MMMM":case "MMM":case "gg":case "g":a.append("(\\D+)");break;case "tt":case "t":a.append("(\\D*)");break;case "yyyy":a.append("(\\d{4})");break;case "fff":a.append("(\\d{3})");break;case "ff":a.append("(\\d{2})");break;case "f":a.append("(\\d)");break;case "dd":case "d":case "MM":case "M":case "yy":case "y":case "HH":case "H":case "hh":case "h":case "mm":case "m":case "ss":case "s":a.append("(\\d\\d?)");break;case "zzz":a.append("([+-]?\\d\\d?:\\d{2})");break;case "zz":case "z":a.append("([+-]?\\d\\d?)");break;case "/":a.append("(\\"+b.DateSeparator+")")}Array.add(j,d[0])}Date._appendPreOrPostMatch(c.slice(f),a);a.append("$");var k=a.toString().replace(/\s+/g,"\\s+"),g={"regExp":k,"groups":j};b._parseRegExp[e]=g;return g};Date._getTokenRegExp=function(){return /\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};Date.parseLocale=function(a){return Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(a){return Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(h,d,i){var a,c,b,f,e,g=false;for(a=1,c=i.length;a31)return null;break;case "MMMM":c=k._getMonthIndex(a);if(c<0||c>11)return null;break;case "MMM":c=k._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case "M":case "MM":c=parseInt(a,10)-1;if(c<0||c>11)return null;break;case "y":case "yy":e=Date._expandYear(g,parseInt(a,10));if(e<0||e>9999)return null;break;case "yyyy":e=parseInt(a,10);if(e<0||e>9999)return null;break;case "h":case "hh":d=parseInt(a,10);if(d===12)d=0;if(d<0||d>11)return null;break;case "H":case "HH":d=parseInt(a,10);if(d<0||d>23)return null;break;case "m":case "mm":q=parseInt(a,10);if(q<0||q>59)return null;break;case "s":case "ss":r=parseInt(a,10);if(r<0||r>59)return null;break;case "tt":case "t":var z=a.toUpperCase();v=z===g.PMDesignator.toUpperCase();if(!v&&z!==g.AMDesignator.toUpperCase())return null;break;case "f":f=parseInt(a,10)*100;if(f<0||f>999)return null;break;case "ff":f=parseInt(a,10)*10;if(f<0||f>999)return null;break;case "fff":f=parseInt(a,10);if(f<0||f>999)return null;break;case "dddd":i=k._getDayIndex(a);if(i<0||i>6)return null;break;case "ddd":i=k._getAbbrDayIndex(a);if(i<0||i>6)return null;break;case "zzz":var u=a.split(/:/);if(u.length!==2)return null;h=parseInt(u[0],10);if(h<-12||h>13)return null;var o=parseInt(u[1],10);if(o<0||o>59)return null;n=h*60+(a.startsWith("-")?-o:o);break;case "z":case "zz":h=parseInt(a,10);if(h<-12||h>13)return null;n=h*60;break;case "g":case "gg":var p=a;if(!p||!g.eras)return null;p=p.toLowerCase().trim();for(var s=0,F=g.eras.length;s0)return this.toLocaleString();else return this.toString();var o=["n %","n%","%n"],n=["-n %","-n%","-%n"],p=["(n)","-n","- n","n-","n -"],m=["$n","n$","$ n","n $"],l=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function g(a,c,d){for(var b=a.length;b1?parseInt(e[1]):0;e=b.split(".");b=e[0];a=e.length>1?e[1]:"";var q;if(c>0){a=g(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=g(b,c+1,true);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(i>0){if(a.length>i)a=a.slice(0,i);else a=g(a,i,false);a=p+a}else a="";var d=b.length-1,f="";while(d>=0){if(h===0||h>d)if(f.length>0)return b.slice(0,d+1)+n+f+a;else return b.slice(0,d+1)+a;if(f.length>0)f=b.slice(d-h+1,d+1)+n+f;else f=b.slice(d-h+1,d+1);d-=h;if(k1)b=parseInt(e.slice(1),10);var c;switch(e.charAt(0)){case "d":case "D":c="n";if(b!==-1)d=g(""+d,b,true);if(this<0)d=-d;break;case "c":case "C":if(this<0)c=l[a.CurrencyNegativePattern];else c=m[a.CurrencyPositivePattern];if(b===-1)b=a.CurrencyDecimalDigits;d=i(Math.abs(this),b,a.CurrencyGroupSizes,a.CurrencyGroupSeparator,a.CurrencyDecimalSeparator);break;case "n":case "N":if(this<0)c=p[a.NumberNegativePattern];else c="n";if(b===-1)b=a.NumberDecimalDigits;d=i(Math.abs(this),b,a.NumberGroupSizes,a.NumberGroupSeparator,a.NumberDecimalSeparator);break;case "p":case "P":if(this<0)c=n[a.PercentNegativePattern];else c=o[a.PercentPositivePattern];if(b===-1)b=a.PercentDecimalDigits;d=i(Math.abs(this)*100,b,a.PercentGroupSizes,a.PercentGroupSeparator,a.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var k=/n|\$|-|%/g,f="";for(;true;){var q=k.lastIndex,h=k.exec(c);f+=c.slice(q,h?h.index:c.length);if(!h)break;switch(h[0]){case "n":f+=d;break;case "$":f+=a.CurrencySymbol;break;case "-":if(/[1-9]/.test(d))f+=a.NegativeSign;break;case "%":f+=a.PercentSymbol}}return f};Sys.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var a=this.dateTimeFormat;this._dateTimeFormats=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getIndex:function(c,d,e){var b=this._toUpper(c),a=Array.indexOf(d,b);if(a===-1)a=Array.indexOf(e,b);return a},_getMonthIndex:function(a){if(!this._upperMonths){this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames);this._upperMonthsGenitive=this._toUpperArray(this.dateTimeFormat.MonthGenitiveNames)}return this._getIndex(a,this._upperMonths,this._upperMonthsGenitive)},_getAbbrMonthIndex:function(a){if(!this._upperAbbrMonths){this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);this._upperAbbrMonthsGenitive=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthGenitiveNames)}return this._getIndex(a,this._upperAbbrMonths,this._upperAbbrMonthsGenitive)},_getDayIndex:function(a){if(!this._upperDays)this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames);return Array.indexOf(this._upperDays,this._toUpper(a))},_getAbbrDayIndex:function(a){if(!this._upperAbbrDays)this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames);return Array.indexOf(this._upperAbbrDays,this._toUpper(a))},_toUpperArray:function(c){var b=[];for(var a=0,d=c.length;a0)a.append(",");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b[c],a,false,g)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}var d=[],f=0;for(var e in b){if(e.startsWith("$"))continue;if(e===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&f!==0){d[f++]=d[0];d[0]=e}else d[f++]=e}if(i)d.sort();a.append("{");var j=false;for(c=0;c=0;c--){var f=d[c];if(!g||f.autoRemove)$removeHandler(a,b,f.handler)}}a._events=null}};Sys.UI.DomEvent._disposeHandlers=function(){Sys.UI.DomEvent._clearHandlers(this,true);var b=this._chainDispose,a=typeof b;if(a!=="undefined"){this.dispose=b;this._chainDispose=null;if(a==="function")this.dispose()}};var $removeHandler=Sys.UI.DomEvent.removeHandler=function(b,a,c){Sys.UI.DomEvent._removeHandler(b,a,c)};Sys.UI.DomEvent._removeHandler=function(a,e,f){var d=null,c=a._events[e];for(var b=0,g=c.length;b=3){d+=parseInt(b.borderLeftWidth);e+=parseInt(b.borderTopWidth)}}b=Sys.UI.DomElement._getCurrentStyle(c);var h=b?b.position:null;if(!h||h!=="absolute")for(a=c.parentNode;a;a=a.parentNode){f=a.tagName?a.tagName.toUpperCase():null;if(f!=="BODY"&&f!=="HTML"&&(a.scrollLeft||a.scrollTop)){d-=a.scrollLeft||0;e-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var i=b?b.position:null;if(i&&i==="absolute")break}return new Sys.UI.Point(d,e)};else Sys.UI.DomElement.getLocation=function(d){if(d.window&&d.window===d||d.nodeType===9)return new Sys.UI.Point(0,0);var e=0,f=0,a,i=null,g=null,b=null;for(a=d;a;i=a,(g=b,a=a.offsetParent)){var c=a.tagName?a.tagName.toUpperCase():null;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c==="BODY"&&(!g||g.position!=="absolute"))){e+=a.offsetLeft;f+=a.offsetTop}if(i!==null&&b){if(c!=="TABLE"&&c!=="TD"&&c!=="HTML"){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}if(c==="TABLE"&&(b.position==="relative"||b.position==="absolute")){e+=parseInt(b.marginLeft)||0;f+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(d);var h=b?b.position:null;if(!h||h!=="absolute")for(a=d.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():null;if(c!=="BODY"&&c!=="HTML"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(e,f)};Sys.UI.DomElement.isDomElement=function(a){return Sys._isDomElement(a)};Sys.UI.DomElement.removeCssClass=function(d,c){var a=" "+d.className+" ",b=a.indexOf(" "+c+" ");if(b>=0)d.className=(a.substr(0,b)+" "+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.resolveElement=function(b,c){var a=b;if(!a)return null;if(typeof a==="string")a=Sys.UI.DomElement.getElementById(a,c);return a};Sys.UI.DomElement.raiseBubbleEvent=function(c,d){var b=c;while(b){var a=b.control;if(a&&a.onBubbleEvent&&a.raiseBubbleEvent){Sys.UI.DomElement._raiseBubbleEventFromControl(a,c,d);return}b=b.parentNode}};Sys.UI.DomElement._raiseBubbleEventFromControl=function(a,b,c){if(!a.onBubbleEvent(b,c))a._raiseBubbleEvent(b,c)};Sys.UI.DomElement.setLocation=function(b,c,d){var a=b.style;a.position="absolute";a.left=c+"px";a.top=d+"px"};Sys.UI.DomElement.toggleCssClass=function(b,a){if(Sys.UI.DomElement.containsCssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement.getVisibilityMode=function(a){return a._visibilityMode===Sys.UI.VisibilityMode.hide?Sys.UI.VisibilityMode.hide:Sys.UI.VisibilityMode.collapse};Sys.UI.DomElement.setVisibilityMode=function(a,b){Sys.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==b){a._visibilityMode=b;if(Sys.UI.DomElement.getVisible(a)===false)if(a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none";a._visibilityMode=b}};Sys.UI.DomElement.getVisible=function(b){var a=b.currentStyle||Sys.UI.DomElement._getCurrentStyle(b);if(!a)return true;return a.visibility!=="hidden"&&a.display!=="none"};Sys.UI.DomElement.setVisible=function(a,b){if(b!==Sys.UI.DomElement.getVisible(a)){Sys.UI.DomElement._ensureOldDisplayMode(a);a.style.visibility=b?"visible":"hidden";if(b||a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none"}};Sys.UI.DomElement._ensureOldDisplayMode=function(a){if(!a._oldDisplayMode){var b=a.currentStyle||Sys.UI.DomElement._getCurrentStyle(a);a._oldDisplayMode=b?b.display:null;if(!a._oldDisplayMode||a._oldDisplayMode==="none")switch(a.tagName.toUpperCase()){case "DIV":case "P":case "ADDRESS":case "BLOCKQUOTE":case "BODY":case "COL":case "COLGROUP":case "DD":case "DL":case "DT":case "FIELDSET":case "FORM":case "H1":case "H2":case "H3":case "H4":case "H5":case "H6":case "HR":case "IFRAME":case "LEGEND":case "OL":case "PRE":case "TABLE":case "TD":case "TH":case "TR":case "UL":a._oldDisplayMode="block";break;case "LI":a._oldDisplayMode="list-item";break;default:a._oldDisplayMode="inline"}}};Sys.UI.DomElement._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(a){if(a.nodeType===3)return null;var c=Sys.UI.DomElement._getWindow(a);if(a.documentElement)a=a.documentElement;var b=c&&a!==c&&c.getComputedStyle?c.getComputedStyle(a,null):a.currentStyle||a.style;if(!b&&Sys.Browser.agent===Sys.Browser.Safari&&a.style){var g=a.style.display,f=a.style.position;a.style.position="absolute";a.style.display="block";var e=c.getComputedStyle(a,null);a.style.display=g;a.style.position=f;b={};for(var d in e)b[d]=e[d];b.display="none"}return b};Sys.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface("Sys.IContainer");Sys.ApplicationLoadEventArgs=function(b,a){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=b;this._isPartialLoad=a};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);this._domReady()};Sys._Application.prototype={_creatingComponents:false,_disposing:false,_deleteCount:0,get_isCreatingComponents:function(){return this._creatingComponents},get_isDisposing:function(){return this._disposing},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Empty);else this.get_events().addHandler("init",a)},remove_init:function(a){this.get_events().removeHandler("init",a)},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",a)},add_unload:function(a){this.get_events().addHandler("unload",a)},remove_unload:function(a){this.get_events().removeHandler("unload",a)},addComponent:function(a){this._components[a.get_id()]=a},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(this._timerCookie){window.clearTimeout(this._timerCookie);delete this._timerCookie}if(this._endRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler);delete this._endRequestHandler}if(this._beginRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler);delete this._beginRequestHandler}if(window.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var c=this.get_events().getHandler("unload");if(c)c(this,Sys.EventArgs.Empty);var b=Array.clone(this._disposableObjects);for(var a=0,f=b.length;a=0;b--)this._disposeElementInternal(c[b]);if(!d)this._disposeElementInternal(a)}},endCreateComponents:function(){var b=this._secondPassComponents;for(var a=0,d=b.length;a1000){var c=[];for(var d=0,f=b.length;d=0;b--){var c=a[b];if(typeof c.dispose==="function")c.dispose()}},_disposeElementInternal:function(a){var d=a.dispose;if(d&&typeof d==="function")a.dispose();else{var c=a.control;if(c&&typeof c.dispose==="function")c.dispose()}var b=a._behaviors;if(b)this._disposeComponents(b);b=a._components;if(b){this._disposeComponents(b);a._components=null}},_domReady:function(){var a,g,f=this;function b(){f.initialize()}var c=function(){Sys.UI.DomEvent.removeHandler(window,"load",c);b()};Sys.UI.DomEvent.addHandler(window,"load",c);if(document.addEventListener)try{document.addEventListener("DOMContentLoaded",a=function(){document.removeEventListener("DOMContentLoaded",a,false);b()},false)}catch(h){}else if(document.attachEvent)if(window==window.top&&document.documentElement.doScroll){var e,d=document.createElement("div");a=function(){try{d.doScroll("left")}catch(c){e=window.setTimeout(a,0);return}d=null;b()};a()}else document.attachEvent("onreadystatechange",a=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",a);b()}})},_raiseInit:function(){var a=this.get_events().getHandler("init");if(a){this.beginCreateComponents();a(this,Sys.EventArgs.Empty);this.endCreateComponents()}},_unloadHandler:function(){this.dispose()}};Sys._Application.registerClass("Sys._Application",Sys.Component,Sys.IContainer);Sys.Application=new Sys._Application;var $find=Sys.Application.findComponent;Sys.UI.Behavior=function(b){Sys.UI.Behavior.initializeBase(this);this._element=b;var a=b._behaviors;if(!a)b._behaviors=[this];else a[a.length]=this};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var a=Sys.UI.Behavior.callBaseMethod(this,"get_id");if(a)return a;if(!this._element||!this._element.id)return "";return this._element.id+"$"+this.get_name()},get_name:function(){if(this._name)return this._name;var a=Object.getTypeName(this),b=a.lastIndexOf(".");if(b!==-1)a=a.substr(b+1);if(!this.get_isInitialized())this._name=a;return a},set_name:function(a){this._name=a},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,"initialize");var a=this.get_name();if(a)this._element[a]=this},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,"dispose");var a=this._element;if(a){var c=this.get_name();if(c)a[c]=null;var b=a._behaviors;Array.remove(b,this);if(b.length===0)a._behaviors=null;delete this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(b,c){var a=b[c];return a&&Sys.UI.Behavior.isInstanceOfType(a)?a:null};Sys.UI.Behavior.getBehaviors=function(a){if(!a._behaviors)return [];return Array.clone(a._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(d,e){var a=d._behaviors,c=[];if(a)for(var b=0,f=a.length;b0&&a.charAt(0)==="#")a=a.substring(1);return a};Sys._Application.prototype.get_enableHistory=function(){return this._enableHistory};Sys._Application.prototype.set_enableHistory=function(a){this._enableHistory=a};Sys._Application.prototype.add_navigate=function(a){this.get_events().addHandler("navigate",a)};Sys._Application.prototype.remove_navigate=function(a){this.get_events().removeHandler("navigate",a)};Sys._Application.prototype.addHistoryPoint=function(c,f){this._ensureHistory();var b=this._state;for(var a in c){var d=c[a];if(d===null){if(typeof b[a]!=="undefined")delete b[a]}else b[a]=d}var e=this._serializeState(b);this._historyPointIsNew=true;this._setState(e,f);this._raiseNavigate()};Sys._Application.prototype.setServerId=function(a,b){this._clientId=a;this._uniqueId=b};Sys._Application.prototype.setServerState=function(a){this._ensureHistory();this._state.__s=a;this._updateHiddenField(a)};Sys._Application.prototype._deserializeState=function(a){var e={};a=a||"";var b=a.indexOf("&&");if(b!==-1&&b+2'");c.write(""+(b||document.title)+"parent.Sys.Application._onIFrameLoad('+Sys.Serialization.JavaScriptSerializer.serialize(a)+");");c.close()}this._ignoreTimer=false;this._currentEntry=a;if(this._historyFrame||this._historyPointIsNew){var f=this.get_stateString();if(a!==f){window.location.hash=a;this._currentEntry=this.get_stateString();if(typeof b!=="undefined"&&b!==null)document.title=b}}this._historyPointIsNew=false}}};Sys._Application.prototype._updateHiddenField=function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}};if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){var b=["Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP"];for(var a=0,c=b.length;a0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a="";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf("MSIE")!==-1)a.setProperty("SelectionLanguage","XPath");if(a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName==="parsererror")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName==="parsererror")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;this._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler("invokingRequest",a)},add_completedRequest:function(a){this._get_eventHandlerList().addHandler("completedRequest",a)},remove_completedRequest:function(a){this._get_eventHandlerList().removeHandler("completedRequest",a)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted())return;var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler("invokingRequest");if(handler)handler(this,evArgs);if(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestManager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(a){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url="";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(a){this._get_eventHandlerList().addHandler("completed",a)},remove_completed:function(a){this._get_eventHandlerList().removeHandler("completed",a)},completed:function(b){var a=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(a)a(this._executor,b);a=this._get_eventHandlerList().getHandler("completed");if(a)a(this._executor,b)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null)return "GET";return "POST"}return this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor},set_executor:function(a){this._executor=a;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0)return Sys.Net.WebRequestManager.get_defaultTimeout();return this._timeout},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(b,a){if(b&&b.indexOf("://")!==-1)return b;if(!a||a.length===0){var d=document.getElementsByTagName("base")[0];if(d&&d.href&&d.href.length>0)a=d.href;else a=document.URL}var c=a.indexOf("?");if(c!==-1)a=a.substr(0,c);c=a.indexOf("#");if(c!==-1)a=a.substr(0,c);a=a.substr(0,a.lastIndexOf("/")+1);if(!b||b.length===0)return a;if(b.charAt(0)==="/"){var e=a.indexOf("://"),g=a.indexOf("/",e+3);return a.substr(0,g)+b}else{var f=a.lastIndexOf("/");return a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=function(c,b,f){b=b||encodeURIComponent;var h=0,e,g,d,a=new Sys.StringBuilder;if(c)for(d in c){e=c[d];if(typeof e==="function")continue;g=Sys.Serialization.JavaScriptSerializer.serialize(e);if(h++)a.append("&");a.append(d);a.append("=");a.append(b(g))}if(f){if(h)a.append("&");a.append(f)}return a.toString()};Sys.Net.WebRequest._createUrl=function(a,b,c){if(!b&&!c)return a;var d=Sys.Net.WebRequest._createQueryString(b,null,c);return d.length?a+(a&&a.indexOf("?")>=0?"&":"?")+d:a};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a};Sys._ScriptLoaderTask.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){if(this._disposed)return;this._disposed=true;this._removeScriptElementHandlers();Sys._ScriptLoaderTask._clearScript(this._scriptElement);this._scriptElement=null},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName("head")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){this._scriptLoadDelegate=Function.createDelegate(this,this._scriptLoadHandler);if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){this._scriptElement.readyState="loaded";$addHandler(this._scriptElement,"load",this._scriptLoadDelegate)}else $addHandler(this._scriptElement,"readystatechange",this._scriptLoadDelegate);if(this._scriptElement.addEventListener){this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);this._scriptElement.addEventListener("error",this._scriptErrorDelegate,false)}},_removeScriptElementHandlers:function(){if(this._scriptLoadDelegate){var a=this.get_scriptElement();if(Sys.Browser.agent!==Sys.Browser.InternetExplorer)$removeHandler(a,"load",this._scriptLoadDelegate);else $removeHandler(a,"readystatechange",this._scriptLoadDelegate);if(this._scriptErrorDelegate){this._scriptElement.removeEventListener("error",this._scriptErrorDelegate,false);this._scriptErrorDelegate=null}this._scriptLoadDelegate=null}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),false)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!=="loaded"&&a.readyState!=="complete")return;this._completedCallback(a,true)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys._ScriptLoaderTask._clearScript=function(a){if(!Sys.Debug.isDebug)a.parentNode.removeChild(a)};Type.registerNamespace("Sys.Net");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout||0},set_timeout:function(a){if(a<0)throw Error.argumentOutOfRange("value",a,Sys.Res.invalidTimeout);this._timeout=a},get_defaultUserContext:function(){return typeof this._userContext==="undefined"?null:this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded||null},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed||null},set_defaultFailedCallback:function(a){this._failed=a},get_enableJsonp:function(){return !!this._jsonp},set_enableJsonp:function(a){this._jsonp=a},get_path:function(){return this._path||null},set_path:function(a){this._path=a},get_jsonpCallbackParameter:function(){return this._callbackParameter||"callback"},set_jsonpCallbackParameter:function(a){this._callbackParameter=a},_invoke:function(d,e,g,f,c,b,a){c=c||this.get_defaultSucceededCallback();b=b||this.get_defaultFailedCallback();if(a===null||typeof a==="undefined")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout(),this.get_enableJsonp(),this.get_jsonpCallbackParameter())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(q,a,m,l,j,b,g,e,w,p){var i=w!==false?Sys.Net.WebServiceProxy._xdomain.exec(q):null,c,n=i&&i.length===3&&(i[1]!==location.protocol||i[2]!==location.host);m=n||m;if(n){p=p||"callback";c="_jsonp"+Sys._jsonp++}if(!l)l={};var r=l;if(!m||!r)r={};var s,h,f=null,k,o=null,u=Sys.Net.WebRequest._createUrl(a?q+"/"+encodeURIComponent(a):q,r,n?p+"=Sys."+c:null);if(n){s=document.createElement("script");s.src=u;k=new Sys._ScriptLoaderTask(s,function(d,b){if(!b||c)t({Message:String.format(Sys.Res.webServiceFailedNoMsg,a)},-1)});function v(){if(f===null)return;f=null;h=new Sys.Net.WebServiceError(true,String.format(Sys.Res.webServiceTimedOut,a));k.dispose();delete Sys[c];if(b)b(h,g,a)}function t(d,e){if(f!==null){window.clearTimeout(f);f=null}k.dispose();delete Sys[c];c=null;if(typeof e!=="undefined"&&e!==200){if(b){h=new Sys.Net.WebServiceError(false,d.Message||String.format(Sys.Res.webServiceFailedNoMsg,a),d.StackTrace||null,d.ExceptionType||null,d);h._statusCode=e;b(h,g,a)}}else if(j)j(d,g,a)}Sys[c]=t;e=e||Sys.Net.WebRequestManager.get_defaultTimeout();if(e>0)f=window.setTimeout(v,e);k.execute();return null}var d=new Sys.Net.WebRequest;d.set_url(u);d.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!m){o=Sys.Serialization.JavaScriptSerializer.serialize(l);if(o==="{}")o=""}d.set_body(o);d.add_completed(x);if(e&&e>0)d.set_timeout(e);d.invoke();function x(d){if(d.get_responseAvailable()){var f=d.get_statusCode(),c=null;try{var e=d.getResponseHeader("Content-Type");if(e.startsWith("application/json"))c=d.get_object();else if(e.startsWith("text/xml"))c=d.get_xml();else c=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),h=k==="true";if(h){if(c)c=new Sys.Net.WebServiceError(false,c.Message,c.StackTrace,c.ExceptionType,c)}else if(e.startsWith("application/json"))c=!c||typeof c.d==="undefined"?c:c.d;if(f<200||f>=300||h){if(b){if(!c||!h)c=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a));c._statusCode=f;b(c,g,a)}}else if(j)j(c,g,a)}else{var i;if(d.get_timedOut())i=String.format(Sys.Res.webServiceTimedOut,a);else i=String.format(Sys.Res.webServiceFailedNoMsg,a);if(b)b(new Sys.Net.WebServiceError(d.get_timedOut(),i,"",""),g,a)}}return d};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys._jsonp=0;Sys.Net.WebServiceProxy._xdomain=/^\s*([a-zA-Z0-9\+\-\.]+\:)\/\/([^?#\/]+)/;Sys.Net.WebServiceError=function(d,e,c,a,b){this._timedOut=d;this._message=e;this._stackTrace=c;this._exceptionType=a;this._errorObject=b;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace||""},get_exceptionType:function(){return this._exceptionType||""},get_errorObject:function(){return this._errorObject||null}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError"); +Type.registerNamespace('Sys');Sys.Res={'argumentInteger':'Value must be an integer.','invokeCalledTwice':'Cannot call invoke more than once.','webServiceFailed':'The server method \'{0}\' failed with the following error: {1}','argumentType':'Object cannot be converted to the required type.','argumentNull':'Value cannot be null.','scriptAlreadyLoaded':'The script \'{0}\' has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit.','scriptDependencyNotFound':'The script \'{0}\' failed to load because it is dependent on script \'{1}\'.','formatBadFormatSpecifier':'Format specifier was invalid.','requiredScriptReferenceNotIncluded':'\'{0}\' requires that you have included a script reference to \'{1}\'.','webServiceFailedNoMsg':'The server method \'{0}\' failed.','argumentDomElement':'Value must be a DOM element.','invalidExecutorType':'Could not create a valid Sys.Net.WebRequestExecutor from: {0}.','cannotCallBeforeResponse':'Cannot call {0} when responseAvailable is false.','actualValue':'Actual value was {0}.','enumInvalidValue':'\'{0}\' is not a valid value for enum {1}.','scriptLoadFailed':'The script \'{0}\' could not be loaded.','parameterCount':'Parameter count mismatch.','cannotDeserializeEmptyString':'Cannot deserialize empty string.','formatInvalidString':'Input string was not in a correct format.','invalidTimeout':'Value must be greater than or equal to zero.','cannotAbortBeforeStart':'Cannot abort when executor has not started.','argument':'Value does not fall within the expected range.','cannotDeserializeInvalidJson':'Cannot deserialize. The data does not correspond to valid JSON.','invalidHttpVerb':'httpVerb cannot be set to an empty or null string.','nullWebRequest':'Cannot call executeRequest with a null webRequest.','eventHandlerInvalid':'Handler was not added through the Sys.UI.DomEvent.addHandler method.','cannotSerializeNonFiniteNumbers':'Cannot serialize non finite numbers.','argumentUndefined':'Value cannot be undefined.','webServiceInvalidReturnType':'The server method \'{0}\' returned an invalid type. Expected type: {1}','servicePathNotSet':'The path to the web service has not been set.','argumentTypeWithTypes':'Object of type \'{0}\' cannot be converted to type \'{1}\'.','cannotCallOnceStarted':'Cannot call {0} once started.','badBaseUrl1':'Base URL does not contain ://.','badBaseUrl2':'Base URL does not contain another /.','badBaseUrl3':'Cannot find last / in base URL.','setExecutorAfterActive':'Cannot set executor after it has become active.','paramName':'Parameter name: {0}','nullReferenceInPath':'Null reference while evaluating data path: \'{0}\'.','cannotCallOutsideHandler':'Cannot call {0} outside of a completed event handler.','cannotSerializeObjectWithCycle':'Cannot serialize object with cyclic reference within child properties.','format':'One of the identified items was in an invalid format.','assertFailedCaller':'Assertion Failed: {0}\r\nat {1}','argumentOutOfRange':'Specified argument was out of the range of valid values.','webServiceTimedOut':'The server method \'{0}\' timed out.','notImplemented':'The method or operation is not implemented.','assertFailed':'Assertion Failed: {0}','invalidOperation':'Operation is not valid due to the current state of the object.','breakIntoDebugger':'{0}\r\n\r\nBreak into debugger?'}; diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcAjax.debug.js b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcAjax.debug.js new file mode 100644 index 0000000..eb68ba7 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcAjax.debug.js @@ -0,0 +1,408 @@ +//!---------------------------------------------------------- +//! Copyright (C) Microsoft Corporation. All rights reserved. +//!---------------------------------------------------------- +//! MicrosoftMvcAjax.js + +Type.registerNamespace('Sys.Mvc'); + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.AjaxOptions + +Sys.Mvc.$create_AjaxOptions = function Sys_Mvc_AjaxOptions() { return {}; } + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.InsertionMode + +Sys.Mvc.InsertionMode = function() { + /// + /// + /// + /// + /// + /// +}; +Sys.Mvc.InsertionMode.prototype = { + replace: 0, + insertBefore: 1, + insertAfter: 2 +} +Sys.Mvc.InsertionMode.registerEnum('Sys.Mvc.InsertionMode', false); + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.AjaxContext + +Sys.Mvc.AjaxContext = function Sys_Mvc_AjaxContext(request, updateTarget, loadingElement, insertionMode) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + this._request = request; + this._updateTarget = updateTarget; + this._loadingElement = loadingElement; + this._insertionMode = insertionMode; +} +Sys.Mvc.AjaxContext.prototype = { + _insertionMode: 0, + _loadingElement: null, + _response: null, + _request: null, + _updateTarget: null, + + get_data: function Sys_Mvc_AjaxContext$get_data() { + /// + if (this._response) { + return this._response.get_responseData(); + } + else { + return null; + } + }, + + get_insertionMode: function Sys_Mvc_AjaxContext$get_insertionMode() { + /// + return this._insertionMode; + }, + + get_loadingElement: function Sys_Mvc_AjaxContext$get_loadingElement() { + /// + return this._loadingElement; + }, + + get_object: function Sys_Mvc_AjaxContext$get_object() { + /// + var executor = this.get_response(); + return (executor) ? executor.get_object() : null; + }, + + get_response: function Sys_Mvc_AjaxContext$get_response() { + /// + return this._response; + }, + set_response: function Sys_Mvc_AjaxContext$set_response(value) { + /// + this._response = value; + return value; + }, + + get_request: function Sys_Mvc_AjaxContext$get_request() { + /// + return this._request; + }, + + get_updateTarget: function Sys_Mvc_AjaxContext$get_updateTarget() { + /// + return this._updateTarget; + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.AsyncHyperlink + +Sys.Mvc.AsyncHyperlink = function Sys_Mvc_AsyncHyperlink() { +} +Sys.Mvc.AsyncHyperlink.handleClick = function Sys_Mvc_AsyncHyperlink$handleClick(anchor, evt, ajaxOptions) { + /// + /// + /// + /// + /// + /// + evt.preventDefault(); + Sys.Mvc.MvcHelpers._asyncRequest(anchor.href, 'post', '', anchor, ajaxOptions); +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.MvcHelpers + +Sys.Mvc.MvcHelpers = function Sys_Mvc_MvcHelpers() { +} +Sys.Mvc.MvcHelpers._serializeSubmitButton = function Sys_Mvc_MvcHelpers$_serializeSubmitButton(element, offsetX, offsetY) { + /// + /// + /// + /// + /// + /// + /// + if (element.disabled) { + return null; + } + var name = element.name; + if (name) { + var tagName = element.tagName.toUpperCase(); + var encodedName = encodeURIComponent(name); + var inputElement = element; + if (tagName === 'INPUT') { + var type = inputElement.type; + if (type === 'submit') { + return encodedName + '=' + encodeURIComponent(inputElement.value); + } + else if (type === 'image') { + return encodedName + '.x=' + offsetX + '&' + encodedName + '.y=' + offsetY; + } + } + else if ((tagName === 'BUTTON') && (name.length) && (inputElement.type === 'submit')) { + return encodedName + '=' + encodeURIComponent(inputElement.value); + } + } + return null; +} +Sys.Mvc.MvcHelpers._serializeForm = function Sys_Mvc_MvcHelpers$_serializeForm(form) { + /// + /// + /// + var formElements = form.elements; + var formBody = new Sys.StringBuilder(); + var count = formElements.length; + for (var i = 0; i < count; i++) { + var element = formElements[i]; + var name = element.name; + if (!name || !name.length) { + continue; + } + var tagName = element.tagName.toUpperCase(); + if (tagName === 'INPUT') { + var inputElement = element; + var type = inputElement.type; + if ((type === 'text') || (type === 'password') || (type === 'hidden') || (((type === 'checkbox') || (type === 'radio')) && element.checked)) { + formBody.append(encodeURIComponent(name)); + formBody.append('='); + formBody.append(encodeURIComponent(inputElement.value)); + formBody.append('&'); + } + } + else if (tagName === 'SELECT') { + var selectElement = element; + var optionCount = selectElement.options.length; + for (var j = 0; j < optionCount; j++) { + var optionElement = selectElement.options[j]; + if (optionElement.selected) { + formBody.append(encodeURIComponent(name)); + formBody.append('='); + formBody.append(encodeURIComponent(optionElement.value)); + formBody.append('&'); + } + } + } + else if (tagName === 'TEXTAREA') { + formBody.append(encodeURIComponent(name)); + formBody.append('='); + formBody.append(encodeURIComponent((element.value))); + formBody.append('&'); + } + } + var additionalInput = form._additionalInput; + if (additionalInput) { + formBody.append(additionalInput); + formBody.append('&'); + } + return formBody.toString(); +} +Sys.Mvc.MvcHelpers._asyncRequest = function Sys_Mvc_MvcHelpers$_asyncRequest(url, verb, body, triggerElement, ajaxOptions) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + if (ajaxOptions.confirm) { + if (!confirm(ajaxOptions.confirm)) { + return; + } + } + if (ajaxOptions.url) { + url = ajaxOptions.url; + } + if (ajaxOptions.httpMethod) { + verb = ajaxOptions.httpMethod; + } + if (body.length > 0 && !body.endsWith('&')) { + body += '&'; + } + body += 'X-Requested-With=XMLHttpRequest'; + var upperCaseVerb = verb.toUpperCase(); + var isGetOrPost = (upperCaseVerb === 'GET' || upperCaseVerb === 'POST'); + if (!isGetOrPost) { + body += '&'; + body += 'X-HTTP-Method-Override=' + upperCaseVerb; + } + var requestBody = ''; + if (upperCaseVerb === 'GET' || upperCaseVerb === 'DELETE') { + if (url.indexOf('?') > -1) { + if (!url.endsWith('&')) { + url += '&'; + } + url += body; + } + else { + url += '?'; + url += body; + } + } + else { + requestBody = body; + } + var request = new Sys.Net.WebRequest(); + request.set_url(url); + if (isGetOrPost) { + request.set_httpVerb(verb); + } + else { + request.set_httpVerb('POST'); + request.get_headers()['X-HTTP-Method-Override'] = upperCaseVerb; + } + request.set_body(requestBody); + if (verb.toUpperCase() === 'PUT') { + request.get_headers()['Content-Type'] = 'application/x-www-form-urlencoded;'; + } + request.get_headers()['X-Requested-With'] = 'XMLHttpRequest'; + var updateElement = null; + if (ajaxOptions.updateTargetId) { + updateElement = $get(ajaxOptions.updateTargetId); + } + var loadingElement = null; + if (ajaxOptions.loadingElementId) { + loadingElement = $get(ajaxOptions.loadingElementId); + } + var ajaxContext = new Sys.Mvc.AjaxContext(request, updateElement, loadingElement, ajaxOptions.insertionMode); + var continueRequest = true; + if (ajaxOptions.onBegin) { + continueRequest = ajaxOptions.onBegin(ajaxContext) !== false; + } + if (loadingElement) { + Sys.UI.DomElement.setVisible(ajaxContext.get_loadingElement(), true); + } + if (continueRequest) { + request.add_completed(Function.createDelegate(null, function(executor) { + Sys.Mvc.MvcHelpers._onComplete(request, ajaxOptions, ajaxContext); + })); + request.invoke(); + } +} +Sys.Mvc.MvcHelpers._onComplete = function Sys_Mvc_MvcHelpers$_onComplete(request, ajaxOptions, ajaxContext) { + /// + /// + /// + /// + /// + /// + ajaxContext.set_response(request.get_executor()); + if (ajaxOptions.onComplete && ajaxOptions.onComplete(ajaxContext) === false) { + return; + } + var statusCode = ajaxContext.get_response().get_statusCode(); + if ((statusCode >= 200 && statusCode < 300) || statusCode === 304 || statusCode === 1223) { + if (statusCode !== 204 && statusCode !== 304 && statusCode !== 1223) { + var contentType = ajaxContext.get_response().getResponseHeader('Content-Type'); + if ((contentType) && (contentType.indexOf('application/x-javascript') !== -1)) { + eval(ajaxContext.get_data()); + } + else { + Sys.Mvc.MvcHelpers.updateDomElement(ajaxContext.get_updateTarget(), ajaxContext.get_insertionMode(), ajaxContext.get_data()); + } + } + if (ajaxOptions.onSuccess) { + ajaxOptions.onSuccess(ajaxContext); + } + } + else { + if (ajaxOptions.onFailure) { + ajaxOptions.onFailure(ajaxContext); + } + } + if (ajaxContext.get_loadingElement()) { + Sys.UI.DomElement.setVisible(ajaxContext.get_loadingElement(), false); + } +} +Sys.Mvc.MvcHelpers.updateDomElement = function Sys_Mvc_MvcHelpers$updateDomElement(target, insertionMode, content) { + /// + /// + /// + /// + /// + /// + if (target) { + switch (insertionMode) { + case Sys.Mvc.InsertionMode.replace: + target.innerHTML = content; + break; + case Sys.Mvc.InsertionMode.insertBefore: + if (content && content.length > 0) { + target.innerHTML = content + target.innerHTML.trimStart(); + } + break; + case Sys.Mvc.InsertionMode.insertAfter: + if (content && content.length > 0) { + target.innerHTML = target.innerHTML.trimEnd() + content; + } + break; + } + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.AsyncForm + +Sys.Mvc.AsyncForm = function Sys_Mvc_AsyncForm() { +} +Sys.Mvc.AsyncForm.handleClick = function Sys_Mvc_AsyncForm$handleClick(form, evt) { + /// + /// + /// + /// + var additionalInput = Sys.Mvc.MvcHelpers._serializeSubmitButton(evt.target, evt.offsetX, evt.offsetY); + form._additionalInput = additionalInput; +} +Sys.Mvc.AsyncForm.handleSubmit = function Sys_Mvc_AsyncForm$handleSubmit(form, evt, ajaxOptions) { + /// + /// + /// + /// + /// + /// + evt.preventDefault(); + var validationCallbacks = form.validationCallbacks; + if (validationCallbacks) { + for (var i = 0; i < validationCallbacks.length; i++) { + var callback = validationCallbacks[i]; + if (!callback()) { + return; + } + } + } + var body = Sys.Mvc.MvcHelpers._serializeForm(form); + Sys.Mvc.MvcHelpers._asyncRequest(form.action, form.method || 'post', body, form, ajaxOptions); +} + + +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'); + +// ---- Do not remove this footer ---- +// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net) +// ----------------------------------- diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcAjax.js b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcAjax.js new file mode 100644 index 0000000..c5a6165 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcAjax.js @@ -0,0 +1,25 @@ +//---------------------------------------------------------- +// Copyright (C) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------- +// MicrosoftMvcAjax.js + +Type.registerNamespace('Sys.Mvc');Sys.Mvc.$create_AjaxOptions=function(){return {};} +Sys.Mvc.InsertionMode=function(){};Sys.Mvc.InsertionMode.prototype = {replace:0,insertBefore:1,insertAfter:2} +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;} +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;}} +Sys.Mvc.AsyncHyperlink=function(){} +Sys.Mvc.AsyncHyperlink.handleClick=function(anchor,evt,ajaxOptions){evt.preventDefault();Sys.Mvc.MvcHelpers.$2(anchor.href,'post','',anchor,ajaxOptions);} +Sys.Mvc.MvcHelpers=function(){} +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;} +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();} +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){ +Sys.Mvc.MvcHelpers.$3($3,$p4,$6);}));$3.invoke();}} +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);}} +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;}}} +Sys.Mvc.AsyncForm=function(){} +Sys.Mvc.AsyncForm.handleClick=function(form,evt){var $0=Sys.Mvc.MvcHelpers.$0(evt.target,evt.offsetX,evt.offsetY);form._additionalInput = $0;} +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);} +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'); +// ---- Do not remove this footer ---- +// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net) +// ----------------------------------- diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcValidation.debug.js b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcValidation.debug.js new file mode 100644 index 0000000..346ba48 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcValidation.debug.js @@ -0,0 +1,883 @@ +//!---------------------------------------------------------- +//! Copyright (C) Microsoft Corporation. All rights reserved. +//!---------------------------------------------------------- +//! MicrosoftMvcValidation.js + + +Type.registerNamespace('Sys.Mvc'); + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.Validation + +Sys.Mvc.$create_Validation = function Sys_Mvc_Validation() { return {}; } + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.JsonValidationField + +Sys.Mvc.$create_JsonValidationField = function Sys_Mvc_JsonValidationField() { return {}; } + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.JsonValidationOptions + +Sys.Mvc.$create_JsonValidationOptions = function Sys_Mvc_JsonValidationOptions() { return {}; } + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.JsonValidationRule + +Sys.Mvc.$create_JsonValidationRule = function Sys_Mvc_JsonValidationRule() { return {}; } + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.ValidationContext + +Sys.Mvc.$create_ValidationContext = function Sys_Mvc_ValidationContext() { return {}; } + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.NumberValidator + +Sys.Mvc.NumberValidator = function Sys_Mvc_NumberValidator() { +} +Sys.Mvc.NumberValidator.create = function Sys_Mvc_NumberValidator$create(rule) { + /// + /// + /// + return Function.createDelegate(new Sys.Mvc.NumberValidator(), new Sys.Mvc.NumberValidator().validate); +} +Sys.Mvc.NumberValidator.prototype = { + + validate: function Sys_Mvc_NumberValidator$validate(value, context) { + /// + /// + /// + /// + /// + if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) { + return true; + } + var n = Number.parseLocale(value); + return (!isNaN(n)); + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.FormContext + +Sys.Mvc.FormContext = function Sys_Mvc_FormContext(formElement, validationSummaryElement) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + this._errors = []; + this.fields = new Array(0); + this._formElement = formElement; + this._validationSummaryElement = validationSummaryElement; + formElement[Sys.Mvc.FormContext._formValidationTag] = this; + if (validationSummaryElement) { + var ulElements = validationSummaryElement.getElementsByTagName('ul'); + if (ulElements.length > 0) { + this._validationSummaryULElement = ulElements[0]; + } + } + this._onClickHandler = Function.createDelegate(this, this._form_OnClick); + this._onSubmitHandler = Function.createDelegate(this, this._form_OnSubmit); +} +Sys.Mvc.FormContext._Application_Load = function Sys_Mvc_FormContext$_Application_Load() { + var allFormOptions = window.mvcClientValidationMetadata; + if (allFormOptions) { + while (allFormOptions.length > 0) { + var thisFormOptions = allFormOptions.pop(); + Sys.Mvc.FormContext._parseJsonOptions(thisFormOptions); + } + } +} +Sys.Mvc.FormContext._getFormElementsWithName = function Sys_Mvc_FormContext$_getFormElementsWithName(formElement, name) { + /// + /// + /// + /// + /// + var allElementsWithNameInForm = []; + var allElementsWithName = document.getElementsByName(name); + for (var i = 0; i < allElementsWithName.length; i++) { + var thisElement = allElementsWithName[i]; + if (Sys.Mvc.FormContext._isElementInHierarchy(formElement, thisElement)) { + Array.add(allElementsWithNameInForm, thisElement); + } + } + return allElementsWithNameInForm; +} +Sys.Mvc.FormContext.getValidationForForm = function Sys_Mvc_FormContext$getValidationForForm(formElement) { + /// + /// + /// + return formElement[Sys.Mvc.FormContext._formValidationTag]; +} +Sys.Mvc.FormContext._isElementInHierarchy = function Sys_Mvc_FormContext$_isElementInHierarchy(parent, child) { + /// + /// + /// + /// + /// + while (child) { + if (parent === child) { + return true; + } + child = child.parentNode; + } + return false; +} +Sys.Mvc.FormContext._parseJsonOptions = function Sys_Mvc_FormContext$_parseJsonOptions(options) { + /// + /// + /// + var formElement = $get(options.FormId); + var validationSummaryElement = (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(options.ValidationSummaryId)) ? $get(options.ValidationSummaryId) : null; + var formContext = new Sys.Mvc.FormContext(formElement, validationSummaryElement); + formContext.enableDynamicValidation(); + formContext.replaceValidationSummary = options.ReplaceValidationSummary; + for (var i = 0; i < options.Fields.length; i++) { + var field = options.Fields[i]; + var fieldElements = Sys.Mvc.FormContext._getFormElementsWithName(formElement, field.FieldName); + var validationMessageElement = (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(field.ValidationMessageId)) ? $get(field.ValidationMessageId) : null; + var fieldContext = new Sys.Mvc.FieldContext(formContext); + Array.addRange(fieldContext.elements, fieldElements); + fieldContext.validationMessageElement = validationMessageElement; + fieldContext.replaceValidationMessageContents = field.ReplaceValidationMessageContents; + for (var j = 0; j < field.ValidationRules.length; j++) { + var rule = field.ValidationRules[j]; + var validator = Sys.Mvc.ValidatorRegistry.getValidator(rule); + if (validator) { + var validation = Sys.Mvc.$create_Validation(); + validation.fieldErrorMessage = rule.ErrorMessage; + validation.validator = validator; + Array.add(fieldContext.validations, validation); + } + } + fieldContext.enableDynamicValidation(); + Array.add(formContext.fields, fieldContext); + } + var registeredValidatorCallbacks = formElement.validationCallbacks; + if (!registeredValidatorCallbacks) { + registeredValidatorCallbacks = []; + formElement.validationCallbacks = registeredValidatorCallbacks; + } + registeredValidatorCallbacks.push(Function.createDelegate(null, function() { + return Sys.Mvc._validationUtil.arrayIsNullOrEmpty(formContext.validate('submit')); + })); + return formContext; +} +Sys.Mvc.FormContext.prototype = { + _onClickHandler: null, + _onSubmitHandler: null, + _submitButtonClicked: null, + _validationSummaryElement: null, + _validationSummaryULElement: null, + _formElement: null, + replaceValidationSummary: false, + + addError: function Sys_Mvc_FormContext$addError(message) { + /// + /// + this.addErrors([ message ]); + }, + + addErrors: function Sys_Mvc_FormContext$addErrors(messages) { + /// + /// + if (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(messages)) { + Array.addRange(this._errors, messages); + this._onErrorCountChanged(); + } + }, + + clearErrors: function Sys_Mvc_FormContext$clearErrors() { + Array.clear(this._errors); + this._onErrorCountChanged(); + }, + + _displayError: function Sys_Mvc_FormContext$_displayError() { + if (this._validationSummaryElement) { + if (this._validationSummaryULElement) { + Sys.Mvc._validationUtil.removeAllChildren(this._validationSummaryULElement); + for (var i = 0; i < this._errors.length; i++) { + var liElement = document.createElement('li'); + Sys.Mvc._validationUtil.setInnerText(liElement, this._errors[i]); + this._validationSummaryULElement.appendChild(liElement); + } + } + Sys.UI.DomElement.removeCssClass(this._validationSummaryElement, Sys.Mvc.FormContext._validationSummaryValidCss); + Sys.UI.DomElement.addCssClass(this._validationSummaryElement, Sys.Mvc.FormContext._validationSummaryErrorCss); + } + }, + + _displaySuccess: function Sys_Mvc_FormContext$_displaySuccess() { + var validationSummaryElement = this._validationSummaryElement; + if (validationSummaryElement) { + var validationSummaryULElement = this._validationSummaryULElement; + if (validationSummaryULElement) { + validationSummaryULElement.innerHTML = ''; + } + Sys.UI.DomElement.removeCssClass(validationSummaryElement, Sys.Mvc.FormContext._validationSummaryErrorCss); + Sys.UI.DomElement.addCssClass(validationSummaryElement, Sys.Mvc.FormContext._validationSummaryValidCss); + } + }, + + enableDynamicValidation: function Sys_Mvc_FormContext$enableDynamicValidation() { + Sys.UI.DomEvent.addHandler(this._formElement, 'click', this._onClickHandler); + Sys.UI.DomEvent.addHandler(this._formElement, 'submit', this._onSubmitHandler); + }, + + _findSubmitButton: function Sys_Mvc_FormContext$_findSubmitButton(element) { + /// + /// + /// + if (element.disabled) { + return null; + } + var tagName = element.tagName.toUpperCase(); + var inputElement = element; + if (tagName === 'INPUT') { + var type = inputElement.type; + if (type === 'submit' || type === 'image') { + return inputElement; + } + } + else if ((tagName === 'BUTTON') && (inputElement.type === 'submit')) { + return inputElement; + } + return null; + }, + + _form_OnClick: function Sys_Mvc_FormContext$_form_OnClick(e) { + /// + /// + this._submitButtonClicked = this._findSubmitButton(e.target); + }, + + _form_OnSubmit: function Sys_Mvc_FormContext$_form_OnSubmit(e) { + /// + /// + var form = e.target; + var submitButton = this._submitButtonClicked; + if (submitButton && submitButton.disableValidation) { + return; + } + var errorMessages = this.validate('submit'); + if (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(errorMessages)) { + e.preventDefault(); + } + }, + + _onErrorCountChanged: function Sys_Mvc_FormContext$_onErrorCountChanged() { + if (!this._errors.length) { + this._displaySuccess(); + } + else { + this._displayError(); + } + }, + + validate: function Sys_Mvc_FormContext$validate(eventName) { + /// + /// + /// + var fields = this.fields; + var errors = []; + for (var i = 0; i < fields.length; i++) { + var field = fields[i]; + if (!field.elements[0].disabled) { + var thisErrors = field.validate(eventName); + if (thisErrors) { + Array.addRange(errors, thisErrors); + } + } + } + if (this.replaceValidationSummary) { + this.clearErrors(); + this.addErrors(errors); + } + return errors; + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.FieldContext + +Sys.Mvc.FieldContext = function Sys_Mvc_FieldContext(formContext) { + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + this._errors = []; + this.elements = new Array(0); + this.validations = new Array(0); + this.formContext = formContext; + this._onBlurHandler = Function.createDelegate(this, this._element_OnBlur); + this._onChangeHandler = Function.createDelegate(this, this._element_OnChange); + this._onInputHandler = Function.createDelegate(this, this._element_OnInput); + this._onPropertyChangeHandler = Function.createDelegate(this, this._element_OnPropertyChange); +} +Sys.Mvc.FieldContext.prototype = { + _onBlurHandler: null, + _onChangeHandler: null, + _onInputHandler: null, + _onPropertyChangeHandler: null, + defaultErrorMessage: null, + formContext: null, + replaceValidationMessageContents: false, + validationMessageElement: null, + + addError: function Sys_Mvc_FieldContext$addError(message) { + /// + /// + this.addErrors([ message ]); + }, + + addErrors: function Sys_Mvc_FieldContext$addErrors(messages) { + /// + /// + if (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(messages)) { + Array.addRange(this._errors, messages); + this._onErrorCountChanged(); + } + }, + + clearErrors: function Sys_Mvc_FieldContext$clearErrors() { + Array.clear(this._errors); + this._onErrorCountChanged(); + }, + + _displayError: function Sys_Mvc_FieldContext$_displayError() { + var validationMessageElement = this.validationMessageElement; + if (validationMessageElement) { + if (this.replaceValidationMessageContents) { + Sys.Mvc._validationUtil.setInnerText(validationMessageElement, this._errors[0]); + } + Sys.UI.DomElement.removeCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageValidCss); + Sys.UI.DomElement.addCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageErrorCss); + } + var elements = this.elements; + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + Sys.UI.DomElement.removeCssClass(element, Sys.Mvc.FieldContext._inputElementValidCss); + Sys.UI.DomElement.addCssClass(element, Sys.Mvc.FieldContext._inputElementErrorCss); + } + }, + + _displaySuccess: function Sys_Mvc_FieldContext$_displaySuccess() { + var validationMessageElement = this.validationMessageElement; + if (validationMessageElement) { + if (this.replaceValidationMessageContents) { + Sys.Mvc._validationUtil.setInnerText(validationMessageElement, ''); + } + Sys.UI.DomElement.removeCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageErrorCss); + Sys.UI.DomElement.addCssClass(validationMessageElement, Sys.Mvc.FieldContext._validationMessageValidCss); + } + var elements = this.elements; + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + Sys.UI.DomElement.removeCssClass(element, Sys.Mvc.FieldContext._inputElementErrorCss); + Sys.UI.DomElement.addCssClass(element, Sys.Mvc.FieldContext._inputElementValidCss); + } + }, + + _element_OnBlur: function Sys_Mvc_FieldContext$_element_OnBlur(e) { + /// + /// + if (e.target[Sys.Mvc.FieldContext._hasTextChangedTag] || e.target[Sys.Mvc.FieldContext._hasValidationFiredTag]) { + this.validate('blur'); + } + }, + + _element_OnChange: function Sys_Mvc_FieldContext$_element_OnChange(e) { + /// + /// + e.target[Sys.Mvc.FieldContext._hasTextChangedTag] = true; + }, + + _element_OnInput: function Sys_Mvc_FieldContext$_element_OnInput(e) { + /// + /// + e.target[Sys.Mvc.FieldContext._hasTextChangedTag] = true; + if (e.target[Sys.Mvc.FieldContext._hasValidationFiredTag]) { + this.validate('input'); + } + }, + + _element_OnPropertyChange: function Sys_Mvc_FieldContext$_element_OnPropertyChange(e) { + /// + /// + if (e.rawEvent.propertyName === 'value') { + e.target[Sys.Mvc.FieldContext._hasTextChangedTag] = true; + if (e.target[Sys.Mvc.FieldContext._hasValidationFiredTag]) { + this.validate('input'); + } + } + }, + + enableDynamicValidation: function Sys_Mvc_FieldContext$enableDynamicValidation() { + var elements = this.elements; + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + if (Sys.Mvc._validationUtil.elementSupportsEvent(element, 'onpropertychange')) { + var compatMode = document.documentMode; + if (compatMode && compatMode >= 8) { + Sys.UI.DomEvent.addHandler(element, 'propertychange', this._onPropertyChangeHandler); + } + } + else { + Sys.UI.DomEvent.addHandler(element, 'input', this._onInputHandler); + } + Sys.UI.DomEvent.addHandler(element, 'change', this._onChangeHandler); + Sys.UI.DomEvent.addHandler(element, 'blur', this._onBlurHandler); + } + }, + + _getErrorString: function Sys_Mvc_FieldContext$_getErrorString(validatorReturnValue, fieldErrorMessage) { + /// + /// + /// + /// + /// + var fallbackErrorMessage = fieldErrorMessage || this.defaultErrorMessage; + if (Boolean.isInstanceOfType(validatorReturnValue)) { + return (validatorReturnValue) ? null : fallbackErrorMessage; + } + if (String.isInstanceOfType(validatorReturnValue)) { + return ((validatorReturnValue).length) ? validatorReturnValue : fallbackErrorMessage; + } + return null; + }, + + _getStringValue: function Sys_Mvc_FieldContext$_getStringValue() { + /// + var elements = this.elements; + return (elements.length > 0) ? elements[0].value : null; + }, + + _markValidationFired: function Sys_Mvc_FieldContext$_markValidationFired() { + var elements = this.elements; + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element[Sys.Mvc.FieldContext._hasValidationFiredTag] = true; + } + }, + + _onErrorCountChanged: function Sys_Mvc_FieldContext$_onErrorCountChanged() { + if (!this._errors.length) { + this._displaySuccess(); + } + else { + this._displayError(); + } + }, + + validate: function Sys_Mvc_FieldContext$validate(eventName) { + /// + /// + /// + var validations = this.validations; + var errors = []; + var value = this._getStringValue(); + for (var i = 0; i < validations.length; i++) { + var validation = validations[i]; + var context = Sys.Mvc.$create_ValidationContext(); + context.eventName = eventName; + context.fieldContext = this; + context.validation = validation; + var retVal = validation.validator(value, context); + var errorMessage = this._getErrorString(retVal, validation.fieldErrorMessage); + if (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(errorMessage)) { + Array.add(errors, errorMessage); + } + } + this._markValidationFired(); + this.clearErrors(); + this.addErrors(errors); + return errors; + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.RangeValidator + +Sys.Mvc.RangeValidator = function Sys_Mvc_RangeValidator(minimum, maximum) { + /// + /// + /// + /// + /// + /// + /// + /// + this._minimum = minimum; + this._maximum = maximum; +} +Sys.Mvc.RangeValidator.create = function Sys_Mvc_RangeValidator$create(rule) { + /// + /// + /// + var min = rule.ValidationParameters['min']; + var max = rule.ValidationParameters['max']; + return Function.createDelegate(new Sys.Mvc.RangeValidator(min, max), new Sys.Mvc.RangeValidator(min, max).validate); +} +Sys.Mvc.RangeValidator.prototype = { + _minimum: null, + _maximum: null, + + validate: function Sys_Mvc_RangeValidator$validate(value, context) { + /// + /// + /// + /// + /// + if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) { + return true; + } + var n = Number.parseLocale(value); + return (!isNaN(n) && this._minimum <= n && n <= this._maximum); + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.RegularExpressionValidator + +Sys.Mvc.RegularExpressionValidator = function Sys_Mvc_RegularExpressionValidator(pattern) { + /// + /// + /// + /// + this._pattern = pattern; +} +Sys.Mvc.RegularExpressionValidator.create = function Sys_Mvc_RegularExpressionValidator$create(rule) { + /// + /// + /// + var pattern = rule.ValidationParameters['pattern']; + return Function.createDelegate(new Sys.Mvc.RegularExpressionValidator(pattern), new Sys.Mvc.RegularExpressionValidator(pattern).validate); +} +Sys.Mvc.RegularExpressionValidator.prototype = { + _pattern: null, + + validate: function Sys_Mvc_RegularExpressionValidator$validate(value, context) { + /// + /// + /// + /// + /// + if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) { + return true; + } + var regExp = new RegExp(this._pattern); + var matches = regExp.exec(value); + return (!Sys.Mvc._validationUtil.arrayIsNullOrEmpty(matches) && matches[0].length === value.length); + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.RequiredValidator + +Sys.Mvc.RequiredValidator = function Sys_Mvc_RequiredValidator() { +} +Sys.Mvc.RequiredValidator.create = function Sys_Mvc_RequiredValidator$create(rule) { + /// + /// + /// + return Function.createDelegate(new Sys.Mvc.RequiredValidator(), new Sys.Mvc.RequiredValidator().validate); +} +Sys.Mvc.RequiredValidator._isRadioInputElement = function Sys_Mvc_RequiredValidator$_isRadioInputElement(element) { + /// + /// + /// + if (element.tagName.toUpperCase() === 'INPUT') { + var inputType = (element.type).toUpperCase(); + if (inputType === 'RADIO') { + return true; + } + } + return false; +} +Sys.Mvc.RequiredValidator._isSelectInputElement = function Sys_Mvc_RequiredValidator$_isSelectInputElement(element) { + /// + /// + /// + if (element.tagName.toUpperCase() === 'SELECT') { + return true; + } + return false; +} +Sys.Mvc.RequiredValidator._isTextualInputElement = function Sys_Mvc_RequiredValidator$_isTextualInputElement(element) { + /// + /// + /// + if (element.tagName.toUpperCase() === 'INPUT') { + var inputType = (element.type).toUpperCase(); + switch (inputType) { + case 'TEXT': + case 'PASSWORD': + case 'FILE': + return true; + } + } + if (element.tagName.toUpperCase() === 'TEXTAREA') { + return true; + } + return false; +} +Sys.Mvc.RequiredValidator._validateRadioInput = function Sys_Mvc_RequiredValidator$_validateRadioInput(elements) { + /// + /// + /// + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + if (element.checked) { + return true; + } + } + return false; +} +Sys.Mvc.RequiredValidator._validateSelectInput = function Sys_Mvc_RequiredValidator$_validateSelectInput(optionElements) { + /// + /// + /// + for (var i = 0; i < optionElements.length; i++) { + var element = optionElements[i]; + if (element.selected) { + if (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(element.value)) { + return true; + } + } + } + return false; +} +Sys.Mvc.RequiredValidator._validateTextualInput = function Sys_Mvc_RequiredValidator$_validateTextualInput(element) { + /// + /// + /// + return (!Sys.Mvc._validationUtil.stringIsNullOrEmpty(element.value)); +} +Sys.Mvc.RequiredValidator.prototype = { + + validate: function Sys_Mvc_RequiredValidator$validate(value, context) { + /// + /// + /// + /// + /// + var elements = context.fieldContext.elements; + if (!elements.length) { + return true; + } + var sampleElement = elements[0]; + if (Sys.Mvc.RequiredValidator._isTextualInputElement(sampleElement)) { + return Sys.Mvc.RequiredValidator._validateTextualInput(sampleElement); + } + if (Sys.Mvc.RequiredValidator._isRadioInputElement(sampleElement)) { + return Sys.Mvc.RequiredValidator._validateRadioInput(elements); + } + if (Sys.Mvc.RequiredValidator._isSelectInputElement(sampleElement)) { + return Sys.Mvc.RequiredValidator._validateSelectInput((sampleElement).options); + } + return true; + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.StringLengthValidator + +Sys.Mvc.StringLengthValidator = function Sys_Mvc_StringLengthValidator(minLength, maxLength) { + /// + /// + /// + /// + /// + /// + /// + /// + this._minLength = minLength; + this._maxLength = maxLength; +} +Sys.Mvc.StringLengthValidator.create = function Sys_Mvc_StringLengthValidator$create(rule) { + /// + /// + /// + var minLength = (rule.ValidationParameters['min'] || 0); + var maxLength = (rule.ValidationParameters['max'] || Number.MAX_VALUE); + return Function.createDelegate(new Sys.Mvc.StringLengthValidator(minLength, maxLength), new Sys.Mvc.StringLengthValidator(minLength, maxLength).validate); +} +Sys.Mvc.StringLengthValidator.prototype = { + _maxLength: 0, + _minLength: 0, + + validate: function Sys_Mvc_StringLengthValidator$validate(value, context) { + /// + /// + /// + /// + /// + if (Sys.Mvc._validationUtil.stringIsNullOrEmpty(value)) { + return true; + } + return (this._minLength <= value.length && value.length <= this._maxLength); + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc._validationUtil + +Sys.Mvc._validationUtil = function Sys_Mvc__validationUtil() { +} +Sys.Mvc._validationUtil.arrayIsNullOrEmpty = function Sys_Mvc__validationUtil$arrayIsNullOrEmpty(array) { + /// + /// + /// + return (!array || !array.length); +} +Sys.Mvc._validationUtil.stringIsNullOrEmpty = function Sys_Mvc__validationUtil$stringIsNullOrEmpty(value) { + /// + /// + /// + return (!value || !value.length); +} +Sys.Mvc._validationUtil.elementSupportsEvent = function Sys_Mvc__validationUtil$elementSupportsEvent(element, eventAttributeName) { + /// + /// + /// + /// + /// + return (eventAttributeName in element); +} +Sys.Mvc._validationUtil.removeAllChildren = function Sys_Mvc__validationUtil$removeAllChildren(element) { + /// + /// + while (element.firstChild) { + element.removeChild(element.firstChild); + } +} +Sys.Mvc._validationUtil.setInnerText = function Sys_Mvc__validationUtil$setInnerText(element, innerText) { + /// + /// + /// + /// + var textNode = document.createTextNode(innerText); + Sys.Mvc._validationUtil.removeAllChildren(element); + element.appendChild(textNode); +} + + +//////////////////////////////////////////////////////////////////////////////// +// Sys.Mvc.ValidatorRegistry + +Sys.Mvc.ValidatorRegistry = function Sys_Mvc_ValidatorRegistry() { + /// + /// +} +Sys.Mvc.ValidatorRegistry.getValidator = function Sys_Mvc_ValidatorRegistry$getValidator(rule) { + /// + /// + /// + var creator = Sys.Mvc.ValidatorRegistry.validators[rule.ValidationType]; + return (creator) ? creator(rule) : null; +} +Sys.Mvc.ValidatorRegistry._getDefaultValidators = function Sys_Mvc_ValidatorRegistry$_getDefaultValidators() { + /// + return { required: Function.createDelegate(null, Sys.Mvc.RequiredValidator.create), length: Function.createDelegate(null, Sys.Mvc.StringLengthValidator.create), regex: Function.createDelegate(null, Sys.Mvc.RegularExpressionValidator.create), range: Function.createDelegate(null, Sys.Mvc.RangeValidator.create), number: Function.createDelegate(null, Sys.Mvc.NumberValidator.create) }; +} + + +Sys.Mvc.NumberValidator.registerClass('Sys.Mvc.NumberValidator'); +Sys.Mvc.FormContext.registerClass('Sys.Mvc.FormContext'); +Sys.Mvc.FieldContext.registerClass('Sys.Mvc.FieldContext'); +Sys.Mvc.RangeValidator.registerClass('Sys.Mvc.RangeValidator'); +Sys.Mvc.RegularExpressionValidator.registerClass('Sys.Mvc.RegularExpressionValidator'); +Sys.Mvc.RequiredValidator.registerClass('Sys.Mvc.RequiredValidator'); +Sys.Mvc.StringLengthValidator.registerClass('Sys.Mvc.StringLengthValidator'); +Sys.Mvc._validationUtil.registerClass('Sys.Mvc._validationUtil'); +Sys.Mvc.ValidatorRegistry.registerClass('Sys.Mvc.ValidatorRegistry'); +Sys.Mvc.FormContext._validationSummaryErrorCss = 'validation-summary-errors'; +Sys.Mvc.FormContext._validationSummaryValidCss = 'validation-summary-valid'; +Sys.Mvc.FormContext._formValidationTag = '__MVC_FormValidation'; +Sys.Mvc.FieldContext._hasTextChangedTag = '__MVC_HasTextChanged'; +Sys.Mvc.FieldContext._hasValidationFiredTag = '__MVC_HasValidationFired'; +Sys.Mvc.FieldContext._inputElementErrorCss = 'input-validation-error'; +Sys.Mvc.FieldContext._inputElementValidCss = 'input-validation-valid'; +Sys.Mvc.FieldContext._validationMessageErrorCss = 'field-validation-error'; +Sys.Mvc.FieldContext._validationMessageValidCss = 'field-validation-valid'; +Sys.Mvc.ValidatorRegistry.validators = Sys.Mvc.ValidatorRegistry._getDefaultValidators(); + +// ---- Do not remove this footer ---- +// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net) +// ----------------------------------- + +// register validation +Sys.Application.add_load(function() { + Sys.Application.remove_load(arguments.callee); + Sys.Mvc.FormContext._Application_Load(); +}); diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcValidation.js b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcValidation.js new file mode 100644 index 0000000..9483492 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/MicrosoftMvcValidation.js @@ -0,0 +1,55 @@ +//---------------------------------------------------------- +// Copyright (C) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------- +// MicrosoftMvcValidation.js + +Type.registerNamespace('Sys.Mvc');Sys.Mvc.$create_Validation=function(){return {};} +Sys.Mvc.$create_JsonValidationField=function(){return {};} +Sys.Mvc.$create_JsonValidationOptions=function(){return {};} +Sys.Mvc.$create_JsonValidationRule=function(){return {};} +Sys.Mvc.$create_ValidationContext=function(){return {};} +Sys.Mvc.NumberValidator=function(){} +Sys.Mvc.NumberValidator.create=function(rule){return Function.createDelegate(new Sys.Mvc.NumberValidator(),new Sys.Mvc.NumberValidator().validate);} +Sys.Mvc.NumberValidator.prototype={validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}var $0=Number.parseLocale(value);return (!isNaN($0));}} +Sys.Mvc.FormContext=function(formElement,validationSummaryElement){this.$5=[];this.fields=new Array(0);this.$9=formElement;this.$7=validationSummaryElement;formElement['__MVC_FormValidation'] = this;if(validationSummaryElement){var $0=validationSummaryElement.getElementsByTagName('ul');if($0.length>0){this.$8=$0[0];}}this.$3=Function.createDelegate(this,this.$D);this.$4=Function.createDelegate(this,this.$E);} +Sys.Mvc.FormContext._Application_Load=function(){var $0=window.mvcClientValidationMetadata;if($0){while($0.length>0){var $1=$0.pop();Sys.Mvc.FormContext.$12($1);}}} +Sys.Mvc.FormContext.$F=function($p0,$p1){var $0=[];var $1=document.getElementsByName($p1);for(var $2=0;$2<$1.length;$2++){var $3=$1[$2];if(Sys.Mvc.FormContext.$10($p0,$3)){Array.add($0,$3);}}return $0;} +Sys.Mvc.FormContext.getValidationForForm=function(formElement){return formElement['__MVC_FormValidation'];} +Sys.Mvc.FormContext.$10=function($p0,$p1){while($p1){if($p0===$p1){return true;}$p1=$p1.parentNode;}return false;} +Sys.Mvc.FormContext.$12=function($p0){var $0=$get($p0.FormId);var $1=(!Sys.Mvc._ValidationUtil.$1($p0.ValidationSummaryId))?$get($p0.ValidationSummaryId):null;var $2=new Sys.Mvc.FormContext($0,$1);$2.enableDynamicValidation();$2.replaceValidationSummary=$p0.ReplaceValidationSummary;for(var $4=0;$4<$p0.Fields.length;$4++){var $5=$p0.Fields[$4];var $6=Sys.Mvc.FormContext.$F($0,$5.FieldName);var $7=(!Sys.Mvc._ValidationUtil.$1($5.ValidationMessageId))?$get($5.ValidationMessageId):null;var $8=new Sys.Mvc.FieldContext($2);Array.addRange($8.elements,$6);$8.validationMessageElement=$7;$8.replaceValidationMessageContents=$5.ReplaceValidationMessageContents;for(var $9=0;$9<$5.ValidationRules.length;$9++){var $A=$5.ValidationRules[$9];var $B=Sys.Mvc.ValidatorRegistry.getValidator($A);if($B){var $C=Sys.Mvc.$create_Validation();$C.fieldErrorMessage=$A.ErrorMessage;$C.validator=$B;Array.add($8.validations,$C);}}$8.enableDynamicValidation();Array.add($2.fields,$8);}var $3=$0.validationCallbacks;if(!$3){$3=[];$0.validationCallbacks = $3;}$3.push(Function.createDelegate(null,function(){ +return Sys.Mvc._ValidationUtil.$0($2.validate('submit'));}));return $2;} +Sys.Mvc.FormContext.prototype={$3:null,$4:null,$6:null,$7:null,$8:null,$9:null,replaceValidationSummary:false,addError:function(message){this.addErrors([message]);},addErrors:function(messages){if(!Sys.Mvc._ValidationUtil.$0(messages)){Array.addRange(this.$5,messages);this.$11();}},clearErrors:function(){Array.clear(this.$5);this.$11();},$A:function(){if(this.$7){if(this.$8){Sys.Mvc._ValidationUtil.$3(this.$8);for(var $0=0;$0=8){Sys.UI.DomEvent.addHandler($2,'propertychange',this.$9);}}else{Sys.UI.DomEvent.addHandler($2,'input',this.$8);}Sys.UI.DomEvent.addHandler($2,'change',this.$7);Sys.UI.DomEvent.addHandler($2,'blur',this.$6);}},$11:function($p0,$p1){var $0=$p1||this.defaultErrorMessage;if(Boolean.isInstanceOfType($p0)){return ($p0)?null:$0;}if(String.isInstanceOfType($p0)){return (($p0).length)?$p0:$0;}return null;},$12:function(){var $0=this.elements;return ($0.length>0)?$0[0].value:null;},$13:function(){var $0=this.elements;for(var $1=0;$1<$0.length;$1++){var $2=$0[$1];$2['__MVC_HasValidationFired'] = true;}},$14:function(){if(!this.$A.length){this.$C();}else{this.$B();}},validate:function(eventName){var $0=this.validations;var $1=[];var $2=this.$12();for(var $3=0;$3<$0.length;$3++){var $4=$0[$3];var $5=Sys.Mvc.$create_ValidationContext();$5.eventName=eventName;$5.fieldContext=this;$5.validation=$4;var $6=$4.validator($2,$5);var $7=this.$11($6,$4.fieldErrorMessage);if(!Sys.Mvc._ValidationUtil.$1($7)){Array.add($1,$7);}}this.$13();this.clearErrors();this.addErrors($1);return $1;}} +Sys.Mvc.RangeValidator=function(minimum,maximum){this.$0=minimum;this.$1=maximum;} +Sys.Mvc.RangeValidator.create=function(rule){var $0=rule.ValidationParameters['min'];var $1=rule.ValidationParameters['max'];return Function.createDelegate(new Sys.Mvc.RangeValidator($0,$1),new Sys.Mvc.RangeValidator($0,$1).validate);} +Sys.Mvc.RangeValidator.prototype={$0:null,$1:null,validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}var $0=Number.parseLocale(value);return (!isNaN($0)&&this.$0<=$0&&$0<=this.$1);}} +Sys.Mvc.RegularExpressionValidator=function(pattern){this.$0=pattern;} +Sys.Mvc.RegularExpressionValidator.create=function(rule){var $0=rule.ValidationParameters['pattern'];return Function.createDelegate(new Sys.Mvc.RegularExpressionValidator($0),new Sys.Mvc.RegularExpressionValidator($0).validate);} +Sys.Mvc.RegularExpressionValidator.prototype={$0:null,validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}var $0=new RegExp(this.$0);var $1=$0.exec(value);return (!Sys.Mvc._ValidationUtil.$0($1)&&$1[0].length===value.length);}} +Sys.Mvc.RequiredValidator=function(){} +Sys.Mvc.RequiredValidator.create=function(rule){return Function.createDelegate(new Sys.Mvc.RequiredValidator(),new Sys.Mvc.RequiredValidator().validate);} +Sys.Mvc.RequiredValidator.$0=function($p0){if($p0.tagName.toUpperCase()==='INPUT'){var $0=($p0.type).toUpperCase();if($0==='RADIO'){return true;}}return false;} +Sys.Mvc.RequiredValidator.$1=function($p0){if($p0.tagName.toUpperCase()==='SELECT'){return true;}return false;} +Sys.Mvc.RequiredValidator.$2=function($p0){if($p0.tagName.toUpperCase()==='INPUT'){var $0=($p0.type).toUpperCase();switch($0){case 'TEXT':case 'PASSWORD':case 'FILE':return true;}}if($p0.tagName.toUpperCase()==='TEXTAREA'){return true;}return false;} +Sys.Mvc.RequiredValidator.$3=function($p0){for(var $0=0;$0<$p0.length;$0++){var $1=$p0[$0];if($1.checked){return true;}}return false;} +Sys.Mvc.RequiredValidator.$4=function($p0){for(var $0=0;$0<$p0.length;$0++){var $1=$p0[$0];if($1.selected){if(!Sys.Mvc._ValidationUtil.$1($1.value)){return true;}}}return false;} +Sys.Mvc.RequiredValidator.$5=function($p0){return (!Sys.Mvc._ValidationUtil.$1($p0.value));} +Sys.Mvc.RequiredValidator.prototype={validate:function(value,context){var $0=context.fieldContext.elements;if(!$0.length){return true;}var $1=$0[0];if(Sys.Mvc.RequiredValidator.$2($1)){return Sys.Mvc.RequiredValidator.$5($1);}if(Sys.Mvc.RequiredValidator.$0($1)){return Sys.Mvc.RequiredValidator.$3($0);}if(Sys.Mvc.RequiredValidator.$1($1)){return Sys.Mvc.RequiredValidator.$4(($1).options);}return true;}} +Sys.Mvc.StringLengthValidator=function(minLength,maxLength){this.$1=minLength;this.$0=maxLength;} +Sys.Mvc.StringLengthValidator.create=function(rule){var $0=(rule.ValidationParameters['min']||0);var $1=(rule.ValidationParameters['max']||Number.MAX_VALUE);return Function.createDelegate(new Sys.Mvc.StringLengthValidator($0,$1),new Sys.Mvc.StringLengthValidator($0,$1).validate);} +Sys.Mvc.StringLengthValidator.prototype={$0:0,$1:0,validate:function(value,context){if(Sys.Mvc._ValidationUtil.$1(value)){return true;}return (this.$1<=value.length&&value.length<=this.$0);}} +Sys.Mvc._ValidationUtil=function(){} +Sys.Mvc._ValidationUtil.$0=function($p0){return (!$p0||!$p0.length);} +Sys.Mvc._ValidationUtil.$1=function($p0){return (!$p0||!$p0.length);} +Sys.Mvc._ValidationUtil.$2=function($p0,$p1){return ($p1 in $p0);} +Sys.Mvc._ValidationUtil.$3=function($p0){while($p0.firstChild){$p0.removeChild($p0.firstChild);}} +Sys.Mvc._ValidationUtil.$4=function($p0,$p1){var $0=document.createTextNode($p1);Sys.Mvc._ValidationUtil.$3($p0);$p0.appendChild($0);} +Sys.Mvc.ValidatorRegistry=function(){} +Sys.Mvc.ValidatorRegistry.getValidator=function(rule){var $0=Sys.Mvc.ValidatorRegistry.validators[rule.ValidationType];return ($0)?$0(rule):null;} +Sys.Mvc.ValidatorRegistry.$0=function(){return {required:Function.createDelegate(null,Sys.Mvc.RequiredValidator.create),length:Function.createDelegate(null,Sys.Mvc.StringLengthValidator.create),regex:Function.createDelegate(null,Sys.Mvc.RegularExpressionValidator.create),range:Function.createDelegate(null,Sys.Mvc.RangeValidator.create),number:Function.createDelegate(null,Sys.Mvc.NumberValidator.create)};} +Sys.Mvc.NumberValidator.registerClass('Sys.Mvc.NumberValidator');Sys.Mvc.FormContext.registerClass('Sys.Mvc.FormContext');Sys.Mvc.FieldContext.registerClass('Sys.Mvc.FieldContext');Sys.Mvc.RangeValidator.registerClass('Sys.Mvc.RangeValidator');Sys.Mvc.RegularExpressionValidator.registerClass('Sys.Mvc.RegularExpressionValidator');Sys.Mvc.RequiredValidator.registerClass('Sys.Mvc.RequiredValidator');Sys.Mvc.StringLengthValidator.registerClass('Sys.Mvc.StringLengthValidator');Sys.Mvc._ValidationUtil.registerClass('Sys.Mvc._ValidationUtil');Sys.Mvc.ValidatorRegistry.registerClass('Sys.Mvc.ValidatorRegistry');Sys.Mvc.ValidatorRegistry.validators=Sys.Mvc.ValidatorRegistry.$0(); +// ---- Do not remove this footer ---- +// Generated using Script# v0.5.0.0 (http://projects.nikhilk.net) +// ----------------------------------- +Sys.Application.add_load(function(){Sys.Application.remove_load(arguments.callee);Sys.Mvc.FormContext._Application_Load();}); \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/jquery-1.5.1-vsdoc.js b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/jquery-1.5.1-vsdoc.js new file mode 100644 index 0000000..8f56f29 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Scripts/jquery-1.5.1-vsdoc.js @@ -0,0 +1,9110 @@ +/* + * This file has been commented to support Visual Studio Intellisense. + * You should not use this file at runtime inside the browser--it is only + * intended to be used only for design-time IntelliSense. Please use the + * standard jQuery library for all production use. + * + * Comment version: 1.5.1 + */ + +/*! + * Note: While Microsoft is not the author of this file, Microsoft is + * offering you a license subject to the terms of the Microsoft Software + * License Terms for Microsoft ASP.NET Model View Controller 3. + * Microsoft reserves all other rights. The notices below are provided + * for informational purposes only and are not the license terms under + * which Microsoft distributed this file. + * + * jQuery JavaScript Library v1.5.1 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + /// + /// 1: $(expression, context) - This function accepts a string containing a CSS selector which is then used to match a set of elements. + /// 2: $(html) - Create DOM elements on-the-fly from the provided String of raw HTML. + /// 3: $(elements) - Wrap jQuery functionality around a single or multiple DOM Element(s). + /// 4: $(callback) - A shorthand for $(document).ready(). + /// 5: $() - As of jQuery 1.4, if you pass no arguments in to the jQuery() method, an empty jQuery set will be returned. + /// + /// + /// 1: expression - An expression to search with. + /// 2: html - A string of HTML to create on the fly. + /// 3: elements - DOM element(s) to be encapsulated by a jQuery object. + /// 4: callback - The function to execute when the DOM is ready. + /// + /// + /// 1: context - A DOM Element, Document or jQuery to use as context. + /// + /// + + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, + + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + rwhite = /\s/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for non-word characters + rnonword = /\W/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // Has the ready events already been bound? + readyBound = false, + + // The functions to execute on DOM ready + readyList = [], + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = "body"; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $("TAG") + } else if ( !context && !rnonword.test( selector ) ) { + this.selector = selector; + this.context = document; + selector = document.getElementsByTagName( selector ); + return jQuery.merge( this, selector ); + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return (context || rootjQuery).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return jQuery( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.4.4", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + /// + /// The number of elements currently matched. + /// Part of Core + /// + /// + + return this.length; + }, + + toArray: function() { + /// + /// Retrieve all the DOM elements contained in the jQuery set, as an array. + /// + /// + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + /// + /// Access a single matched element. num is used to access the + /// Nth element matched. + /// Part of Core + /// + /// + /// + /// Access the element in the Nth position. + /// + + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + /// + /// Set the jQuery object to an array of elements, while maintaining + /// the stack. + /// Part of Core + /// + /// + /// + /// An array of elements + /// + + // Build a new jQuery matched element set + var ret = jQuery(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + /// + /// Execute a function within the context of every matched element. + /// This means that every time the passed-in function is executed + /// (which is once for every element matched) the 'this' keyword + /// points to the specific element. + /// Additionally, the function, when executed, is passed a single + /// argument representing the position of the element in the matched + /// set. + /// Part of Core + /// + /// + /// + /// A function to execute + /// + + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + /// + /// Binds a function to be executed whenever the DOM is ready to be traversed and manipulated. + /// + /// The function to be executed when the DOM is ready. + + // Attach the listeners + jQuery.bindReady(); + + // If the DOM is already ready + if ( jQuery.isReady ) { + // Execute the function immediately + fn.call( document, jQuery ); + + // Otherwise, remember the function for later + } else if ( readyList ) { + // Add the function to the wait list + readyList.push( fn ); + } + + return this; + }, + + eq: function( i ) { + /// + /// Reduce the set of matched elements to a single element. + /// The position of the element in the set of matched elements + /// starts at 0 and goes to length - 1. + /// Part of Core + /// + /// + /// + /// pos The index of the element that you wish to limit to. + /// + + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + /// + /// Reduce the set of matched elements to the first in the set. + /// + /// + + return this.eq( 0 ); + }, + + last: function() { + /// + /// Reduce the set of matched elements to the final one in the set. + /// + /// + + return this.eq( -1 ); + }, + + slice: function() { + /// + /// Selects a subset of the matched elements. Behaves exactly like the built-in Array slice method. + /// + /// Where to start the subset (0-based). + /// Where to end the subset (not including the end element itself). + /// If omitted, ends at the end of the selection + /// The sliced elements + + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + /// + /// This member is internal. + /// + /// + /// + + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + /// + /// End the most recent 'destructive' operation, reverting the list of matched elements + /// back to its previous state. After an end operation, the list of matched elements will + /// revert to the last state of matched elements. + /// If there was no destructive operation before, an empty set is returned. + /// Part of DOM/Traversing + /// + /// + + return this.prevObject || jQuery(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + /// + /// Extend one object with one or more others, returning the original, + /// modified, object. This is a great utility for simple inheritance. + /// jQuery.extend(settings, options); + /// var settings = jQuery.extend({}, defaults, options); + /// Part of JavaScript + /// + /// + /// The object to extend + /// + /// + /// The object that will be merged into the first. + /// + /// + /// (optional) More objects to merge into the first + /// + /// + + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + /// + /// Run this function to give control of the $ variable back + /// to whichever library first implemented it. This helps to make + /// sure that jQuery doesn't conflict with the $ object + /// of other libraries. + /// By using this function, you will only be able to access jQuery + /// using the 'jQuery' variable. For example, where you used to do + /// $("div p"), you now must do jQuery("div p"). + /// Part of Core + /// + /// + + window.$ = _$; + + if ( deep ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + /// + /// This method is internal. + /// + /// + + // A third-party is pushing the ready event forwards + if ( wait === true ) { + jQuery.readyWait--; + } + + // Make sure that the DOM is not already loaded + if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + if ( readyList ) { + // Execute all of them + var fn, + i = 0, + ready = readyList; + + // Reset the list of functions + readyList = null; + + while ( (fn = ready[ i++ ]) ) { + fn.call( document, jQuery ); + } + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).unbind( "ready" ); + } + } + } + }, + + bindReady: function() { + if ( readyBound ) { + return; + } + + readyBound = true; + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent("onreadystatechange", DOMContentLoaded); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + /// + /// Determines if the parameter passed is a function. + /// + /// The object to check + /// True if the parameter is a function; otherwise false. + + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + /// + /// Determine if the parameter passed is an array. + /// + /// Object to test whether or not it is an array. + /// True if the parameter is a function; otherwise false. + + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + /// + /// Check to see if an object is a plain object (created using "{}" or "new Object"). + /// + /// + /// The object that will be checked to see if it's a plain object. + /// + /// + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + /// + /// Check to see if an object is empty (contains no properties). + /// + /// + /// The object that will be checked to see if it's empty. + /// + /// + + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test(data.replace(rvalidescape, "@") + .replace(rvalidtokens, "]") + .replace(rvalidbraces, "")) ) { + + // Try to use the native JSON parser first + return window.JSON && window.JSON.parse ? + window.JSON.parse( data ) : + (new Function("return " + data))(); + + } else { + jQuery.error( "Invalid JSON: " + data ); + } + }, + + noop: function() { + /// + /// An empty function. + /// + /// + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + /// + /// Internally evaluates a script in a global context. + /// + /// + + if ( data && rnotwhite.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + + if ( jQuery.support.scriptEval ) { + script.appendChild( document.createTextNode( data ) ); + } else { + script.text = data; + } + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + /// + /// Checks whether the specified element has the specified DOM node name. + /// + /// The element to examine + /// The node name to check + /// True if the specified node name matches the node's DOM node name; otherwise false + + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + /// + /// A generic iterator function, which can be used to seemlessly + /// iterate over both objects and arrays. This function is not the same + /// as $().each() - which is used to iterate, exclusively, over a jQuery + /// object. This function can be used to iterate over anything. + /// The callback has two arguments:the key (objects) or index (arrays) as first + /// the first, and the value as the second. + /// Part of JavaScript + /// + /// + /// The object, or array, to iterate over. + /// + /// + /// The function that will be executed on every object. + /// + /// + + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction(object); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + /// + /// Turns anything into a true array. This is an internal method. + /// + /// Anything to turn into an actual Array + /// + /// + + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type(array); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + /// + /// Merge two arrays together, removing all duplicates. + /// The new array is: All the results from the first array, followed + /// by the unique results from the second array. + /// Part of JavaScript + /// + /// + /// + /// The first array to merge. + /// + /// + /// The second array to merge. + /// + + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + /// + /// Filter items out of an array, by using a filter function. + /// The specified function will be passed two arguments: The + /// current array item and the index of the item in the array. The + /// function must return 'true' to keep the item in the array, + /// false to remove it. + /// }); + /// Part of JavaScript + /// + /// + /// + /// array The Array to find items in. + /// + /// + /// The function to process each item against. + /// + /// + /// Invert the selection - select the opposite of the function. + /// + + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + /// + /// Translate all items in an array to another array of items. + /// The translation function that is provided to this method is + /// called for each item in the array and is passed one argument: + /// The item to be translated. + /// The function can then return the translated value, 'null' + /// (to remove the item), or an array of values - which will + /// be flattened into the full array. + /// Part of JavaScript + /// + /// + /// + /// array The Array to translate. + /// + /// + /// The function to process each item against. + /// + + var ret = [], value; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, length = elems.length; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + proxy: function( fn, proxy, thisObject ) { + /// + /// Takes a function and returns a new one that will always have a particular scope. + /// + /// + /// The function whose scope will be changed. + /// + /// + /// The object to which the scope of the function should be set. + /// + /// + + if ( arguments.length === 2 ) { + if ( typeof proxy === "string" ) { + thisObject = fn; + fn = thisObject[ proxy ]; + proxy = undefined; + + } else if ( proxy && !jQuery.isFunction( proxy ) ) { + thisObject = proxy; + proxy = undefined; + } + } + + if ( !proxy && fn ) { + proxy = function() { + return fn.apply( thisObject || this, arguments ); + }; + } + + // Set the guid of unique handler to the same of original handler, so it can be removed + if ( fn ) { + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + } + + // So proxy can be declared as an argument + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can be optionally by executed if its a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return (new Date()).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + /// + /// Determines the index of the first parameter in the array. + /// + /// The value to see if it exists in the array. + /// The array to look through for the value + /// The 0-based index of the item if it was found, otherwise -1. + + return indexOf.call( array, elem ); + }; +} + +// Verify that \s matches non-breaking spaces +// (IE fails on this test) +if ( !rwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +// Expose jQuery to the global object +return (window.jQuery = window.$ = jQuery); + +})(); + + + +// [vsdoc] The following function has been modified for IntelliSense. +// [vsdoc] Stubbing support properties to "false" for IntelliSense compat. +(function() { + + jQuery.support = {}; + + // var root = document.documentElement, + // script = document.createElement("script"), + // div = document.createElement("div"), + // id = "script" + jQuery.now(); + + // div.style.display = "none"; + // div.innerHTML = "
a"; + + // var all = div.getElementsByTagName("*"), + // a = div.getElementsByTagName("a")[0], + // select = document.createElement("select"), + // opt = select.appendChild( document.createElement("option") ); + + // // Can't get basic test support + // if ( !all || !all.length || !a ) { + // return; + // } + + jQuery.support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: false, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: false, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: false, + + // Get the style information from getAttribute + // (IE uses .cssText insted) + style: false, + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: false, + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: false, + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: false, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: false, + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: false, + + // Will be defined later + deleteExpando: false, + optDisabled: false, + checkClone: false, + scriptEval: false, + noCloneEvent: false, + boxModel: false, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableHiddenOffsets: true + }; + + // // Make sure that the options inside disabled selects aren't marked as disabled + // // (WebKit marks them as diabled) + // select.disabled = true; + // jQuery.support.optDisabled = !opt.disabled; + + // script.type = "text/javascript"; + // try { + // script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); + // } catch(e) {} + + // root.insertBefore( script, root.firstChild ); + + // // Make sure that the execution of code works by injecting a script + // // tag with appendChild/createTextNode + // // (IE doesn't support this, fails, and uses .text instead) + // if ( window[ id ] ) { + // jQuery.support.scriptEval = true; + // delete window[ id ]; + // } + + // // Test to see if it's possible to delete an expando from an element + // // Fails in Internet Explorer + // try { + // delete script.test; + + // } catch(e) { + // jQuery.support.deleteExpando = false; + // } + + // root.removeChild( script ); + + // if ( div.attachEvent && div.fireEvent ) { + // div.attachEvent("onclick", function click() { + // // Cloning a node shouldn't copy over any + // // bound event handlers (IE does this) + // jQuery.support.noCloneEvent = false; + // div.detachEvent("onclick", click); + // }); + // div.cloneNode(true).fireEvent("onclick"); + // } + + // div = document.createElement("div"); + // div.innerHTML = ""; + + // var fragment = document.createDocumentFragment(); + // fragment.appendChild( div.firstChild ); + + // // WebKit doesn't clone checked state correctly in fragments + // jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; + + // // Figure out if the W3C box model works as expected + // // document.body must exist before we can do this + // jQuery(function() { + // var div = document.createElement("div"); + // div.style.width = div.style.paddingLeft = "1px"; + + // document.body.appendChild( div ); + // jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; + + // if ( "zoom" in div.style ) { + // // Check if natively block-level elements act like inline-block + // // elements when setting their display to 'inline' and giving + // // them layout + // // (IE < 8 does this) + // div.style.display = "inline"; + // div.style.zoom = 1; + // jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; + + // // Check if elements with layout shrink-wrap their children + // // (IE 6 does this) + // div.style.display = ""; + // div.innerHTML = "
"; + // jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2; + // } + + // div.innerHTML = "
t
"; + // var tds = div.getElementsByTagName("td"); + + // // Check if table cells still have offsetWidth/Height when they are set + // // to display:none and there are still other visible table cells in a + // // table row; if so, offsetWidth/Height are not reliable for use when + // // determining if an element has been hidden directly using + // // display:none (it is still safe to use offsets if a parent element is + // // hidden; don safety goggles and see bug #4512 for more information). + // // (only IE 8 fails this test) + // jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0; + + // tds[0].style.display = ""; + // tds[1].style.display = "none"; + + // // Check if empty table cells still have offsetWidth/Height + // // (IE < 8 fail this test) + // jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; + // div.innerHTML = ""; + + // document.body.removeChild( div ).style.display = "none"; + // div = tds = null; + // }); + + // // Technique from Juriy Zaytsev + // // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + // var eventSupported = function( eventName ) { + // var el = document.createElement("div"); + // eventName = "on" + eventName; + + // var isSupported = (eventName in el); + // if ( !isSupported ) { + // el.setAttribute(eventName, "return;"); + // isSupported = typeof el[eventName] === "function"; + // } + // el = null; + + // return isSupported; + // }; + + jQuery.support.submitBubbles = false; + jQuery.support.changeBubbles = false; + + // // release memory in IE + // root = script = div = all = a = null; +})(); + + + +var windowData = {}, + rbrace = /^(?:\{.*\}|\[.*\])$/; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + expando: "jQuery" + jQuery.now(), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + data: function( elem, name, data ) { + /// + /// Store arbitrary data associated with the specified element. + /// + /// + /// The DOM element to associate with the data. + /// + /// + /// A string naming the piece of data to set. + /// + /// + /// The new data value. + /// + /// + + if ( !jQuery.acceptData( elem ) ) { + return; + } + + elem = elem == window ? + windowData : + elem; + + var isNode = elem.nodeType, + id = isNode ? elem[ jQuery.expando ] : null, + cache = jQuery.cache, thisCache; + + if ( isNode && !id && typeof name === "string" && data === undefined ) { + return; + } + + // Get the data from the object directly + if ( !isNode ) { + cache = elem; + + // Compute a unique ID for the element + } else if ( !id ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } + + // Avoid generating a new cache unless none exists and we + // want to manipulate it. + if ( typeof name === "object" ) { + if ( isNode ) { + cache[ id ] = jQuery.extend(cache[ id ], name); + + } else { + jQuery.extend( cache, name ); + } + + } else if ( isNode && !cache[ id ] ) { + cache[ id ] = {}; + } + + thisCache = isNode ? cache[ id ] : cache; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) { + thisCache[ name ] = data; + } + + return typeof name === "string" ? thisCache[ name ] : thisCache; + }, + + removeData: function( elem, name ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + elem = elem == window ? + windowData : + elem; + + var isNode = elem.nodeType, + id = isNode ? elem[ jQuery.expando ] : elem, + cache = jQuery.cache, + thisCache = isNode ? cache[ id ] : id; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( thisCache ) { + // Remove the section of cache data + delete thisCache[ name ]; + + // If we've removed all the data, remove the element's cache + if ( isNode && jQuery.isEmptyObject(thisCache) ) { + jQuery.removeData( elem ); + } + } + + // Otherwise, we want to remove all of the element's data + } else { + if ( isNode && jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + + // Completely remove the data cache + } else if ( isNode ) { + delete cache[ id ]; + + // Remove all fields from the object + } else { + for ( var n in elem ) { + delete elem[ n ]; + } + } + } + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + /// + /// Store arbitrary data associated with the matched elements. + /// + /// + /// A string naming the piece of data to set. + /// + /// + /// The new data value. + /// + /// + + var data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + var attr = this[0].attributes, name; + data = jQuery.data( this[0] ); + + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = name.substr( 5 ); + dataAttr( this[0], name, data[ name ] ); + } + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + data = elem.getAttribute( "data-" + key ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + !jQuery.isNaN( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + + + + +jQuery.extend({ + queue: function( elem, type, data ) { + if ( !elem ) { + return; + } + + type = (type || "fx") + "queue"; + var q = jQuery.data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( !data ) { + return q || []; + } + + if ( !q || jQuery.isArray(data) ) { + q = jQuery.data( elem, type, jQuery.makeArray(data) ); + + } else { + q.push( data ); + } + + return q; + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(); + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + /// + /// 1: queue() - Returns a reference to the first element's queue (which is an array of functions). + /// 2: queue(callback) - Adds a new function, to be executed, onto the end of the queue of all matched elements. + /// 3: queue(queue) - Replaces the queue of all matched element with this new queue (the array of functions). + /// + /// The function to add to the queue. + /// + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function( i ) { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + /// + /// Removes a queued function from the front of the queue and executes it. + /// + /// The type of queue to access. + /// + + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + /// + /// Set a timer to delay execution of subsequent items in the queue. + /// + /// + /// An integer indicating the number of milliseconds to delay execution of the next item in the queue. + /// + /// + /// A string containing the name of the queue. Defaults to fx, the standard effects queue. + /// + /// + + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || "fx"; + + return this.queue( type, function() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + + clearQueue: function( type ) { + /// + /// Remove from the queue all items that have not yet been run. + /// + /// + /// A string containing the name of the queue. Defaults to fx, the standard effects queue. + /// + /// + + return this.queue( type || "fx", [] ); + } +}); + + + + +var rclass = /[\n\t]/g, + rspaces = /\s+/, + rreturn = /\r/g, + rspecialurl = /^(?:href|src|style)$/, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rradiocheck = /^(?:radio|checkbox)$/i; + +jQuery.props = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" +}; + +jQuery.fn.extend({ + attr: function( name, value ) { + /// + /// Set a single property to a computed value, on all matched elements. + /// Instead of a value, a function is provided, that computes the value. + /// Part of DOM/Attributes + /// + /// + /// + /// The name of the property to set. + /// + /// + /// A function returning the value to set. + /// + + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name, fn ) { + /// + /// Remove an attribute from each of the matched elements. + /// Part of DOM/Attributes + /// + /// + /// An attribute to remove. + /// + /// + + return this.each(function(){ + jQuery.attr( this, name, "" ); + if ( this.nodeType === 1 ) { + this.removeAttribute( name ); + } + }); + }, + + addClass: function( value ) { + /// + /// Adds the specified class(es) to each of the set of matched elements. + /// Part of DOM/Attributes + /// + /// + /// One or more class names to be added to the class attribute of each matched element. + /// + /// + + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.addClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( value && typeof value === "string" ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className ) { + elem.className = value; + + } else { + var className = " " + elem.className + " ", + setClass = elem.className; + + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { + setClass += " " + classNames[c]; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + /// + /// Removes all or the specified class(es) from the set of matched elements. + /// Part of DOM/Attributes + /// + /// + /// (Optional) A class name to be removed from the class attribute of each matched element. + /// + /// + + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.removeClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + var className = (" " + elem.className + " ").replace(rclass, " "); + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[c] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + /// + /// Add or remove a class from each element in the set of matched elements, depending + /// on either the class's presence or the value of the switch argument. + /// + /// + /// A class name to be toggled for each element in the matched set. + /// + /// + /// A boolean value to determine whether the class should be added or removed. + /// + /// + + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this); + self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspaces ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery.data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + /// + /// Checks the current selection against a class and returns whether at least one selection has a given class. + /// + /// The class to check against + /// True if at least one element in the selection has the class, otherwise false. + + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + /// + /// Set the value of every matched element. + /// Part of DOM/Attributes + /// + /// + /// + /// A string of text or an array of strings to set as the value property of each + /// matched element. + /// + + if ( !arguments.length ) { + var elem = this[0]; + + if ( elem ) { + if ( jQuery.nodeName( elem, "option" ) ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { + return elem.getAttribute("value") === null ? "on" : elem.value; + } + + + // Everything else, we just grab the value + return (elem.value || "").replace(rreturn, ""); + + } + + return undefined; + } + + var isFunction = jQuery.isFunction(value); + + return this.each(function(i) { + var self = jQuery(this), val = value; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call(this, i, self.val()); + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray(val) ) { + val = jQuery.map(val, function (value) { + return value == null ? "" : value + ""; + }); + } + + if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { + this.checked = jQuery.inArray( self.val(), val ) >= 0; + + } else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(val); + + jQuery( "option", this ).each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + this.selectedIndex = -1; + } + + } else { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + /// + /// This method is internal. + /// + /// + + // don't set attributes on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery(elem)[name](value); + } + + var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), + // Whether we are setting (or getting) + set = value !== undefined; + + // Try to normalize/fix the name + name = notxml && jQuery.props[ name ] || name; + + // These attributes require special treatment + var special = rspecialurl.test( name ); + + // Safari mis-reports the default selected property of an option + // Accessing the parent's selectedIndex property fixes it + if ( name === "selected" && !jQuery.support.optSelected ) { + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + + // If applicable, access the attribute via the DOM 0 way + // 'in' checks fail in Blackberry 4.7 #6931 + if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) { + if ( set ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } + + if ( value === null ) { + if ( elem.nodeType === 1 ) { + elem.removeAttribute( name ); + } + + } else { + elem[ name ] = value; + } + } + + // browsers index elements by id/name on forms, give priority to attributes. + if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { + return elem.getAttributeNode( name ).nodeValue; + } + + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + if ( name === "tabIndex" ) { + var attributeNode = elem.getAttributeNode( "tabIndex" ); + + return attributeNode && attributeNode.specified ? + attributeNode.value : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + + return elem[ name ]; + } + + if ( !jQuery.support.style && notxml && name === "style" ) { + if ( set ) { + elem.style.cssText = "" + value; + } + + return elem.style.cssText; + } + + if ( set ) { + // convert the value to a string (all browsers do this but IE) see #1070 + elem.setAttribute( name, "" + value ); + } + + // Ensure that missing attributes return undefined + // Blackberry 4.7 returns "" from getAttribute #6938 + if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) { + return undefined; + } + + var attr = !jQuery.support.hrefNormalized && notxml && special ? + // Some attributes require a special call on IE + elem.getAttribute( name, 2 ) : + elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return attr === null ? undefined : attr; + } +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspace = / /g, + rescape = /[^\w\s.|`]/g, + fcleanup = function( nm ) { + return nm.replace(rescape, "\\$&"); + }, + focusCounts = { focusin: 0, focusout: 0 }; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + /// + /// This method is internal. + /// + /// + + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { + elem = window; + } + + if ( handler === false ) { + handler = returnFalse; + } else if ( !handler ) { + // Fixes bug #7229. Fix recommended by jdalton + return; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery.data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + // Use a key less likely to result in collisions for plain JS objects. + // Fixes bug #7150. + var eventKey = elem.nodeType ? "events" : "__events__", + events = elemData[ eventKey ], + eventHandle = elemData.handle; + + if ( typeof events === "function" ) { + // On plain objects events is a fn that holds the the data + // which prevents this data from being JSON serialized + // the function does not need to be called, it just contains the data + eventHandle = events.handle; + events = events.events; + + } else if ( !events ) { + if ( !elem.nodeType ) { + // On plain objects, create a fn that acts as the holder + // of the values to avoid JSON serialization of event data + elemData[ eventKey ] = elemData = function(){}; + } + + elemData.events = events = {}; + } + + if ( !eventHandle ) { + elemData.handle = eventHandle = function() { + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + return typeof jQuery !== "undefined" && !jQuery.event.triggered ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + if ( !handleObj.guid ) { + handleObj.guid = handler.guid; + } + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for global triggering + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler ) { + /// + /// This method is internal. + /// + /// + + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } + + var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + eventKey = elem.nodeType ? "events" : "__events__", + elemData = jQuery.data( elem ), + events = elemData && elemData[ eventKey ]; + + if ( !elemData || !events ) { + return; + } + + if ( typeof events === "function" ) { + elemData = events; + events = events.events; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( typeof elemData === "function" ) { + jQuery.removeData( elem, eventKey ); + + } else if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem ); + } + } + }, + + // bubbling is internal + trigger: function( event, data, elem /*, bubbling */ ) { + /// + /// This method is internal. + /// + /// + + // Event object or event type + var type = event.type || event, + bubbling = arguments[3]; + + if ( !bubbling ) { + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + jQuery.extend( jQuery.Event(type), event ) : + // Just the event type (string) + jQuery.Event(type); + + if ( type.indexOf("!") >= 0 ) { + event.type = type = type.slice(0, -1); + event.exclusive = true; + } + + // Handle a global trigger + if ( !elem ) { + // Don't bubble custom events when global (to avoid too much overhead) + event.stopPropagation(); + + // Only trigger if we've ever bound an event for it + if ( jQuery.event.global[ type ] ) { + jQuery.each( jQuery.cache, function() { + if ( this.events && this.events[type] ) { + jQuery.event.trigger( event, data, this.handle.elem ); + } + }); + } + } + + // Handle triggering a single element + + // don't do events on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + // Clean up in case it is reused + event.result = undefined; + event.target = elem; + + // Clone the incoming data, if any + data = jQuery.makeArray( data ); + data.unshift( event ); + } + + event.currentTarget = elem; + + // Trigger the event, it is assumed that "handle" is a function + var handle = elem.nodeType ? + jQuery.data( elem, "handle" ) : + (jQuery.data( elem, "__events__" ) || {}).handle; + + if ( handle ) { + handle.apply( elem, data ); + } + + var parent = elem.parentNode || elem.ownerDocument; + + // Trigger an inline bound script + try { + if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { + if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { + event.result = false; + event.preventDefault(); + } + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (inlineError) {} + + if ( !event.isPropagationStopped() && parent ) { + jQuery.event.trigger( event, data, parent, true ); + + } else if ( !event.isDefaultPrevented() ) { + var old, + target = event.target, + targetType = type.replace( rnamespaces, "" ), + isClick = jQuery.nodeName( target, "a" ) && targetType === "click", + special = jQuery.event.special[ targetType ] || {}; + + if ( (!special._default || special._default.call( elem, event ) === false) && + !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { + + try { + if ( target[ targetType ] ) { + // Make sure that we don't accidentally re-trigger the onFOO events + old = target[ "on" + targetType ]; + + if ( old ) { + target[ "on" + targetType ] = null; + } + + jQuery.event.triggered = true; + target[ targetType ](); + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (triggerError) {} + + if ( old ) { + target[ "on" + targetType ] = old; + } + + jQuery.event.triggered = false; + } + } + }, + + handle: function( event ) { + /// + /// This method is internal. + /// + /// + + var all, handlers, namespaces, namespace_re, events, + namespace_sort = [], + args = jQuery.makeArray( arguments ); + + event = args[0] = jQuery.event.fix( event || window.event ); + event.currentTarget = this; + + // Namespaced event handlers + all = event.type.indexOf(".") < 0 && !event.exclusive; + + if ( !all ) { + namespaces = event.type.split("."); + event.type = namespaces.shift(); + namespace_sort = namespaces.slice(0).sort(); + namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.namespace = event.namespace || namespace_sort.join("."); + + events = jQuery.data(this, this.nodeType ? "events" : "__events__"); + + if ( typeof events === "function" ) { + events = events.events; + } + + handlers = (events || {})[ event.type ]; + + if ( events && handlers ) { + // Clone the handlers to prevent manipulation + handlers = handlers.slice(0); + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Filter the functions by class + if ( all || namespace_re.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + } + + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + /// + /// This method is internal. + /// + /// + + if ( event[ jQuery.expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + // Fixes #1925 where srcElement might not be defined either + event.target = event.srcElement || document; + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var doc = document.documentElement, + body = document.body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { + event.which = event.charCode != null ? event.charCode : event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, + liveConvert( handleObj.origType, handleObj.selector ), + jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); + }, + + remove: function( handleObj ) { + jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); + } + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + return new jQuery.Event( src ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + // Event type + } else { + this.type = src; + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + // Check if mouse(over|out) are still within the same parent element + var parent = event.relatedTarget; + + // Firefox sometimes assigns relatedTarget a XUL element + // which we cannot access the parentNode property of + try { + // Traverse up the tree + while ( parent && parent !== this ) { + parent = parent.parentNode; + } + + if ( parent !== this ) { + // set the correct event type + event.type = event.data; + + // handle event if we actually just moused on to a non sub-element + jQuery.event.handle.apply( this, arguments ); + } + + // assuming we've left the element since we most likely mousedover a xul element + } catch(e) { } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( this.nodeName.toLowerCase() !== "form" ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + e.liveFired = undefined; + return trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + e.liveFired = undefined; + return trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var changeFilters, + + getVal = function( elem ) { + var type = elem.type, val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( elem.nodeName.toLowerCase() === "select" ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery.data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery.data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + e.liveFired = undefined; + return jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + beforedeactivate: testChange, + + click: function( e ) { + var elem = e.target, type = elem.type; + + if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { + return testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = elem.type; + + if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + return testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information + beforeactivate: function( e ) { + var elem = e.target; + jQuery.data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return rformElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return rformElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; +} + +function trigger( type, elem, args ) { + args[0].type = type; + return jQuery.event.handle.apply( elem, args ); +} + +// Create "bubbling" focus and blur events +if ( document.addEventListener ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + jQuery.event.special[ fix ] = { + setup: function() { + /// + /// This method is internal. + /// + /// + + if ( focusCounts[fix]++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + /// + /// This method is internal. + /// + /// + + if ( --focusCounts[fix] === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + + function handler( e ) { + e = jQuery.event.fix( e ); + e.type = fix; + return jQuery.event.trigger( e, null, e.target ); + } + }); +} + +// jQuery.each(["bind", "one"], function( i, name ) { +// jQuery.fn[ name ] = function( type, data, fn ) { +// // Handle object literals +// if ( typeof type === "object" ) { +// for ( var key in type ) { +// this[ name ](key, data, type[key], fn); +// } +// return this; +// } + +// if ( jQuery.isFunction( data ) || data === false ) { +// fn = data; +// data = undefined; +// } + +// var handler = name === "one" ? jQuery.proxy( fn, function( event ) { +// jQuery( this ).unbind( event, handler ); +// return fn.apply( this, arguments ); +// }) : fn; + +// if ( type === "unload" && name !== "one" ) { +// this.one( type, data, fn ); + +// } else { +// for ( var i = 0, l = this.length; i < l; i++ ) { +// jQuery.event.add( this[i], type, handler, data ); +// } +// } + +// return this; +// }; +// }); + +jQuery.fn[ "bind" ] = function( type, data, fn ) { + /// + /// Binds a handler to one or more events for each matched element. Can also bind custom events. + /// + /// One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error . + /// Additional data passed to the event handler as event.data + /// A function to bind to the event on each of the set of matched elements. function callback(eventObject) such that this corresponds to the dom element. + + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ "bind" ](key, data, type[key], fn); + } + return this; + } + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + var handler = "bind" === "one" ? jQuery.proxy( fn, function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }) : fn; + + return type === "unload" && "bind" !== "one" ? + this.one( type, data, fn ) : + this.each(function() { + jQuery.event.add( this, type, handler, data ); + }); +}; + +jQuery.fn[ "one" ] = function( type, data, fn ) { + /// + /// Binds a handler to one or more events to be executed exactly once for each matched element. + /// + /// One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error . + /// Additional data passed to the event handler as event.data + /// A function to bind to the event on each of the set of matched elements. function callback(eventObject) such that this corresponds to the dom element. + + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ "one" ](key, data, type[key], fn); + } + return this; + } + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + var handler = "one" === "one" ? jQuery.proxy( fn, function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }) : fn; + + return type === "unload" && "one" !== "one" ? + this.one( type, data, fn ) : + this.each(function() { + jQuery.event.add( this, type, handler, data ); + }); +}; + +jQuery.fn.extend({ + unbind: function( type, fn ) { + /// + /// Unbinds a handler from one or more events for each matched element. + /// + /// One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error . + /// A function to bind to the event on each of the set of matched elements. function callback(eventObject) such that this corresponds to the dom element. + + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + /// + /// Triggers a type of event on every matched element. + /// + /// One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error . + /// Additional data passed to the event handler as additional arguments. + /// This parameter is undocumented. + + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + /// + /// Triggers all bound event handlers on an element for a specific event type without executing the browser's default actions. + /// + /// One or more event types separated by a space. Built-in event type values are: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error . + /// Additional data passed to the event handler as additional arguments. + /// This parameter is undocumented. + + if ( this[0] ) { + var event = jQuery.Event( type ); + event.preventDefault(); + event.stopPropagation(); + jQuery.event.trigger( event, data, this[0] ); + return event.result; + } + }, + + toggle: function( fn ) { + /// + /// Toggles among two or more function calls every other click. + /// + /// The functions among which to toggle execution + + // Save reference to arguments for access in closure + var args = arguments, + i = 1; + + // link all the functions, so any of them can unbind this click handler + while ( i < args.length ) { + jQuery.proxy( fn, args[ i++ ] ); + } + + return this.click( jQuery.proxy( fn, function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + })); + }, + + hover: function( fnOver, fnOut ) { + /// + /// Simulates hovering (moving the mouse on or off of an object). + /// + /// The function to fire when the mouse is moved over a matched element. + /// The function to fire when the mouse is moved off of a matched element. + + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +// jQuery.each(["live", "die"], function( i, name ) { +// jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { +// var type, i = 0, match, namespaces, preType, +// selector = origSelector || this.selector, +// context = origSelector ? this : jQuery( this.context ); + +// if ( typeof types === "object" && !types.preventDefault ) { +// for ( var key in types ) { +// context[ name ]( key, data, types[key], selector ); +// } + +// return this; +// } + +// if ( jQuery.isFunction( data ) ) { +// fn = data; +// data = undefined; +// } + +// types = (types || "").split(" "); + +// while ( (type = types[ i++ ]) != null ) { +// match = rnamespaces.exec( type ); +// namespaces = ""; + +// if ( match ) { +// namespaces = match[0]; +// type = type.replace( rnamespaces, "" ); +// } + +// if ( type === "hover" ) { +// types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); +// continue; +// } + +// preType = type; + +// if ( type === "focus" || type === "blur" ) { +// types.push( liveMap[ type ] + namespaces ); +// type = type + namespaces; + +// } else { +// type = (liveMap[ type ] || type) + namespaces; +// } + +// if ( name === "live" ) { +// // bind live handler +// for ( var j = 0, l = context.length; j < l; j++ ) { +// jQuery.event.add( context[j], "live." + liveConvert( type, selector ), +// { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); +// } + +// } else { +// // unbind live handler +// context.unbind( "live." + liveConvert( type, selector ), fn ); +// } +// } + +// return this; +// }; +// }); + +jQuery.fn[ "live" ] = function( types, data, fn ) { + /// + /// Attach a handler to the event for all elements which match the current selector, now or + /// in the future. + /// + /// + /// A string containing a JavaScript event type, such as "click" or "keydown". + /// + /// + /// A map of data that will be passed to the event handler. + /// + /// + /// A function to execute at the time the event is triggered. + /// + /// + + var type, i = 0; + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + types = (types || "").split( /\s+/ ); + + while ( (type = types[ i++ ]) != null ) { + type = type === "focus" ? "focusin" : // focus --> focusin + type === "blur" ? "focusout" : // blur --> focusout + type === "hover" ? types.push("mouseleave") && "mouseenter" : // hover support + type; + + if ( "live" === "live" ) { + // bind live handler + jQuery( this.context ).bind( liveConvert( type, this.selector ), { + data: data, selector: this.selector, live: type + }, fn ); + + } else { + // unbind live handler + jQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null ); + } + } + + return this; +} + +jQuery.fn[ "die" ] = function( types, data, fn ) { + /// + /// Remove all event handlers previously attached using .live() from the elements. + /// + /// + /// A string containing a JavaScript event type, such as click or keydown. + /// + /// + /// The function that is to be no longer executed. + /// + /// + + var type, i = 0; + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + types = (types || "").split( /\s+/ ); + + while ( (type = types[ i++ ]) != null ) { + type = type === "focus" ? "focusin" : // focus --> focusin + type === "blur" ? "focusout" : // blur --> focusout + type === "hover" ? types.push("mouseleave") && "mouseenter" : // hover support + type; + + if ( "die" === "live" ) { + // bind live handler + jQuery( this.context ).bind( liveConvert( type, this.selector ), { + data: data, selector: this.selector, live: type + }, fn ); + + } else { + // unbind live handler + jQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null ); + } + } + + return this; +} + +function liveHandler( event ) { + var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, + elems = [], + selectors = [], + events = jQuery.data( this, this.nodeType ? "events" : "__events__" ); + + if ( typeof events === "function" ) { + events = events.events; + } + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) + if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) { + return; + } + + if ( event.namespace ) { + namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + close = match[i]; + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) { + elem = close.elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + event.type = handleObj.preType; + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj, level: close.level }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + + if ( maxLevel && match.level > maxLevel ) { + break; + } + + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + ret = match.handleObj.origHandler.apply( match.elem, arguments ); + + if ( ret === false || event.isPropagationStopped() ) { + maxLevel = match.level; + + if ( ret === false ) { + stop = false; + } + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&"); +} + +// jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + +// "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + +// "change select submit keydown keypress keyup error").split(" "), function( i, name ) { + +// // Handle event binding +// jQuery.fn[ name ] = function( data, fn ) { +// if ( fn == null ) { +// fn = data; +// data = null; +// } + +// return arguments.length > 0 ? +// this.bind( name, data, fn ) : +// this.trigger( name ); +// }; + +// if ( jQuery.attrFn ) { +// jQuery.attrFn[ name ] = true; +// } +// }); + +jQuery.fn[ "blur" ] = function( fn ) { + /// + /// 1: blur() - Triggers the blur event of each matched element. + /// 2: blur(fn) - Binds a function to the blur event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "blur", fn ) : this.trigger( "blur" ); +}; + +jQuery.fn[ "focus" ] = function( fn ) { + /// + /// 1: focus() - Triggers the focus event of each matched element. + /// 2: focus(fn) - Binds a function to the focus event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "focus", fn ) : this.trigger( "focus" ); +}; + +jQuery.fn[ "focusin" ] = function( fn ) { + /// + /// Bind an event handler to the "focusin" JavaScript event. + /// + /// + /// A function to execute each time the event is triggered. + /// + /// + + return fn ? this.bind( "focusin", fn ) : this.trigger( "focusin" ); +}; + +jQuery.fn[ "focusout" ] = function( fn ) { + /// + /// Bind an event handler to the "focusout" JavaScript event. + /// + /// + /// A function to execute each time the event is triggered. + /// + /// + + return fn ? this.bind( "focusout", fn ) : this.trigger( "focusout" ); +}; + +jQuery.fn[ "load" ] = function( fn ) { + /// + /// 1: load() - Triggers the load event of each matched element. + /// 2: load(fn) - Binds a function to the load event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "load", fn ) : this.trigger( "load" ); +}; + +jQuery.fn[ "resize" ] = function( fn ) { + /// + /// 1: resize() - Triggers the resize event of each matched element. + /// 2: resize(fn) - Binds a function to the resize event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "resize", fn ) : this.trigger( "resize" ); +}; + +jQuery.fn[ "scroll" ] = function( fn ) { + /// + /// 1: scroll() - Triggers the scroll event of each matched element. + /// 2: scroll(fn) - Binds a function to the scroll event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "scroll", fn ) : this.trigger( "scroll" ); +}; + +jQuery.fn[ "unload" ] = function( fn ) { + /// + /// 1: unload() - Triggers the unload event of each matched element. + /// 2: unload(fn) - Binds a function to the unload event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "unload", fn ) : this.trigger( "unload" ); +}; + +jQuery.fn[ "click" ] = function( fn ) { + /// + /// 1: click() - Triggers the click event of each matched element. + /// 2: click(fn) - Binds a function to the click event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "click", fn ) : this.trigger( "click" ); +}; + +jQuery.fn[ "dblclick" ] = function( fn ) { + /// + /// 1: dblclick() - Triggers the dblclick event of each matched element. + /// 2: dblclick(fn) - Binds a function to the dblclick event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "dblclick", fn ) : this.trigger( "dblclick" ); +}; + +jQuery.fn[ "mousedown" ] = function( fn ) { + /// + /// Binds a function to the mousedown event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "mousedown", fn ) : this.trigger( "mousedown" ); +}; + +jQuery.fn[ "mouseup" ] = function( fn ) { + /// + /// Bind a function to the mouseup event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "mouseup", fn ) : this.trigger( "mouseup" ); +}; + +jQuery.fn[ "mousemove" ] = function( fn ) { + /// + /// Bind a function to the mousemove event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "mousemove", fn ) : this.trigger( "mousemove" ); +}; + +jQuery.fn[ "mouseover" ] = function( fn ) { + /// + /// Bind a function to the mouseover event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "mouseover", fn ) : this.trigger( "mouseover" ); +}; + +jQuery.fn[ "mouseout" ] = function( fn ) { + /// + /// Bind a function to the mouseout event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "mouseout", fn ) : this.trigger( "mouseout" ); +}; + +jQuery.fn[ "mouseenter" ] = function( fn ) { + /// + /// Bind a function to the mouseenter event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "mouseenter", fn ) : this.trigger( "mouseenter" ); +}; + +jQuery.fn[ "mouseleave" ] = function( fn ) { + /// + /// Bind a function to the mouseleave event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "mouseleave", fn ) : this.trigger( "mouseleave" ); +}; + +jQuery.fn[ "change" ] = function( fn ) { + /// + /// 1: change() - Triggers the change event of each matched element. + /// 2: change(fn) - Binds a function to the change event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "change", fn ) : this.trigger( "change" ); +}; + +jQuery.fn[ "select" ] = function( fn ) { + /// + /// 1: select() - Triggers the select event of each matched element. + /// 2: select(fn) - Binds a function to the select event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "select", fn ) : this.trigger( "select" ); +}; + +jQuery.fn[ "submit" ] = function( fn ) { + /// + /// 1: submit() - Triggers the submit event of each matched element. + /// 2: submit(fn) - Binds a function to the submit event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "submit", fn ) : this.trigger( "submit" ); +}; + +jQuery.fn[ "keydown" ] = function( fn ) { + /// + /// 1: keydown() - Triggers the keydown event of each matched element. + /// 2: keydown(fn) - Binds a function to the keydown event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "keydown", fn ) : this.trigger( "keydown" ); +}; + +jQuery.fn[ "keypress" ] = function( fn ) { + /// + /// 1: keypress() - Triggers the keypress event of each matched element. + /// 2: keypress(fn) - Binds a function to the keypress event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "keypress", fn ) : this.trigger( "keypress" ); +}; + +jQuery.fn[ "keyup" ] = function( fn ) { + /// + /// 1: keyup() - Triggers the keyup event of each matched element. + /// 2: keyup(fn) - Binds a function to the keyup event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "keyup", fn ) : this.trigger( "keyup" ); +}; + +jQuery.fn[ "error" ] = function( fn ) { + /// + /// 1: error() - Triggers the error event of each matched element. + /// 2: error(fn) - Binds a function to the error event of each matched element. + /// + /// The function to execute. + /// + + return fn ? this.bind( "error", fn ) : this.trigger( "error" ); +}; + +// Prevent memory leaks in IE +// Window isn't included so as not to unbind existing unload events +// More info: +// - http://isaacschlueter.com/2006/10/msie-memory-leaks/ +if ( window.attachEvent && !window.addEventListener ) { + jQuery(window).bind("unload", function() { + for ( var id in jQuery.cache ) { + if ( jQuery.cache[ id ].handle ) { + // Try/Catch is to handle iframes being unloaded, see #4280 + try { + jQuery.event.remove( jQuery.cache[ id ].handle.elem ); + } catch(e) {} + } + } + }); +} + + +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + /// + /// Removes all duplicate elements from an array of elements. + /// + /// The array to translate + /// The array after translation. + + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var match, + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace(/\\/g, ""); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = context.getElementsByTagName( "*" ); + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var found, item, + filter = Expr.filter[ type ], + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !/\W/.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !/\W/.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + return context.getElementsByTagName( match[1] ); + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace(/\\/g, "") + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace(/\\/g, ""); + }, + + TAG: function( match, curLoop ) { + return match[1].toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1].replace(/\\/g, ""); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + elem.parentNode.selectedIndex; + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + /// + /// Internal use only; use hasClass('class') + /// + /// + + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + return "text" === elem.type; + }, + radio: function( elem ) { + return "radio" === elem.type; + }, + + checkbox: function( elem ) { + return "checkbox" === elem.type; + }, + + file: function( elem ) { + return "file" === elem.type; + }, + password: function( elem ) { + return "password" === elem.type; + }, + + submit: function( elem ) { + return "submit" === elem.type; + }, + + image: function( elem ) { + return "image" === elem.type; + }, + + reset: function( elem ) { + return "reset" === elem.type; + }, + + button: function( elem ) { + return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( "Syntax error, unrecognized expression: " + name ); + } + }, + + CHILD: function( elem, match ) { + var type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + var first = match[2], + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // If the nodes are siblings (or identical) we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// [vsdoc] The following function has been modified for IntelliSense. +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + // var form = document.createElement("div"), + // id = "script" + (new Date()).getTime(), + // root = document.documentElement; + + // form.innerHTML = ""; + + // // Inject it into the root element, check its status, and remove it quickly + // root.insertBefore( form, root.firstChild ); + + // // The workaround has to do additional checks after a getElementById + // // Which slows things down for other browsers (hence the branching) + // if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + // } + + // root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +// [vsdoc] The following function has been modified for IntelliSense. +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + // var div = document.createElement("div"); + // div.appendChild( document.createComment("") ); + + // Make sure no comments are found + // if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + // } + + // Check to see if an attribute returns normalized href attributes + // div.innerHTML = ""; + + // if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + // div.firstChild.getAttribute("href") !== "#" ) { + + // Expr.attrHandle.href = function( elem ) { + // return elem.getAttribute( "href", 2 ); + // }; + // } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Make sure that attribute selectors are quoted + query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + if ( context.nodeType === 9 ) { + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var old = context.getAttribute( "id" ), + nid = old || id; + + if ( !old ) { + context.setAttribute( "id", nid ); + } + + try { + return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra ); + + } catch(pseudoError) { + } finally { + if ( !old ) { + context.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector, + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + if ( matches ) { + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + return matches.call( node, expr ); + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + /// + /// Check to see if a DOM node is within another DOM node. + /// + /// + /// The DOM element that may contain the other element. + /// + /// + /// The DOM node that may be contained by the other element. + /// + /// + + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + /// + /// Check to see if a DOM node is within another DOM node. + /// + /// + /// The DOM element that may contain the other element. + /// + /// + /// The DOM node that may be contained by the other element. + /// + /// + + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + /// + /// Determines if the parameter passed is an XML document. + /// + /// The object to test + /// True if the parameter is an XML document; otherwise false. + + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS; + +jQuery.fn.extend({ + find: function( selector ) { + /// + /// Searches for all elements that match the specified expression. + /// This method is a good way to find additional descendant + /// elements with which to process. + /// All searching is done using a jQuery expression. The expression can be + /// written using CSS 1-3 Selector syntax, or basic XPath. + /// Part of DOM/Traversing + /// + /// + /// + /// An expression to search with. + /// + /// + + var ret = this.pushStack( "", "find", selector ), + length = 0; + + for ( var i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( var n = length; n < ret.length; n++ ) { + for ( var r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + /// + /// Reduce the set of matched elements to those that have a descendant that matches the + /// selector or DOM element. + /// + /// + /// A string containing a selector expression to match elements against. + /// + /// + + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + /// + /// Removes any elements inside the array of elements from the set + /// of matched elements. This method is used to remove one or more + /// elements from a jQuery object. + /// Part of DOM/Traversing + /// + /// + /// A set of elements to remove from the jQuery set of matched elements. + /// + /// + + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + /// + /// Removes all elements from the set of matched elements that do not + /// pass the specified filter. This method is used to narrow down + /// the results of a search. + /// }) + /// Part of DOM/Traversing + /// + /// + /// + /// A function to use for filtering + /// + /// + + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + /// + /// Checks the current selection against an expression and returns true, + /// if at least one element of the selection fits the given expression. + /// Does return false, if no element fits or the expression is not valid. + /// filter(String) is used internally, therefore all rules that apply there + /// apply here, too. + /// Part of DOM/Traversing + /// + /// + /// + /// The expression with which to filter + /// + + return !!selector && jQuery.filter( selector, this ).length > 0; + }, + + closest: function( selectors, context ) { + /// + /// Get a set of elements containing the closest parent element that matches the specified selector, the starting element included. + /// + /// + /// A string containing a selector expression to match elements against. + /// + /// + /// A DOM element within which a matching element may be found. If no context is passed + /// in then the context of the jQuery set will be used instead. + /// + /// + + var ret = [], i, l, cur = this[0]; + + if ( jQuery.isArray( selectors ) ) { + var match, selector, + matches = {}, + level = 1; + + if ( cur && selectors.length ) { + for ( i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[selector] ) { + matches[selector] = jQuery.expr.match.POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[selector]; + + if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { + ret.push({ selector: selector, elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + } + + return ret; + } + + var pos = POS.test( selectors ) ? + jQuery( selectors, context || this.context ) : null; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique(ret) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + /// + /// Searches every matched element for the object and returns + /// the index of the element, if found, starting with zero. + /// Returns -1 if the object wasn't found. + /// Part of Core + /// + /// + /// + /// Object to search for + /// + + if ( !elem || typeof elem === "string" ) { + return jQuery.inArray( this[0], + // If it receives a string, the selector is used + // If it receives nothing, the siblings are used + elem ? jQuery( elem ) : this.parent().children() ); + } + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + /// + /// Adds one or more Elements to the set of matched elements. + /// Part of DOM/Traversing + /// + /// + /// A string containing a selector expression to match additional elements against. + /// + /// + /// Add some elements rooted against the specified context. + /// + /// + + var set = typeof selector === "string" ? + jQuery( selector, context || this.context ) : + jQuery.makeArray( selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + /// + /// Adds the previous selection to the current selection. + /// + /// + + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.fn.parents = function (until, selector) { + /// + /// Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. + /// + /// + /// A string containing a selector expression to match elements against. + /// + /// + return jQuery.dir(elem, "parentNode"); +}; + +jQuery.fn.parentsUntil = function (until, selector) { + /// + /// Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector. + /// + /// + /// A string containing a selector expression to indicate where to stop matching ancestor elements. + /// + /// + return jQuery.dir(elem, "parentNode", until); +}; + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + /// + /// Get all following siblings of each element up to but not including the element matched + /// by the selector. + /// + /// + /// A string containing a selector expression to indicate where to stop matching following + /// sibling elements. + /// + /// + + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + /// + /// Get all preceding siblings of each element up to but not including the element matched + /// by the selector. + /// + /// + /// A string containing a selector expression to indicate where to stop matching preceding + /// sibling elements. + /// + /// + + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call(arguments).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + /// + /// This member is internal only. + /// + /// + + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + /// + /// This member is internal only. + /// + /// + + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + /// + /// This member is internal only. + /// + /// + + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +} + + + + +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /\s]+\/)>/g, + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + @RenderBody() + + diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Views/Web.config b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Views/Web.config new file mode 100644 index 0000000..9f9d128 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Views/Web.config @@ -0,0 +1,60 @@ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Views/_ViewStart.cshtml b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Views/_ViewStart.cshtml new file mode 100644 index 0000000..efda124 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "~/Views/Shared/_Layout.cshtml"; +} \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.Debug.config b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.Debug.config new file mode 100644 index 0000000..2c6dd51 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.Release.config b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.Release.config new file mode 100644 index 0000000..4122d79 --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.config b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.config new file mode 100644 index 0000000..1b4da2a --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/Web.config @@ -0,0 +1,67 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Backup/src/ImageResizer.FluentExtensions.Tests.Web/packages.config b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/packages.config new file mode 100644 index 0000000..eca235e --- /dev/null +++ b/Backup/src/ImageResizer.FluentExtensions.Tests.Web/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ImageResizer.FluentExtensions.sln b/ImageResizer.FluentExtensions.sln index 297fa7c..cf9b858 100644 --- a/ImageResizer.FluentExtensions.sln +++ b/ImageResizer.FluentExtensions.sln @@ -1,14 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions", "src\ImageResizer.FluentExtensions\ImageResizer.FluentExtensions.csproj", "{C3811C42-0118-443B-B0EB-FA82129B8C69}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Tests", "src\ImageResizer.FluentExtensions.Tests\ImageResizer.FluentExtensions.Tests.csproj", "{1ABDEC38-BA6A-4D24-A324-0C0D790413C8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Tests.Web", "src\ImageResizer.FluentExtensions.Tests.Web\ImageResizer.FluentExtensions.Tests.Web.csproj", "{13B6E47F-26DE-431E-BAF7-35BAC532A98D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Mvc", "src\ImageResizer.FluentExtensions.Mvc\ImageResizer.FluentExtensions.Mvc.csproj", "{1C247E1B-9E7C-4C9B-A039-C5DBB3009179}" -EndProject +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{96450540-386F-463B-9905-C496A5440C25}" ProjectSection(SolutionItems) = preProject nuget\ImageResizer.FluentExtensions.Mvc.nuspec = nuget\ImageResizer.FluentExtensions.Mvc.nuspec @@ -20,6 +14,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution src\Version.cs = src\Version.cs EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions", "src\ImageResizer.FluentExtensions\ImageResizer.FluentExtensions.csproj", "{C3811C42-0118-443B-B0EB-FA82129B8C69}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Tests", "src\ImageResizer.FluentExtensions.Tests\ImageResizer.FluentExtensions.Tests.csproj", "{1ABDEC38-BA6A-4D24-A324-0C0D790413C8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Tests.Web", "src\ImageResizer.FluentExtensions.Tests.Web\ImageResizer.FluentExtensions.Tests.Web.csproj", "{13B6E47F-26DE-431E-BAF7-35BAC532A98D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.FluentExtensions.Mvc", "src\ImageResizer.FluentExtensions.Mvc\ImageResizer.FluentExtensions.Mvc.csproj", "{1C247E1B-9E7C-4C9B-A039-C5DBB3009179}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/UpgradeLog.htm b/UpgradeLog.htm new file mode 100644 index 0000000..d4fb557 Binary files /dev/null and b/UpgradeLog.htm differ diff --git a/packages/NUnit.2.6.0.12054/NUnit.2.6.0.12054.nupkg b/packages/NUnit.2.6.0.12054/NUnit.2.6.0.12054.nupkg deleted file mode 100644 index b2bfd12..0000000 Binary files a/packages/NUnit.2.6.0.12054/NUnit.2.6.0.12054.nupkg and /dev/null differ diff --git a/packages/NUnit.2.6.0.12054/lib/nunit.framework.dll b/packages/NUnit.2.6.0.12054/lib/nunit.framework.dll deleted file mode 100644 index eaea9ee..0000000 Binary files a/packages/NUnit.2.6.0.12054/lib/nunit.framework.dll and /dev/null differ diff --git a/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg b/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg new file mode 100644 index 0000000..61e3a5e Binary files /dev/null and b/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg differ diff --git a/packages/NUnit.2.6.3/lib/nunit.framework.dll b/packages/NUnit.2.6.3/lib/nunit.framework.dll new file mode 100644 index 0000000..780727f Binary files /dev/null and b/packages/NUnit.2.6.3/lib/nunit.framework.dll differ diff --git a/packages/NUnit.2.6.0.12054/lib/nunit.framework.xml b/packages/NUnit.2.6.3/lib/nunit.framework.xml similarity index 96% rename from packages/NUnit.2.6.0.12054/lib/nunit.framework.xml rename to packages/NUnit.2.6.3/lib/nunit.framework.xml index 47fadb6..f40847c 100644 --- a/packages/NUnit.2.6.0.12054/lib/nunit.framework.xml +++ b/packages/NUnit.2.6.3/lib/nunit.framework.xml @@ -4,10842 +4,10957 @@ nunit.framework - + - Attribute used to apply a category to a test + The different targets a test action attribute can be applied to - + - The name of the category + Default target, which is determined by where the action attribute is attached - + - Construct attribute for a given category based on - a name. The name may not contain the characters ',', - '+', '-' or '!'. However, this is not checked in the - constructor since it would cause an error to arise at - as the test was loaded without giving a clear indication - of where the problem is located. The error is handled - in NUnitFramework.cs by marking the test as not - runnable. + Target a individual test case - The name of the category - + - Protected constructor uses the Type name as the name - of the category. + Target a suite of test cases - + - The name of the category + Delegate used by tests that execute code and + capture any thrown exception. - + - Used to mark a field for use as a datapoint when executing a theory - within the same fixture that requires an argument of the field's Type. + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. - + - Used to mark an array as containing a set of datapoints to be used - executing a theory within the same fixture that requires an argument - of the Type of the array elements. + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. - + - Attribute used to provide descriptive text about a - test case or fixture. + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + - + - Construct the attribute + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. - Text describing the test + + - + - Gets the test description + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. + The message to initialize the with. + Arguments to be used in formatting the message - + - Enumeration indicating how the expected message parameter is to be used + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. + The message to initialize the with. - - Expect an exact match - - - Expect a message containing the parameter string - - - Match the regular expression provided as a parameter - - - Expect a message that starts with the parameter string - - + - ExpectedExceptionAttribute + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. - - + - Constructor for a non-specific exception + Throws an with the message and arguments + that are passed in. This is used by the other Assert functions. + The message to initialize the with. + Arguments to be used in formatting the message - + - Constructor for a given type of exception + Throws an with the message that is + passed in. This is used by the other Assert functions. - The type of the expected exception + The message to initialize the with. - + - Constructor for a given exception name + Throws an . + This is used by the other Assert functions. - The full name of the expected exception - + - Gets or sets the expected exception type + Throws an with the message and arguments + that are passed in. This causes the test to be reported as ignored. + The message to initialize the with. + Arguments to be used in formatting the message - + - Gets or sets the full Type name of the expected exception + Throws an with the message that is + passed in. This causes the test to be reported as ignored. + The message to initialize the with. - + - Gets or sets the expected message text + Throws an . + This causes the test to be reported as ignored. - + - Gets or sets the user message displayed in case of failure + Throws an with the message and arguments + that are passed in. This causes the test to be reported as inconclusive. + The message to initialize the with. + Arguments to be used in formatting the message - + - Gets or sets the type of match to be performed on the expected message + Throws an with the message that is + passed in. This causes the test to be reported as inconclusive. + The message to initialize the with. - + - Gets the name of a method to be used as an exception handler + Throws an . + This causes the test to be reported as Inconclusive. - + - ExplicitAttribute marks a test or test fixture so that it will - only be run if explicitly executed from the gui or command line - or if it is included by use of a filter. The test will not be - run simply because an enclosing suite is run. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + The actual value to test + A Constraint to be applied - + - Default constructor + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + The actual value to test + A Constraint to be applied + The message that will be displayed on failure - + - Constructor with a reason + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The reason test is marked explicit + The actual value to test + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message - + - The reason test is marked explicit - + Asserts that a condition is true. If the condition is false the method throws + an . +
+ The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message - + - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. + Asserts that a condition is true. If the condition is false the method throws + an . + The evaluated condition + The message to display if the condition is false - + - Constructs the attribute without giving a reason - for ignoring the test. + Asserts that a condition is true. If the condition is false the method throws + an . + The evaluated condition - + - Constructs the attribute giving a reason for ignoring the test + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - The reason for ignoring the test + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied - + - The reason for ignoring a test + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure - + - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Constructor with no included items specified, for use - with named property syntax. + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + The actual value to test + A Constraint to be applied - + - Constructor taking one or more included items + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. - Comma-delimited list of included items + The actual value to test + A Constraint to be applied + The message that will be displayed on failure - + - Name of the item that is needed in order for - a test to run. Multiple itemss may be given, - separated by a comma. + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Name of the item to be excluded. Multiple items - may be given, separated by a comma. + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + A TestDelegate to be executed + A ThrowsConstraint used in the test - + - The reason for including or excluding the test + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + The actual value to test + A Constraint to be applied - + - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + The actual value to test + A Constraint to be applied + The message that will be displayed on failure - + - Constructor with no platforms specified, for use - with named property syntax. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + Used as a synonym for That in rare cases where a private setter + causes a Visual Basic compilation error. + + This method is provided for use by VB developers needing to test + the value of properties with private setters. + + The actual value to test + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Constructor taking one or more platforms + Verifies that a delegate throws a particular exception when called. - Comma-deliminted list of platforms + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. + Verifies that a delegate throws a particular exception when called. + A constraint to be satisfied by the exception + A TestDelegate + The message that will be displayed on failure - + - Constructor with no cultures specified, for use - with named property syntax. + Verifies that a delegate throws a particular exception when called. + A constraint to be satisfied by the exception + A TestDelegate - + - Constructor taking one or more cultures + Verifies that a delegate throws a particular exception when called. - Comma-deliminted list of cultures + The exception Type expected + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Marks a test to use a combinatorial join of any argument data - provided. NUnit will create a test case for every combination of - the arguments provided. This can result in a large number of test - cases and so should be used judiciously. This is the default join - type, so the attribute need not be used except as documentation. + Verifies that a delegate throws a particular exception when called. + The exception Type expected + A TestDelegate + The message that will be displayed on failure - + - PropertyAttribute is used to attach information to a test as a name/value pair.. + Verifies that a delegate throws a particular exception when called. + The exception Type expected + A TestDelegate - + - Construct a PropertyAttribute with a name and string value + Verifies that a delegate throws a particular exception when called. - The name of the property - The property value + Type of the expected exception + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Construct a PropertyAttribute with a name and int value + Verifies that a delegate throws a particular exception when called. - The name of the property - The property value + Type of the expected exception + A TestDelegate + The message that will be displayed on failure - + - Construct a PropertyAttribute with a name and double value + Verifies that a delegate throws a particular exception when called. - The name of the property - The property value + Type of the expected exception + A TestDelegate - + - Constructor for derived classes that set the - property dictionary directly. + Verifies that a delegate throws an exception when called + and returns it. + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Constructor for use by derived classes that use the - name of the type as the property name. Derived classes - must ensure that the Type of the property value is - a standard type supported by the BCL. Any custom - types will cause a serialization Exception when - in the client. + Verifies that a delegate throws an exception when called + and returns it. + A TestDelegate + The message that will be displayed on failure - + - Gets the property dictionary for this attribute + Verifies that a delegate throws an exception when called + and returns it. + A TestDelegate - + - Default constructor + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Marks a test to use pairwise join of any argument data provided. - NUnit will attempt too excercise every pair of argument values at - least once, using as small a number of test cases as it can. With - only two arguments, this is the same as a combinatorial join. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + The expected Exception Type + A TestDelegate + The message that will be displayed on failure - + - Default constructor + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + The expected Exception Type + A TestDelegate - + - Marks a test to use a sequential join of any argument data - provided. NUnit will use arguements for each parameter in - sequence, generating test cases up to the largest number - of argument values provided and using null for any arguments - for which it runs out of values. Normally, this should be - used with the same number of arguments for each parameter. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Default constructor + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + The expected Exception Type + A TestDelegate + The message that will be displayed on failure - + - Summary description for MaxTimeAttribute. + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + The expected Exception Type + A TestDelegate - + - Construct a MaxTimeAttribute, given a time in milliseconds. + Verifies that a delegate does not throw an exception - The maximum elapsed time in milliseconds + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message - + - RandomAttribute is used to supply a set of random values - to a single parameter of a parameterized test. + Verifies that a delegate does not throw an exception. + A TestDelegate + The message that will be displayed on failure - + - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. + Verifies that a delegate does not throw an exception. + A TestDelegate - + - Abstract base class for attributes that apply to parameters - and supply data for the parameter. + Asserts that a condition is true. If the condition is false the method throws + an . + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets the data to be provided to the specified parameter + Asserts that a condition is true. If the condition is false the method throws + an . + The evaluated condition + The message to display in case of failure - + - The collection of data to be returned. Must - be set by any derived attribute classes. - We use an object[] so that the individual - elements may have their type changed in GetData - if necessary. + Asserts that a condition is true. If the condition is false the method throws + an . + The evaluated condition - + - Construct with one argument + Asserts that a condition is true. If the condition is false the method throws + an . - + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct with two arguments + Asserts that a condition is true. If the condition is false the method throws + an . - - + The evaluated condition + The message to display in case of failure - + - Construct with three arguments + Asserts that a condition is true. If the condition is false the method throws + an . - - - + The evaluated condition - + - Construct with an array of arguments - - + Asserts that a condition is false. If the condition is true the method throws + an . +
+ The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message - + - Get the collection of values to be used as arguments - + Asserts that a condition is false. If the condition is true the method throws + an . +
+ The evaluated condition + The message to display in case of failure - + - Construct a set of doubles from 0.0 to 1.0, - specifying only the count. - - + Asserts that a condition is false. If the condition is true the method throws + an . +
+ The evaluated condition - + - Construct a set of doubles from min to max - - - - + Asserts that a condition is false. If the condition is true the method throws + an . +
+ The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a set of ints from min to max - - - - + Asserts that a condition is false. If the condition is true the method throws + an . +
+ The evaluated condition + The message to display in case of failure - + - Get the collection of values to be used as arguments - + Asserts that a condition is false. If the condition is true the method throws + an . +
+ The evaluated condition - + - RangeAttribute is used to supply a range of values to an - individual parameter of a parameterized test. + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a range of ints using default step of 1 + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - - + The object that is to be tested + The message to display in case of failure - + - Construct a range of ints specifying the step size + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - - - + The object that is to be tested - + - Construct a range of longs + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - - - + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a range of doubles + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - - - + The object that is to be tested + The message to display in case of failure - + - Construct a range of floats + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. - - - + The object that is to be tested - + - RepeatAttribute may be applied to test case in order - to run it multiple times. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a RepeatAttribute + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The number of times to run the test + The object that is to be tested + The message to display in case of failure - + - RequiredAddinAttribute may be used to indicate the names of any addins - that must be present in order to run some or all of the tests in an - assembly. If the addin is not loaded, the entire assembly is marked - as NotRunnable. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + The object that is to be tested - + - Initializes a new instance of the class. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The required addin. + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets the name of required addin. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. - The required addin name. + The object that is to be tested + The message to display in case of failure - + - Summary description for SetCultureAttribute. + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + The object that is to be tested - + - Construct given the name of a culture + Verifies that two ints are equal. If they are not, then an + is thrown. - + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Summary description for SetUICultureAttribute. + Verifies that two ints are equal. If they are not, then an + is thrown. + The expected value + The actual value + The message to display in case of failure - + - Construct given the name of a culture + Verifies that two ints are equal. If they are not, then an + is thrown. - + The expected value + The actual value - + - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. + Verifies that two longs are equal. If they are not, then an + is thrown. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - SetUpFixtureAttribute is used to identify a SetUpFixture + Verifies that two longs are equal. If they are not, then an + is thrown. + The expected value + The actual value + The message to display in case of failure - + - Attribute used to mark a static (shared in VB) property - that returns a list of tests. + Verifies that two longs are equal. If they are not, then an + is thrown. + The expected value + The actual value - + - Attribute used to identify a method that is called - immediately after each test is run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - Provide actions to execute before and after tests. + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. + The expected value + The actual value + The message to display in case of failure - + - Executed before each test is run + Verifies that two unsigned ints are equal. If they are not, then an + is thrown. - Provides details about the test that is going to be run. + The expected value + The actual value - + - Executed after each test is run + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. - Provides details about the test that has just been run. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Provides the target for the action attribute + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. - The target for the action attribute + The expected value + The actual value + The message to display in case of failure - + - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. + Verifies that two unsigned longs are equal. If they are not, then an + is thrown. - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - + The expected value + The actual value - + - Descriptive text for this test + Verifies that two decimals are equal. If they are not, then an + is thrown. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. + Verifies that two decimals are equal. If they are not, then an + is thrown. + The expected value + The actual value + The message to display in case of failure - + - The ITestCaseData interface is implemented by a class - that is able to return complete testcases for use by - a parameterized test method. - - NOTE: This interface is used in both the framework - and the core, even though that results in two different - types. However, sharing the source code guarantees that - the various implementations will be compatible and that - the core is able to reflect successfully over the - framework implementations of ITestCaseData. + Verifies that two decimals are equal. If they are not, then an + is thrown. + The expected value + The actual value - + - Gets the argument list to be provided to the test + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets the expected result + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure - + - Indicates whether a result has been specified. - This is necessary because the result may be - null, so it's value cannot be checked. + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual - + - Gets the expected exception Type + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets the FullName of the expected exception + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure - + - Gets the name to be used for the test + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual - + - Gets the description of the test + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. + The value that is expected + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets a value indicating whether this is ignored. + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. - true if ignored; otherwise, false. + The value that is expected + The actual value + The message to display in case of failure - + - Gets a value indicating whether this is explicit. + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. - true if explicit; otherwise, false. + The value that is expected + The actual value - + - Gets the ignore reason. + Verifies that two ints are not equal. If they are equal, then an + is thrown. - The ignore reason. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant + Verifies that two ints are not equal. If they are equal, then an + is thrown. - + The expected value + The actual value + The message to display in case of failure - + - Construct a TestCaseAttribute with a single argument + Verifies that two ints are not equal. If they are equal, then an + is thrown. - + The expected value + The actual value - + - Construct a TestCaseAttribute with a two arguments + Verifies that two longs are not equal. If they are equal, then an + is thrown. - - + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a TestCaseAttribute with a three arguments + Verifies that two longs are not equal. If they are equal, then an + is thrown. - - - + The expected value + The actual value + The message to display in case of failure - + - Gets the list of arguments to a test case + Verifies that two longs are not equal. If they are equal, then an + is thrown. + The expected value + The actual value - + - Gets or sets the expected result. + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. - The result. - - + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + - Gets the expected result. + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. - The result. + The expected value + The actual value + The message to display in case of failure - + - Gets a flag indicating whether an expected - result has been set. + Verifies that two unsigned ints are not equal. If they are equal, then an + is thrown. + The expected value + The actual value - + - Gets a list of categories associated with this test; + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. + The expected value + The actual value + The message to display in case of failure - + - Gets or sets the expected exception. + Verifies that two unsigned longs are not equal. If they are equal, then an + is thrown. - The expected exception. + The expected value + The actual value - + - Gets or sets the name the expected exception. + Verifies that two decimals are not equal. If they are equal, then an + is thrown. - The expected name of the exception. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets or sets the expected message of the expected exception + Verifies that two decimals are not equal. If they are equal, then an + is thrown. - The expected message of the exception. + The expected value + The actual value + The message to display in case of failure - + - Gets or sets the type of match to be performed on the expected message + Verifies that two decimals are not equal. If they are equal, then an + is thrown. + The expected value + The actual value - + - Gets or sets the description. + Verifies that two floats are not equal. If they are equal, then an + is thrown. - The description. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets or sets the name of the test. + Verifies that two floats are not equal. If they are equal, then an + is thrown. - The name of the test. + The expected value + The actual value + The message to display in case of failure - + - Gets or sets the ignored status of the test + Verifies that two floats are not equal. If they are equal, then an + is thrown. + The expected value + The actual value - + - Gets or sets the ignored status of the test + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets or sets the explicit status of the test + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + The expected value + The actual value + The message to display in case of failure - + - Gets or sets the reason for not running the test + Verifies that two doubles are not equal. If they are equal, then an + is thrown. + The expected value + The actual value - + - Gets or sets the reason for not running the test. - Set has the side effect of marking the test as ignored. + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. - The ignore reason. + The value that is expected + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message - + - FactoryAttribute indicates the source to be used to - provide test cases for a test method. + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. + The value that is expected + The actual value + The message to display in case of failure - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. - An array of the names of the factories that will provide data + The value that is expected + The actual value - + - Construct with a Type and name - for use with languages - that don't support params arrays. + Asserts that two objects refer to the same object. If they + are not the same an is thrown. - The Type that will provide data - The name of the method, property or field that will provide data + The expected object + The actual object + The message to display in case of failure + Array of objects to be used in formatting the message - + - The name of a the method, property or fiend to be used as a source + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + The expected object + The actual object + The message to display in case of failure - + - A Type to be used as a source + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + The expected object + The actual object - + - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. + The expected object + The actual object + The message to display in case of failure + Array of objects to be used in formatting the message - - - [TestFixture] - public class ExampleClass - {} - - - + - Default constructor + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. + The expected object + The actual object + The message to display in case of failure - + - Construct with a object[] representing a set of arguments. - In .NET 2.0, the arguments may later be separated into - type arguments and constructor arguments. + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. - + The expected object + The actual object - + - Descriptive text for this fixture + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + The value that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets and sets the category for this fixture. - May be a comma-separated list of categories. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + The value that is to be tested + The message to display in case of failure - + - Gets a list of categories for this fixture + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + The value that is to be tested - + - The arguments originally provided to the attribute + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + The value that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets or sets a value indicating whether this should be ignored. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - true if ignore; otherwise, false. + The value that is to be tested + The message to display in case of failure - + - Gets or sets the ignore reason. May set Ignored as a side effect. + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. - The ignore reason. + The value that is to be tested - + - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. + Assert that a string is empty - that is equal to string.Empty + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Attribute used to identify a method that is - called before any tests in a fixture are run. + Assert that a string is empty - that is equal to string.Empty + The string to be tested + The message to display in case of failure - + - Attribute used to identify a method that is called after - all the tests in a fixture have run. The method is - guaranteed to be called, even if an exception is thrown. + Assert that a string is empty - that is equal to string.Empty + The string to be tested - + - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. + Assert that an array, list or other collection is empty - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - + An array, list or other collection implementing ICollection + The message to display in case of failure + Array of objects to be used in formatting the message - + - Used on a method, marks the test with a timeout value in milliseconds. - The test will be run in a separate thread and is cancelled if the timeout - is exceeded. Used on a method or assembly, sets the default timeout - for all contained test methods. + Assert that an array, list or other collection is empty + An array, list or other collection implementing ICollection + The message to display in case of failure - + - Construct a TimeoutAttribute given a time in milliseconds + Assert that an array, list or other collection is empty - The timeout value in milliseconds + An array, list or other collection implementing ICollection - + - Marks a test that must run in the STA, causing it - to run in a separate thread if necessary. - - On methods, you may also use STAThreadAttribute - to serve the same purpose. + Assert that a string is not empty - that is not equal to string.Empty + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a RequiresSTAAttribute + Assert that a string is not empty - that is not equal to string.Empty + The string to be tested + The message to display in case of failure - + - Marks a test that must run in the MTA, causing it - to run in a separate thread if necessary. - - On methods, you may also use MTAThreadAttribute - to serve the same purpose. + Assert that a string is not empty - that is not equal to string.Empty + The string to be tested - + - Construct a RequiresMTAAttribute + Assert that an array, list or other collection is not empty + An array, list or other collection implementing ICollection + The message to display in case of failure + Array of objects to be used in formatting the message - + - Marks a test that must run on a separate thread. + Assert that an array, list or other collection is not empty + An array, list or other collection implementing ICollection + The message to display in case of failure - + - Construct a RequiresThreadAttribute + Assert that an array, list or other collection is not empty + An array, list or other collection implementing ICollection - + - Construct a RequiresThreadAttribute, specifying the apartment + Assert that a string is either null or equal to string.Empty + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. + Assert that a string is either null or equal to string.Empty + The string to be tested + The message to display in case of failure - + - Construct with the name of the factory - for use with languages - that don't support params arrays. + Assert that a string is either null or equal to string.Empty - The name of the data source to be used + The string to be tested - + - Construct with a Type and name - for use with languages - that don't support params arrays. + Assert that a string is not null or empty - The Type that will provide data - The name of the method, property or field that will provide data + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message - + - The name of a the method, property or fiend to be used as a source + Assert that a string is not null or empty + The string to be tested + The message to display in case of failure - + - A Type to be used as a source + Assert that a string is not null or empty + The string to be tested - + - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message - + - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination + The message to display in case of failure - + - The IConstraintExpression interface is implemented by all - complete and resolvable constraints and expressions. + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination - + - Return the top-level constraint for this expression + Asserts that an object may be assigned a value of a given Type. - + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message - + - Static UnsetObject used to detect derived constraints - failing to set the actual value. + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination + The message to display in case of failure - + - The actual value being tested against a constraint + Asserts that an object may be assigned a value of a given Type. + The expected Type. + The object under examination - + - The display name of this Constraint for use by ToString() + Asserts that an object may not be assigned a value of a given Type. + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message - + - Argument fields used by ToString(); + Asserts that an object may not be assigned a value of a given Type. + The expected Type. + The object under examination + The message to display in case of failure - + - The builder holding this constraint + Asserts that an object may not be assigned a value of a given Type. + The expected Type. + The object under examination - + - Construct a constraint with no arguments + Asserts that an object may not be assigned a value of a given Type. + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a constraint with one argument + Asserts that an object may not be assigned a value of a given Type. + The expected Type. + The object under examination + The message to display in case of failure - + - Construct a constraint with two arguments + Asserts that an object may not be assigned a value of a given Type. + The expected Type. + The object under examination - + - Sets the ConstraintBuilder holding this constraint + Asserts that an object is an instance of a given type. + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Write the failure message to the MessageWriter provided - as an argument. The default implementation simply passes - the constraint and the actual value to the writer, which - then displays the constraint description and the value. - - Constraints that need to provide additional details, - such as where the error occured can override this. + Asserts that an object is an instance of a given type. - The MessageWriter on which to display the message + The expected Type + The object being examined + The message to display in case of failure - + - Test whether the constraint is satisfied by a given value + Asserts that an object is an instance of a given type. - The value to be tested - True for success, false for failure + The expected Type + The object being examined - + - Test whether the constraint is satisfied by an - ActualValueDelegate that returns the value to be tested. - The default implementation simply evaluates the delegate - but derived classes may override it to provide for delayed - processing. + Asserts that an object is an instance of a given type. - An ActualValueDelegate - True for success, false for failure + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Test whether the constraint is satisfied by a given reference. - The default implementation simply dereferences the value but - derived classes may override it to provide for delayed processing. + Asserts that an object is an instance of a given type. - A reference to the value to be tested - True for success, false for failure + The expected Type + The object being examined + The message to display in case of failure - + - Write the constraint description to a MessageWriter + Asserts that an object is an instance of a given type. - The writer on which the description is displayed + The expected Type + The object being examined - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Asserts that an object is an instance of a given type. - The writer on which the actual value is displayed + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. + Asserts that an object is an instance of a given type. - + The expected Type + The object being examined + The message to display in case of failure - + - Returns the string representation of this constraint + Asserts that an object is an instance of a given type. + The expected Type + The object being examined - + - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined + The message to display in case of failure - + - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined - + - Returns a DelayedConstraint with the specified delay time. + Asserts that an object is not an instance of a given type. - The delay in milliseconds. - + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Returns a DelayedConstraint with the specified delay time - and polling interval. + Asserts that an object is not an instance of a given type. - The delay in milliseconds. - The interval at which to test the constraint. - + The expected Type + The object being examined + The message to display in case of failure - + - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined - + - Returns a ConstraintExpression by appending And - to the current constraint. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Returns a ConstraintExpression by appending And - to the current constraint. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined + The message to display in case of failure - + - Returns a ConstraintExpression by appending Or - to the current constraint. + Asserts that an object is not an instance of a given type. + The expected Type + The object being examined - + - Class used to detect any derived constraints - that fail to set the actual value in their - Matches override. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Constructs an AttributeExistsConstraint for a specific attribute Type + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Tests whether the object provides the expected attribute. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - A Type, MethodInfo, or other ICustomAttributeProvider - True if the expected attribute is present, otherwise false + The first value, expected to be greater + The second value, expected to be less - + - Writes the description of the constraint to the specified writer + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - AttributeConstraint tests that a specified attribute is present - on a Type or other provider and that the value of the attribute - satisfies some other constraint. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Abstract base class used for prefixes + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - The base constraint + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct given a base constraint + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Constructs an AttributeConstraint for a specified attriute - Type and base constraint. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - - + The first value, expected to be greater + The second value, expected to be less - + - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Writes a description of the attribute to the specified writer. - + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. +
+ The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Writes the actual value supplied to the specified writer. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Returns a string representation of the constraint. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - BasicConstraint is the abstract base for constraints that - perform a simple comparison to a constant value. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Initializes a new instance of the class. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The expected. - The description. + The first value, expected to be greater + The second value, expected to be less - + - Test whether the constraint is satisfied by a given value + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The value to be tested - True for success, false for failure + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Write the constraint description to a MessageWriter + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. - The writer on which the description is displayed + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - NullConstraint tests that the actual value is null + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Initializes a new instance of the class. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - TrueConstraint tests that the actual value is true + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Initializes a new instance of the class. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - FalseConstraint tests that the actual value is false + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Initializes a new instance of the class. + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - NaNConstraint tests that the actual value is a double or float NaN + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Test that the actual value is an NaN + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - - + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Write the constraint description to a specified writer + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - The first constraint being combined + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - The second constraint being combined + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Construct a BinaryConstraint from two other constraints + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The first constraint - The second constraint + The first value, expected to be less + The second value, expected to be greater - + - AndConstraint succeeds only if both members succeed. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Create an AndConstraint from two other constraints + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The first constraint - The second constraint + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The actual value - True if the constraints both succeeded + The first value, expected to be less + The second value, expected to be greater - + - Write a description for this contraint to a MessageWriter + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The MessageWriter to receive the description + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The writer on which the actual value is displayed + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - OrConstraint succeeds if either member succeeds + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - Create an OrConstraint from two other constraints + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The first constraint - The second constraint + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The actual value - True if either constraint succeeded + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Write a description for this contraint to a MessageWriter + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The MessageWriter to receive the description + The first value, expected to be less + The second value, expected to be greater - + - CollectionConstraint is the abstract base class for - constraints that operate on collections. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct an empty CollectionConstraint + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Construct a CollectionConstraint + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - + The first value, expected to be less + The second value, expected to be greater - + - Determines whether the specified enumerable is empty. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Test whether the constraint is satisfied by a given value + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - The value to be tested - True for success, false for failure + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Protected method to be implemented by derived classes + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - - + The first value, expected to be less + The second value, expected to be greater - + - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct an empty CollectionConstraint + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Construct a CollectionConstraint + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. - + The first value, expected to be less + The second value, expected to be greater - + - Flag the constraint to use the supplied IComparer object. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - The IComparer object to use. - Self. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Flag the constraint to use the supplied IComparer object. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - The IComparer object to use. - Self. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Flag the constraint to use the supplied Comparison object. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - The IComparer object to use. - Self. + The first value, expected to be greater + The second value, expected to be less - + - Flag the constraint to use the supplied IEqualityComparer object. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - The IComparer object to use. - Self. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Flag the constraint to use the supplied IEqualityComparer object. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - The IComparer object to use. - Self. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Compares two collection members for equality + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Return a new CollectionTally for use in making tests + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - The collection to be included in the tally + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Flag the constraint to ignore case and return self. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - EmptyCollectionConstraint tests whether a collection is empty. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Check that the collection is empty + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Write the constraint description to a MessageWriter + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - UniqueItemsConstraint tests whether all the items in a - collection are unique. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Check that all items are unique. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - - - - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + - Write a description of this constraint to a MessageWriter + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less - + - Construct a CollectionContainsConstraint + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Test whether the expected item is contained in the collection + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Write a descripton of the constraint to a MessageWriter + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less - + - CollectionEquivalentCOnstraint is used to determine whether two - collections are equivalent. + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a CollectionEquivalentConstraint + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Test whether two collections are equivalent + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - - + The first value, expected to be greater + The second value, expected to be less - + - Write a description of this constraint to a MessageWriter + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message - + - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure - + - Construct a CollectionSubsetConstraint + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. - The collection that the actual value is expected to be a subset of + The first value, expected to be greater + The second value, expected to be less - + - Test whether the actual collection is a subset of - the expected collection provided. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - - + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Write a description of this constraint to a MessageWriter + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - CollectionOrderedConstraint is used to test whether a collection is ordered. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - Construct a CollectionOrderedConstraint + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Modifies the constraint to use an IComparer and returns self. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Modifies the constraint to use an IComparer<T> and returns self. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - Modifies the constraint to use a Comparison<T> and returns self. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Modifies the constraint to test ordering by the value of - a specified property and returns self. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Test whether the collection is ordered + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - - + The first value, expected to be less + The second value, expected to be greater - + - Write a description of the constraint to a MessageWriter + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Returns the string representation of the constraint. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - If used performs a reverse comparison + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - CollectionTally counts (tallies) the number of - occurences of each object in one or more enumerations. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a CollectionTally object from a comparer and a collection + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Try to remove an object from the tally + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The object to remove - True if successful, false if the object was not found + The first value, expected to be less + The second value, expected to be greater - + - Try to remove a set of objects from the tally + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. - The objects to remove - True if successful, false if any object was not found + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - The number of objects remaining in the tally + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - ComparisonAdapter class centralizes all comparisons of - values in NUnit, adapting to the use of any provided - IComparer, IComparer<T> or Comparison<T> + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - Returns a ComparisonAdapter that wraps an IComparer + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Returns a ComparisonAdapter that wraps an IComparer<T> + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Returns a ComparisonAdapter that wraps a Comparison<T> + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - Compares two objects + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message - + - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure - + - Construct a ComparisonAdapter for an IComparer + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + The first value, expected to be less + The second value, expected to be greater - + - Compares two objects + Asserts that an object is contained in a list. - - - + The expected object + The list to be examined + The message to display in case of failure + Array of objects to be used in formatting the message - + - Construct a default ComparisonAdapter + Asserts that an object is contained in a list. + The expected object + The list to be examined + The message to display in case of failure - + - ComparisonAdapter<T> extends ComparisonAdapter and - allows use of an IComparer<T> or Comparison<T> - to actually perform the comparison. + Asserts that an object is contained in a list. + The expected object + The list to be examined - + - Construct a ComparisonAdapter for an IComparer<T> + Helper for Assert.AreEqual(double expected, double actual, ...) + allowing code generation to work consistently. + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + Array of objects to be used in formatting the message - + - Compare a Type T to an object + Gets the number of assertions executed so far and + resets the counter to zero. - + - Construct a ComparisonAdapter for a Comparison<T> + AssertionHelper is an optional base class for user tests, + allowing the use of shorter names for constraints and + asserts and avoiding conflict with the definition of + , from which it inherits much of its + behavior, in certain mock object frameworks. - + - Compare a Type T to an object + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Abstract base class for constraints that compare values to - determine if one is greater than, equal to or less than - the other. This class supplies the Using modifiers. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - + - ComparisonAdapter to be used in making the comparison + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. - + - Initializes a new instance of the class. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - + - Initializes a new instance of the class. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - + - Modifies the constraint to use an IComparer and returns self + Returns a constraint that tests two items for equality - + - Modifies the constraint to use an IComparer<T> and returns self + Returns a constraint that tests that two references are the same object - + - Modifies the constraint to use a Comparison<T> and returns self + Returns a constraint that tests whether the + actual value is greater than the suppled argument - + - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument - + - ConstraintBuilder maintains the stacks that are used in - processing a ConstraintExpression. An OperatorStack - is used to hold operators that are waiting for their - operands to be reognized. a ConstraintStack holds - input constraints as well as the results of each - operator applied. + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument - + - Initializes a new instance of the class. + Returns a constraint that tests whether the + actual value is less than the suppled argument - + - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument - The operator to push. - + - Appends the specified constraint to the expresson by pushing - it on the constraint stack. + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument - The constraint to push. - + - Sets the top operator right context. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The right context. - + - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The target precedence. - + - Resolves this instance, returning a Constraint. If the builder - is not currently in a resolvable state, an exception is thrown. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The resolved constraint - + - Gets a value indicating whether this instance is resolvable. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - - true if this instance is resolvable; otherwise, false. - - + - OperatorStack is a type-safe stack for holding ConstraintOperators + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - + - Initializes a new instance of the class. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The builder. - + - Pushes the specified operator onto the stack. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The op. - + - Pops the topmost operator from the stack. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - - + - Gets a value indicating whether this is empty. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - true if empty; otherwise, false. - + - Gets the topmost operator without modifying the stack. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The top. - + - ConstraintStack is a type-safe stack for holding Constraints + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. - + - Initializes a new instance of the class. + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. - The builder. - + - Pushes the specified constraint. As a side effect, - the constraint's builder field is set to the - ConstraintBuilder owning this stack. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - The constraint. - + - Pops this topmost constrait from the stack. - As a side effect, the constraint's builder - field is set to null. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - - + - Gets a value indicating whether this is empty. + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. - true if empty; otherwise, false. - + - Gets the topmost constraint without modifying the stack. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - The topmost constraint - + - ConstraintExpression represents a compound constraint in the - process of being constructed from a series of syntactic elements. - - Individual elements are appended to the expression as they are - reognized. Once an actual Constraint is appended, the expression - returns a resolvable Constraint. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - ConstraintExpressionBase is the abstract base class for the - ConstraintExpression class, which represents a - compound constraint in the process of being constructed - from a series of syntactic elements. - - NOTE: ConstraintExpressionBase is separate because the - ConstraintExpression class was generated in earlier - versions of NUnit. The two classes may be combined - in a future version. + Returns a constraint that fails if the actual + value contains the substring supplied as an argument. - + - The ConstraintBuilder holding the elements recognized so far + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - + - Initializes a new instance of the class. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + Returns a constraint that fails if the actual + value starts with the substring supplied as an argument. - The builder. - + - Returns a string representation of the expression as it - currently stands. This should only be used for testing, - since it has the side-effect of resolving the expression. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - - + - Appends an operator to the expression and returns the - resulting expression itself. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - + - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. + Returns a constraint that fails if the actual + value ends with the substring supplied as an argument. - + - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - + - Initializes a new instance of the class. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - + - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. - The builder. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. - + - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Returns a constraint that tests whether the actual value falls + within a specified range. - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + Returns a ConstraintExpression that negates any + following constraint. - + - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. + Returns a ConstraintExpression that negates any + following constraint. - + - Returns a constraint that tests two items for equality + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - + - Returns a constraint that tests that two references are the same object + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Returns a constraint that tests for null - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Returns a constraint that tests for True - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Returns a constraint that tests for False - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a constraint that tests for a positive value - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a constraint that tests for a negative value - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a constraint that tests for NaN - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Returns a constraint that tests for empty - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Returns a constraint that tests whether a collection + contains all unique items. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Returns a constraint that tests whether an object graph is serializable in binary format. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Returns a constraint that tests whether an object graph is serializable in xml format. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Returns a constraint that tests whether a collection is ordered - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to Assert.That. + The actual value to test + A Constraint to be applied - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to Assert.That. + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to Assert.That. + The actual value to test + A Constraint to be applied + The message to be displayed in case of failure + Arguments to use in formatting the message - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . +
+ The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message - + - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + The evaluated condition + The message to display if the condition is false - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to . + The evaluated condition - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + The message that will be displayed on failure - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + The actual value to test + A Constraint to be applied - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + The actual value to test + A Constraint to be applied + The message that will be displayed on failure - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + The actual value to test + A Constraint to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + A TestDelegate to be executed + A ThrowsConstraint used in the test - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Returns a ListMapper based on a collection. + The original collection + - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Provides static methods to express the assumptions + that must be met for a test to give a meaningful + result. If an assumption is not met, the test + should produce an inconclusive result. - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + - + - Returns a constraint that tests whether the actual value falls - within a specified range. + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Returns a ConstraintExpression that negates any - following constraint. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + The actual value to test - + - Returns a ConstraintExpression that negates any - following constraint. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - + Asserts that a condition is true. If the condition is false the method throws + an . +
+ The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Asserts that a condition is true. If the condition is false the method throws + an . + The evaluated condition + The message to display if the condition is false - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Asserts that a condition is true. If the condition is false the + method throws an . + The evaluated condition - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + The message that will be displayed on failure - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message - + - With is currently a NOP - reserved for future use. + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + The actual value to test - + - Returns a constraint that tests for null + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure - + - Returns a constraint that tests for True + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests for False + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + A TestDelegate to be executed + A ThrowsConstraint used in the test - + - Returns a constraint that tests for a positive value + Waits for pending asynchronous operations to complete, if appropriate, + and returns a proper result of the invocation by unwrapping task results + The raw result of the method invocation + The unwrapped result, if necessary - + - Returns a constraint that tests for a negative value + A set of Assert methods operationg on one or more collections - + - Returns a constraint that tests for NaN + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + - + - Returns a constraint that tests for empty + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Returns a constraint that tests whether a collection - contains all unique items. + Asserts that all items contained in collection are of the type specified by expectedType. + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Asserts that all items contained in collection are of the type specified by expectedType. + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of + The message that will be displayed on failure - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Asserts that all items contained in collection are of the type specified by expectedType. + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether a collection is ordered + Asserts that all items contained in collection are not equal to null. + IEnumerable containing objects to be considered - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Asserts that all items contained in collection are not equal to null. + IEnumerable containing objects to be considered + The message that will be displayed on failure - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + Asserts that all items contained in collection are not equal to null. + IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. + Ensures that every object contained in collection exists within the collection + once and only once. + IEnumerable of objects to be considered - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Ensures that every object contained in collection exists within the collection + once and only once. + IEnumerable of objects to be considered + The message that will be displayed on failure - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Ensures that every object contained in collection exists within the collection + once and only once. + IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests two items for equality + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered - + - Returns a constraint that tests that two references are the same object + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Asserts that expected and actual are not exactly equal. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Asserts that expected and actual are not exactly equal. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Asserts that expected and actual are not exactly equal. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Asserts that expected and actual are not equivalent. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Asserts that expected and actual are not equivalent. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Asserts that expected and actual are not equivalent. + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Asserts that collection contains actual as an item. + IEnumerable of objects to be considered + Object to be found within collection - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Asserts that collection contains actual as an item. + IEnumerable of objects to be considered + Object to be found within collection + The message that will be displayed on failure - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Asserts that collection contains actual as an item. + IEnumerable of objects to be considered + Object to be found within collection + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Asserts that collection does not contain actual as an item. + IEnumerable of objects to be considered + Object that cannot exist within collection - + - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. + Asserts that collection does not contain actual as an item. + IEnumerable of objects to be considered + Object that cannot exist within collection + The message that will be displayed on failure - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Asserts that collection does not contain actual as an item. + IEnumerable of objects to be considered + Object that cannot exist within collection + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Asserts that superset is not a subject of subset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + Asserts that superset is not a subject of subset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Asserts that superset is not a subject of subset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Asserts that superset is a subset of subset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + Asserts that superset is a subset of subset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Asserts that superset is a subset of subset. + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Assert that an array, list or other collection is empty + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Assert that an array, list or other collection is empty + An array, list or other collection implementing IEnumerable + The message to be displayed on failure - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Assert that an array,list or other collection is empty + An array, list or other collection implementing IEnumerable - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Assert that an array, list or other collection is empty + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + Assert that an array, list or other collection is empty + An array, list or other collection implementing IEnumerable + The message to be displayed on failure - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Assert that an array,list or other collection is empty + An array, list or other collection implementing IEnumerable - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Assert that an array, list or other collection is ordered + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Assert that an array, list or other collection is ordered + An array, list or other collection implementing IEnumerable + The message to be displayed on failure - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Assert that an array, list or other collection is ordered + An array, list or other collection implementing IEnumerable - + - Returns a ConstraintExpression that negates any - following constraint. + Assert that an array, list or other collection is ordered + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons + The message to be displayed on failure + Arguments to be used in formatting the message - + - Returns a ConstraintExpression that negates any - following constraint. + Assert that an array, list or other collection is ordered + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons + The message to be displayed on failure - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Assert that an array, list or other collection is ordered + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Summary description for DirectoryAssert - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Returns a constraint that tests for null + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. - + - Returns a constraint that tests for True + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Returns a constraint that tests for False + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal - + - Returns a constraint that tests for a positive value + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A directory containing the value that is expected + A directory containing the actual value - + - Returns a constraint that tests for a negative value + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Returns a constraint that tests for NaN + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are not equal - + - Returns a constraint that tests for empty + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A directory path string containing the value that is expected + A directory path string containing the actual value - + - Returns a constraint that tests whether a collection - contains all unique items. + Asserts that two directories are not equal. If they are equal + an is thrown. + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Asserts that two directories are not equal. If they are equal + an is thrown. + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Asserts that two directories are not equal. If they are equal + an is thrown. + A directory containing the value that is expected + A directory containing the actual value - + - Returns a constraint that tests whether a collection is ordered + Asserts that two directories are not equal. If they are equal + an is thrown. + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + Arguments to be used in formatting the message - + - The ConstraintOperator class is used internally by a - ConstraintBuilder to represent an operator that - modifies or combines constraints. - - Constraint operators use left and right precedence - values to determine whether the top operator on the - stack should be reduced before pushing a new operator. + Asserts that two directories are not equal. If they are equal + an is thrown. + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal - + - The precedence value used when the operator - is about to be pushed to the stack. + Asserts that two directories are not equal. If they are equal + an is thrown. + A directory path string containing the value that is expected + A directory path string containing the actual value - + - The precedence value used when the operator - is on the top of the stack. + Asserts that the directory is empty. If it is not empty + an is thrown. + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Asserts that the directory is empty. If it is not empty + an is thrown. - + A directory to search + The message to display if directories are not equal - + - The syntax element preceding this operator + Asserts that the directory is empty. If it is not empty + an is thrown. + A directory to search - + - The syntax element folowing this operator + Asserts that the directory is empty. If it is not empty + an is thrown. + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message - + - The precedence value used when the operator - is about to be pushed to the stack. + Asserts that the directory is empty. If it is not empty + an is thrown. + A directory to search + The message to display if directories are not equal - + - The precedence value used when the operator - is on the top of the stack. + Asserts that the directory is empty. If it is not empty + an is thrown. + A directory to search - + - PrefixOperator takes a single constraint and modifies - it's action in some way. + Asserts that the directory is not empty. If it is empty + an is thrown. + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Asserts that the directory is not empty. If it is empty + an is thrown. - + A directory to search + The message to display if directories are not equal - + - Returns the constraint created by applying this - prefix to another constraint. + Asserts that the directory is not empty. If it is empty + an is thrown. - - + A directory to search - + - Negates the test of the constraint it wraps. + Asserts that the directory is not empty. If it is empty + an is thrown. + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message - + - Constructs a new NotOperator + Asserts that the directory is not empty. If it is empty + an is thrown. + A directory to search + The message to display if directories are not equal - + - Returns a NotConstraint applied to its argument. + Asserts that the directory is not empty. If it is empty + an is thrown. + A directory to search - + - Abstract base for operators that indicate how to - apply a constraint to items in a collection. + Asserts that path contains actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message - + - Constructs a CollectionOperator + Asserts that path contains actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path - + - Represents a constraint that succeeds if all the - members of a collection match a base constraint. + Asserts that path contains actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. + Asserts that path contains actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message - + - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. + Asserts that path contains actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path - + - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. + Asserts that path contains actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + Asserts that path does not contain actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message - + - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. + Asserts that path does not contain actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path - + - Construct an ExactCountOperator for a specified count + Asserts that path does not contain actual as a subdirectory or + an is thrown. - The expected count + A directory to search + sub-directory asserted to exist under directory - + - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. + Asserts that path does not contain actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message - + - Represents a constraint that simply wraps the - constraint provided as an argument, without any - further functionality, but which modifes the - order of evaluation because of its precedence. + Asserts that path does not contain actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path - + - Constructor for the WithOperator + Asserts that path does not contain actual as a subdirectory or + an is thrown. + A directory to search + sub-directory asserted to exist under directory - + - Returns a constraint that wraps its argument + Summary description for FileAssert. - + - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + - + - Operator used to test for the presence of a named Property - on an object and optionally apply further tests to the - value of that property. + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Constructs a PropOperator for a particular named property + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. - + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Gets the name of the property to which the operator applies + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + The expected Stream + The actual Stream + The message to display if objects are not equal - + - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + The expected Stream + The actual Stream - + - Construct an AttributeOperator for a particular Type + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. - The Type of attribute tested + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal - + - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + A file containing the value that is expected + A file containing the actual value - + - Construct a ThrowsOperator + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal - + - Abstract base class for all binary operators + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + The path to a file containing the value that is expected + The path to a file containing the actual value - + - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. + Asserts that two Streams are not equal. If they are equal + an is thrown. - + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message - + - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. + Asserts that two Streams are not equal. If they are equal + an is thrown. + The expected Stream + The actual Stream + The message to be displayed when the Streams are the same. - + - Gets the left precedence of the operator + Asserts that two Streams are not equal. If they are equal + an is thrown. + The expected Stream + The actual Stream - + - Gets the right precedence of the operator + Asserts that two files are not equal. If they are equal + an is thrown. + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Operator that requires both it's arguments to succeed + Asserts that two files are not equal. If they are equal + an is thrown. + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal - + - Construct an AndOperator + Asserts that two files are not equal. If they are equal + an is thrown. + A file containing the value that is expected + A file containing the actual value - + - Apply the operator to produce an AndConstraint + Asserts that two files are not equal. If they are equal + an is thrown. + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message - + - Operator that requires at least one of it's arguments to succeed + Asserts that two files are not equal. If they are equal + an is thrown. + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal - + - Construct an OrOperator + Asserts that two files are not equal. If they are equal + an is thrown. + The path to a file containing the value that is expected + The path to a file containing the actual value - + - Apply the operator to produce an OrConstraint + GlobalSettings is a place for setting default values used + by the framework in performing asserts. - + - ContainsConstraint tests a whether a string contains a substring - or a collection contains an object. It postpones the decision of - which test to use until the type of the actual argument is known. - This allows testing whether a string is contained in a collection - or as a substring of another string using the same syntax. + Default tolerance for floating point equality - + - Initializes a new instance of the class. + Class used to guard against unexpected argument values + by throwing an appropriate exception. - The expected. - + - Test whether the constraint is satisfied by a given value + Throws an exception if an argument is null - The value to be tested - True for success, false for failure + The value to be tested + The name of the argument - + - Write the constraint description to a MessageWriter + Throws an exception if a string argument is null or empty - The writer on which the description is displayed + The value to be tested + The name of the argument - + - Flag the constraint to use the supplied IComparer object. + Helper class with properties and methods that supply + a number of constraints used in Asserts. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied Comparison object. + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - The IComparer object to use. - Self. - + - Flag the constraint to ignore case and return self. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - + - Applies a delay to the match so that a match can be evaluated in the future. + Returns a ConstraintExpression that negates any + following constraint. - + - Creates a new DelayedConstraint + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - The inner constraint two decorate - The time interval after which the match is performed - If the value of is less than 0 - + - Creates a new DelayedConstraint + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - The inner constraint two decorate - The time interval after which the match is performed - The time interval used for polling - If the value of is less than 0 - + - Test whether the constraint is satisfied by a given value + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - The value to be tested - True for if the base constraint fails, false if it succeeds - + - Test whether the constraint is satisfied by a delegate + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - The delegate whose value is to be tested - True for if the base constraint fails, false if it succeeds - + - Test whether the constraint is satisfied by a given reference. - Overridden to wait for the specified delay period before - calling the base constraint with the dereferenced value. + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - A reference to the value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a MessageWriter. + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Interface implemented by a user fixture in order to + validate any expected exceptions. It is only called + for test methods marked with the ExpectedException + attribute. - + - EmptyDirectoryConstraint is used to test that a directory is empty + Method to handle an expected exception + The exception to be handled - + - Test whether the constraint is satisfied by a given value + Helper class with properties and methods that supply + a number of constraints used in Asserts. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a constraint that tests two items for equality - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Returns a constraint that tests that two references are the same object - The writer on which the actual value is displayed - + - EmptyConstraint tests a whether a string or collection is empty, - postponing the decision about which test is applied until the - type of the actual argument is known. + Returns a constraint that tests whether the + actual value is greater than the suppled argument - + - Test whether the constraint is satisfied by a given value + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument - The writer on which the description is displayed - + - EqualConstraint is able to compare an actual value with the - expected value provided in its constructor. Two objects are - considered equal if both are null, or if both have the same - value. NUnit has special semantics for some object types. + Returns a constraint that tests whether the + actual value is less than the suppled argument - + - If true, strings in error messages will be clipped + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument - + - NUnitEqualityComparer used to test equality. + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument - + - Initializes a new instance of the class. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The expected value. - + - Flag the constraint to use a tolerance when determining equality. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - Tolerance value to be used - Self. - + - Flag the constraint to use the supplied IComparer object. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IComparer object. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied Comparison object. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The IComparer object to use. - Self. - + - Flag the constraint to use the supplied IEqualityComparer object. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The IComparer object to use. - Self. - + - Test whether the constraint is satisfied by a given value + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The value to be tested - True for success, false for failure - + - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The MessageWriter to write to - + - Write description of this constraint + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. - The MessageWriter to write to - + - Display the failure information for two collections that did not match. + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections - + - Displays a single line showing the types and sizes of the expected - and actual enumerations, collections or arrays. If both are identical, - the value is only shown once. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - The MessageWriter on which to display - The expected collection or array - The actual collection or array - The indentation level for the message line - + - Displays a single line showing the point in the expected and actual - arrays at which the comparison failed. If the arrays have different - structures or dimensions, both values are shown. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - The MessageWriter on which to display - The expected array - The actual array - Index of the failure point in the underlying collections - The indentation level for the message line - + - Display the failure information for two IEnumerables that did not match. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - The MessageWriter on which to display - The expected enumeration. - The actual enumeration - The depth of this failure in a set of nested collections - + - Flag the constraint to ignore case and return self. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - + - Flag the constraint to suppress string clipping - and return self. + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. - + - Flag the constraint to compare arrays as collections - and return self. + Returns a constraint that tests whether the path provided + is under an expected path after canonicalization. - + - Switches the .Within() modifier to interpret its tolerance as - a distance in representable values (see remarks). + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - Self. - - Ulp stands for "unit in the last place" and describes the minimum - amount a given value can change. For any integers, an ulp is 1 whole - digit. For floating point values, the accuracy of which is better - for smaller numbers and worse for larger numbers, an ulp depends - on the size of the number. Using ulps for comparison of floating - point results instead of fixed tolerances is safer because it will - automatically compensate for the added inaccuracy of larger numbers. - - + - Switches the .Within() modifier to interpret its tolerance as - a percentage that the actual values is allowed to deviate from - the expected value. + Returns a constraint that tests whether the actual value falls + within a specified range. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in days. + Returns a ConstraintExpression that negates any + following constraint. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in hours. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - Self - + - Causes the tolerance to be interpreted as a TimeSpan in minutes. + Returns a constraint that tests for null - Self - + - Causes the tolerance to be interpreted as a TimeSpan in seconds. + Returns a constraint that tests for True - Self - + - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + Returns a constraint that tests for False - Self - + - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. + Returns a constraint that tests for a positive value - Self - + - EqualityAdapter class handles all equality comparisons - that use an IEqualityComparer, IEqualityComparer<T> - or a ComparisonAdapter. + Returns a constraint that tests for a negative value - + - Compares two objects, returning true if they are equal + Returns a constraint that tests for NaN - + - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. + Returns a constraint that tests for empty - + - Returns an EqualityAdapter that wraps an IComparer. + Returns a constraint that tests whether a collection + contains all unique items. - + - Returns an EqualityAdapter that wraps an IEqualityComparer. + Returns a constraint that tests whether an object graph is serializable in binary format. - + - Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + Returns a constraint that tests whether an object graph is serializable in xml format. - + - Returns an EqualityAdapter that wraps an IComparer<T>. + Returns a constraint that tests whether a collection is ordered - + - Returns an EqualityAdapter that wraps a Comparison<T>. + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + NOTE: This interface is used in both the framework + and the core, even though that results in two different + types. However, sharing the source code guarantees that + the various implementations will be compatible and that + the core is able to reflect successfully over the + framework implementations of ITestCaseData. - + - EqualityAdapter that wraps an IComparer. + Gets the argument list to be provided to the test - + - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. + Gets the expected result - + - EqualityAdapter that wraps an IComparer. + Indicates whether a result has been specified. + This is necessary because the result may be + null, so it's value cannot be checked. - - Helper routines for working with floating point numbers - - - The floating point comparison code is based on this excellent article: - http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm - - - "ULP" means Unit in the Last Place and in the context of this library refers to - the distance between two adjacent floating point numbers. IEEE floating point - numbers can only represent a finite subset of natural numbers, with greater - accuracy for smaller numbers and lower accuracy for very large numbers. - - - If a comparison is allowed "2 ulps" of deviation, that means the values are - allowed to deviate by up to 2 adjacent floating point values, which might be - as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. - - + + + Gets the expected exception Type + - - Compares two floating point values for equality - First floating point value to be compared - Second floating point value t be compared - - Maximum number of representable floating point values that are allowed to - be between the left and the right floating point values - - True if both numbers are equal or close to being equal - - - Floating point values can only represent a finite subset of natural numbers. - For example, the values 2.00000000 and 2.00000024 can be stored in a float, - but nothing inbetween them. - - - This comparison will count how many possible floating point values are between - the left and the right number. If the number of possible values between both - numbers is less than or equal to maxUlps, then the numbers are considered as - being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - + + + Gets the FullName of the expected exception + - - Compares two double precision floating point values for equality - First double precision floating point value to be compared - Second double precision floating point value t be compared - - Maximum number of representable double precision floating point values that are - allowed to be between the left and the right double precision floating point values - - True if both numbers are equal or close to being equal - - - Double precision floating point values can only represent a limited series of - natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 - can be stored in a double, but nothing inbetween them. - - - This comparison will count how many possible double precision floating point - values are between the left and the right number. If the number of possible - values between both numbers is less than or equal to maxUlps, then the numbers - are considered as being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - + - Reinterprets the memory contents of a floating point value as an integer value + Gets the name to be used for the test - - Floating point value whose memory contents to reinterpret - - - The memory contents of the floating point value interpreted as an integer - - + - Reinterprets the memory contents of a double precision floating point - value as an integer value + Gets the description of the test - - Double precision floating point value whose memory contents to reinterpret - - - The memory contents of the double precision floating point value - interpreted as an integer - - + - Reinterprets the memory contents of an integer as a floating point value + Gets a value indicating whether this is ignored. - Integer value whose memory contents to reinterpret - - The memory contents of the integer value interpreted as a floating point value - + true if ignored; otherwise, false. - + - Reinterprets the memory contents of an integer value as a double precision - floating point value + Gets a value indicating whether this is explicit. - Integer whose memory contents to reinterpret - - The memory contents of the integer interpreted as a double precision - floating point value - - - - Union of a floating point variable and an integer - - - The union's value as a floating point variable - - - The union's value as an integer - - - The union's value as an unsigned integer - - - Union of a double precision floating point variable and a long - - - The union's value as a double precision floating point variable - - - The union's value as a long - - - The union's value as an unsigned long + true if explicit; otherwise, false. - + - Tests whether a value is greater than the value supplied to its constructor + Gets the ignore reason. + The ignore reason. - + - The value against which a comparison is to be made + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. - + - Initializes a new instance of the class. + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. - The expected value. - + - Write the constraint description to a MessageWriter + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. - The writer on which the description is displayed + + - + - Test whether the constraint is satisfied by a given value + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. - The value to be tested - True for success, false for failure - + - Tests whether a value is greater than or equal to the value supplied to its constructor + Construct a ListMapper based on a collection + The collection to be transformed - + - The value against which a comparison is to be made + Produces a collection containing all the values of a property + The collection of property values + - + - Initializes a new instance of the class. + Randomizer returns a set of random values in a repeatable + way, to allow re-running of tests if necessary. - The expected value. - + - Write the constraint description to a MessageWriter + Get a randomizer for a particular member, returning + one that has already been created if it exists. + This ensures that the same values are generated + each time the tests are reloaded. - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Get a randomizer for a particular parameter, returning + one that has already been created if it exists. + This ensures that the same values are generated + each time the tests are reloaded. - The value to be tested - True for success, false for failure - + - Tests whether a value is less than the value supplied to its constructor + Construct a randomizer using a random seed - + - The value against which a comparison is to be made + Construct a randomizer using a specified seed - + - Initializes a new instance of the class. + Return an array of random doubles between 0.0 and 1.0. - The expected value. + + - + - Write the constraint description to a MessageWriter + Return an array of random doubles with values in a specified range. - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + Return an array of random ints with values in a specified range. - The value to be tested - True for success, false for failure - + - Tests whether a value is less than or equal to the value supplied to its constructor + Get a random seed for use in creating a randomizer. - + - The value against which a comparison is to be made + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. - + - Initializes a new instance of the class. + Null represents a null value, which cannot be used as an + argument to an attribute under .NET 1.x - The expected value. - + - Write the constraint description to a MessageWriter + Basic Asserts on strings. - The writer on which the description is displayed - + - Test whether the constraint is satisfied by a given value + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. - The value to be tested - True for success, false for failure + + - + - MessageWriter is the abstract base for classes that write - constraint descriptions and messages in some form. The - class has separate methods for writing various components - of a message, allowing implementations to tailor the - presentation as needed. + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + - + - Construct a MessageWriter given a culture + Asserts that a string is found within another string. + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Method to write single line message with optional args, usually - written to precede the general failure message. + Asserts that a string is found within another string. - The message to be written - Any arguments used in formatting the message + The expected string + The string to be examined + The message to display in case of failure - + - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. + Asserts that a string is found within another string. - The indentation level of the message - The message to be written - Any arguments used in formatting the message + The expected string + The string to be examined - + - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. + Asserts that a string is not found within another string. - The constraint that failed + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given values, including - a tolerance value on the Expected line. + Asserts that a string is found within another string. - The expected value - The actual value causing the failure - The tolerance within which the test was made + The expected string + The string to be examined + The message to display in case of failure - + - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. + Asserts that a string is found within another string. - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in locating the point where the strings differ - If true, the strings should be clipped to fit the line + The expected string + The string to be examined - + - Writes the text for a connector. + Asserts that a string starts with another string. - The connector. + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Writes the text for a predicate. + Asserts that a string starts with another string. - The predicate. + The expected string + The string to be examined + The message to display in case of failure - + - Writes the text for an expected value. + Asserts that a string starts with another string. - The expected value. + The expected string + The string to be examined - + - Writes the text for a modifier + Asserts that a string does not start with another string. - The modifier. + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Writes the text for an actual value. + Asserts that a string does not start with another string. - The actual value. + The expected string + The string to be examined + The message to display in case of failure - + - Writes the text for a generalized value. + Asserts that a string does not start with another string. - The value. + The expected string + The string to be examined - + - Writes the text for a collection value, - starting at a particular point, to a max length + Asserts that a string ends with another string. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Abstract method to get the max line length + Asserts that a string ends with another string. + The expected string + The string to be examined + The message to display in case of failure - + - Static methods used in creating messages + Asserts that a string ends with another string. + The expected string + The string to be examined - + - Static string used when strings are clipped + Asserts that a string does not end with another string. + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message - + - Returns the representation of a type as used in NUnitLite. - This is the same as Type.ToString() except for arrays, - which are displayed with their declared sizes. + Asserts that a string does not end with another string. - - + The expected string + The string to be examined + The message to display in case of failure - + - Converts any control characters in a string - to their escaped representation. + Asserts that a string does not end with another string. - The string to be converted - The converted string + The expected string + The string to be examined - + - Return the a string representation for a set of indices into an array + Asserts that two strings are equal, without regard to case. - Array of indices for which a string is needed + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - Get an array of indices representing the point in a enumerable, - collection or array corresponding to a single int index into the - collection. + Asserts that two strings are equal, without regard to case. - The collection to which the indices apply - Index in the collection - Array of indices + The expected string + The actual string + The message to display in case of failure - + - Clip a string to a given length, starting at a particular offset, returning the clipped - string with ellipses representing the removed parts + Asserts that two strings are equal, without regard to case. - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string + The expected string + The actual string - + - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. + Asserts that two strings are not equal, without regard to case. - - - - + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - Shows the position two strings start to differ. Comparison - starts at the start index. + Asserts that two strings are Notequal, without regard to case. The expected string The actual string - The index in the strings at which comparison should start - Boolean indicating whether case should be ignored - -1 if no mismatch found, or the index where mismatch found + The message to display in case of failure - + - The Numerics class contains common operations on numeric values. + Asserts that two strings are not equal, without regard to case. + The expected string + The actual string - + - Checks the type of the object, returning true if - the object is a numeric type. + Asserts that a string matches an expected regular expression pattern. - The object to check - true if the object is a numeric type + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - Checks the type of the object, returning true if - the object is a floating point numeric type. + Asserts that a string matches an expected regular expression pattern. - The object to check - true if the object is a floating point numeric type + The regex pattern to be matched + The actual string + The message to display in case of failure - + - Checks the type of the object, returning true if - the object is a fixed point numeric type. + Asserts that a string matches an expected regular expression pattern. - The object to check - true if the object is a fixed point numeric type + The regex pattern to be matched + The actual string - + - Test two numeric values for equality, performing the usual numeric - conversions and using a provided or default tolerance. If the tolerance - provided is Empty, this method may set it to a default tolerance. + Asserts that a string does not match an expected regular expression pattern. - The expected value - The actual value - A reference to the tolerance in effect - True if the values are equal + The regex pattern to be used + The actual string + The message to display in case of failure + Arguments used in formatting the message - + - Compare two numeric values, performing the usual numeric conversions. + Asserts that a string does not match an expected regular expression pattern. - The expected value - The actual value - The relationship of the values to each other + The regex pattern to be used + The actual string + The message to display in case of failure - + - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. + Asserts that a string does not match an expected regular expression pattern. + The regex pattern to be used + The actual string - + - Compares two objects + The TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It provides a number of instance modifiers + for use in initializing the test case. + + Note: Instance modifiers are getters that return + the same instance after modifying it's state. - - - - + - Returns the default NUnitComparer. + The argument list to be provided to the test - + - Generic version of NUnitComparer + The expected result to be returned - - + - Compare two objects of the same type + Set to true if this has an expected result - + - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. + The expected exception Type - + - + The FullName of the expected exception - + - Compares two objects for equality within a tolerance + The name to be used for the test - The first object to compare - The second object to compare - The tolerance to use in the comparison - - + - If true, all string comparisons will ignore case + The description of the test - + - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared + A dictionary of properties, used to add information + to tests without requiring the class to change. - + - Comparison objects used in comparisons for some constraints. + If true, indicates that the test case is to be ignored - + - Compares two objects for equality within a tolerance. + If true, indicates that the test case is marked explicit - + - Helper method to compare two arrays + The reason for ignoring a test case - + - Method to compare two DirectoryInfo objects + Initializes a new instance of the class. - first directory to compare - second directory to compare - true if equivalent, false if not + The arguments. - + - Returns the default NUnitEqualityComparer + Initializes a new instance of the class. + The argument. - + - Gets and sets a flag indicating whether case should - be ignored in determining equality. + Initializes a new instance of the class. + The first argument. + The second argument. - + - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. + Initializes a new instance of the class. + The first argument. + The second argument. + The third argument. - + - Gets and sets an external comparer to be used to - test for equality. It is applied to members of - collections, in place of NUnit's own logic. + Sets the expected result for the test + The expected result + A modified TestCaseData - + - Gets the list of failure points for the last Match performed. + Sets the expected exception type for the test + Type of the expected exception. + The modified TestCaseData instance - + - FailurePoint class represents one point of failure - in an equality test. + Sets the expected exception type for the test + FullName of the expected exception. + The modified TestCaseData instance - + - The location of the failure + Sets the name of the test case + The modified TestCaseData instance - + - The expected value + Sets the description for the test case + being constructed. + The description. + The modified TestCaseData instance. - + - The actual value + Applies a category to the test + + - + - Indicates whether the expected value is valid + Applies a named property to the test + + + - + - Indicates whether the actual value is valid + Applies a named property to the test + + + - + - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. + Applies a named property to the test + + + - + - The expected path used in the constraint + Ignores this TestCase. + - + - The actual path being tested + Ignores this TestCase, specifying the reason. + The reason. + - + - Flag indicating whether a caseInsensitive comparison should be made + Marks this TestCase as Explicit + - + - Construct a PathConstraint for a give expected path + Marks this TestCase as Explicit, specifying the reason. - The expected path + The reason. + - + - Test whether the constraint is satisfied by a given value + Gets the argument list to be provided to the test - The value to be tested - True for success, false for failure - + - Returns true if the expected path and actual path match + Gets the expected result - + - Returns the string representation of this constraint + Returns true if the result has been set - + - Canonicalize the provided path + Gets the expected exception Type - - The path in standardized form - + - Test whether two paths are the same + Gets the FullName of the expected exception - The first path - The second path - Indicates whether case should be ignored - - + - Test whether one path is under another path + Gets the name to be used for the test - The first path - supposed to be the parent path - The second path - supposed to be the child path - Indicates whether case should be ignored - - + - Test whether one path is the same as or under another path + Gets the description of the test - The first path - supposed to be the parent path - The second path - supposed to be the child path - - + - Modifies the current instance to be case-insensitve - and returns it. + Gets a value indicating whether this is ignored. + true if ignored; otherwise, false. - + - Modifies the current instance to be case-sensitve - and returns it. + Gets a value indicating whether this is explicit. + true if explicit; otherwise, false. - + - Summary description for SamePathConstraint. + Gets the ignore reason. + The ignore reason. - + - Initializes a new instance of the class. + Gets a list of categories associated with this test. - The expected path - + - Test whether the constraint is satisfied by a given value + Gets the property dictionary for this test - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Provide the context information of the current test - The writer on which the description is displayed - + - SubPathConstraint tests that the actual path is under the expected path + Constructs a TestContext using the provided context dictionary + A context dictionary - + - Initializes a new instance of the class. + Get the current test context. This is created + as needed. The user may save the context for + use within a test, but it should not be used + outside the test for which it is created. - The expected path - + - Test whether the constraint is satisfied by a given value + Gets a TestAdapter representing the currently executing test in this context. - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Gets a ResultAdapter representing the current result for the test + executing in this context. - The writer on which the description is displayed - + - SamePathOrUnderConstraint tests that one path is under another + Gets the directory containing the current test assembly. - + - Initializes a new instance of the class. + Gets the directory to be used for outputing files created + by this test run. - The expected path - + - Test whether the constraint is satisfied by a given value + TestAdapter adapts a Test for consumption by + the user test code. - The expected path - The actual path - True for success, false for failure - + - Write the constraint description to a MessageWriter + Constructs a TestAdapter for this context - The writer on which the description is displayed + The context dictionary - + - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. + The name of the test. - + - Construct a PredicateConstraint from a predicate + The FullName of the test - + - Determines whether the predicate succeeds when applied - to the actual value. + The properties of the test. - + - Writes the description to a MessageWriter + ResultAdapter adapts a TestResult for consumption by + the user test code. - + - NotConstraint negates the effect of some other constraint + Construct a ResultAdapter for a context + The context holding the result - + - Initializes a new instance of the class. + The TestState of current test. This maps to the ResultState + used in nunit.core and is subject to change in the future. - The base constraint to be negated. - + - Test whether the constraint is satisfied by a given value + The TestStatus of current test. This enum will be used + in future versions of NUnit and so is to be preferred + to the TestState value. - The value to be tested - True for if the base constraint fails, false if it succeeds - + - Write the constraint description to a MessageWriter + Provides details about a test - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a MessageWriter. + Creates an instance of TestDetails - The writer on which the actual value is displayed + The fixture that the test is a member of, if available. + The method that implements the test, if available. + The full name of the test. + A string representing the type of test, e.g. "Test Case". + Indicates if the test represents a suite of tests. - + - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. + The fixture that the test is a member of, if available. - + - Construct an AllItemsConstraint on top of an existing constraint + The method that implements the test, if available. - - + - Apply the item constraint to each item in the collection, - failing if any item fails. + The full name of the test. - - - + - Write a description of this constraint to a MessageWriter + A string representing the type of test, e.g. "Test Case". - - + - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. + Indicates if the test represents a suite of tests. - + - Construct a SomeItemsConstraint on top of an existing constraint + The ResultState enum indicates the result of running a test - - + - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. + The result is inconclusive - - - + - Write a description of this constraint to a MessageWriter + The test was not runnable. - - + - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. + The test has been skipped. - + - Construct a SomeItemsConstraint on top of an existing constraint + The test has been ignored. - - + - Apply the item constraint to each item in the collection, - failing if any item fails. + The test succeeded - - - + - Write a description of this constraint to a MessageWriter + The test failed - - + - ExactCoutConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. + The test encountered an unexpected exception - + - Construct an ExactCountConstraint on top of an existing constraint + The test was cancelled by the user - - - + - Apply the item constraint to each item in the collection, - succeeding only if the expected number of items pass. + The TestStatus enum indicates the result of running a test - - - + - Write a description of this constraint to a MessageWriter + The test was inconclusive - - + - PropertyExistsConstraint tests that a named property - exists on the object provided through Match. - - Originally, PropertyConstraint provided this feature - in addition to making optional tests on the vaue - of the property. The two constraints are now separate. + The test has skipped - + - Initializes a new instance of the class. + The test succeeded - The name of the property. - + - Test whether the property exists for a given object + The test failed - The object to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Helper class with static methods used to supply constraints + that operate on strings. - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Returns a constraint that fails if the actual + value contains the substring supplied as an argument. - - + - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - + - Initializes a new instance of the class. + Returns a constraint that fails if the actual + value starts with the substring supplied as an argument. - The name. - The constraint to apply to the property. - + - Test whether the constraint is satisfied by a given value + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Returns a constraint that fails if the actual + value ends with the substring supplied as an argument. - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. - The writer on which the actual value is displayed - + - Returns the string representation of the constraint. + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. - - + - RangeConstraint tests whethe two values are within a - specified range. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - + - Initializes a new instance of the class. - - From. - To. + TextMessageWriter writes constraint descriptions and messages + in displayable form as a text stream. It tailors the display + of individual message components to form the standard message + format of NUnit assertion failure messages. +
- + - Test whether the constraint is satisfied by a given value + MessageWriter is the abstract base for classes that write + constraint descriptions and messages in some form. The + class has separate methods for writing various components + of a message, allowing implementations to tailor the + presentation as needed. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Construct a MessageWriter given a culture - The writer on which the description is displayed - + - ResolvableConstraintExpression is used to represent a compound - constraint being constructed at a point where the last operator - may either terminate the expression or may have additional - qualifying constraints added to it. - - It is used, for example, for a Property element or for - an Exception element, either of which may be optionally - followed by constraints that apply to the property or - exception. + Method to write single line message with optional args, usually + written to precede the general failure message. + The message to be written + Any arguments used in formatting the message - + - Create a new instance of ResolvableConstraintExpression + Method to write single line message with optional args, usually + written to precede the general failure message, at a givel + indentation level. + The indentation level of the message + The message to be written + Any arguments used in formatting the message - + - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + The constraint that failed - + - Resolve the current expression to a Constraint + Display Expected and Actual lines for given values. This + method may be called by constraints that need more control over + the display of actual and expected values than is provided + by the default implementation. + The expected value + The actual value causing the failure - + - Appends an And Operator to the expression + Display Expected and Actual lines for given values, including + a tolerance value on the Expected line. + The expected value + The actual value causing the failure + The tolerance within which the test was made - + - Appends an Or operator to the expression. + Display the expected and actual string values on separate lines. + If the mismatch parameter is >=0, an additional line is displayed + line containing a caret that points to the mismatch point. + The expected string value + The actual string value + The point at which the strings don't match or -1 + If true, case is ignored in locating the point where the strings differ + If true, the strings should be clipped to fit the line - + - ReusableConstraint wraps a resolved constraint so that it - may be saved and reused as needed. + Writes the text for a connector. + The connector. - + - Construct a ReusableConstraint + Writes the text for a predicate. - The constraint or expression to be reused + The predicate. - + - Conversion operator from a normal constraint to a ReusableConstraint. + Writes the text for an expected value. - The original constraint to be wrapped as a ReusableConstraint - + The expected value. - + - Returns the string representation of the constraint. + Writes the text for a modifier - A string representing the constraint + The modifier. - + - Resolves the ReusableConstraint by returning the constraint - that it originally wrapped. + Writes the text for an actual value. - A resolved constraint + The actual value. - + - SameAsConstraint tests whether an object is identical to - the object passed to its constructor + Writes the text for a generalized value. + The value. - + - Initializes a new instance of the class. + Writes the text for a collection value, + starting at a particular point, to a max length - The expected object. + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write - + - Test whether the constraint is satisfied by a given value + Abstract method to get the max line length - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Prefix used for the expected value line of a message - The writer on which the description is displayed - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + Prefix used for the actual value line of a message - + - Test whether the constraint is satisfied by a given value + Length of a message prefix - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Construct a TextMessageWriter - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. - The writer on which the actual value is displayed + + - + - Returns the string representation + Method to write single line message with optional args, usually + written to precede the general failure message, at a givel + indentation level. + The indentation level of the message + The message to be written + Any arguments used in formatting the message - + - BinarySerializableConstraint tests whether - an object is serializable in binary format. + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + The constraint that failed - + - Test whether the constraint is satisfied by a given value + Display Expected and Actual lines for given values. This + method may be called by constraints that need more control over + the display of actual and expected values than is provided + by the default implementation. - The value to be tested - True for success, false for failure + The expected value + The actual value causing the failure - + - Write the constraint description to a MessageWriter + Display Expected and Actual lines for given values, including + a tolerance value on the expected line. - The writer on which the description is displayed + The expected value + The actual value causing the failure + The tolerance within which the test was made - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Display the expected and actual string values on separate lines. + If the mismatch parameter is >=0, an additional line is displayed + line containing a caret that points to the mismatch point. - The writer on which the actual value is displayed + The expected string value + The actual string value + The point at which the strings don't match or -1 + If true, case is ignored in string comparisons + If true, clip the strings to fit the max line length - + - Returns the string representation of this constraint + Writes the text for a connector. + The connector. - + - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. + Writes the text for a predicate. + The predicate. - + - The expected value + Write the text for a modifier. + The modifier. - + - Indicates whether tests should be case-insensitive + Writes the text for an expected value. + The expected value. - + - Constructs a StringConstraint given an expected value + Writes the text for an actual value. - The expected value + The actual value. - + - Modify the constraint to ignore case in matching. + Writes the text for a generalized value. + The value. - + - EmptyStringConstraint tests whether a string is empty. + Writes the text for a collection value, + starting at a particular point, to a max length + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write - + - Test whether the constraint is satisfied by a given value + Write the generic 'Expected' line for a constraint - The value to be tested - True for success, false for failure + The constraint that failed - + - Write the constraint description to a MessageWriter + Write the generic 'Expected' line for a given value - The writer on which the description is displayed + The expected value - + - NullEmptyStringConstraint tests whether a string is either null or empty. + Write the generic 'Expected' line for a given value + and tolerance. + The expected value + The tolerance within which the test was made - + - Constructs a new NullOrEmptyStringConstraint + Write the generic 'Actual' line for a constraint + The constraint for which the actual value is to be written - + - Test whether the constraint is satisfied by a given value + Write the generic 'Actual' line for a given value - The value to be tested - True for success, false for failure + The actual value causing a failure - + - Write the constraint description to a MessageWriter + Gets or sets the maximum line length for this writer - The writer on which the description is displayed - + - SubstringConstraint can test whether a string contains - the expected substring. + Helper class with properties and methods that supply + constraints that operate on exceptions. - + - Initializes a new instance of the class. + Creates a constraint specifying the exact type of exception expected - The expected. - + - Test whether the constraint is satisfied by a given value + Creates a constraint specifying the exact type of exception expected - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + Creates a constraint specifying the type of exception expected - The writer on which the description is displayed - + - StartsWithConstraint can test whether a string starts - with an expected substring. + Creates a constraint specifying the type of exception expected - + - Initializes a new instance of the class. + Creates a constraint specifying an expected exception - The expected string - + - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. + Creates a constraint specifying an exception with a given InnerException - - - + - Write the constraint description to a MessageWriter + Creates a constraint specifying an expected TargetInvocationException - The writer on which the description is displayed - + - EndsWithConstraint can test whether a string ends - with an expected substring. + Creates a constraint specifying an expected TargetInvocationException - + - Initializes a new instance of the class. + Creates a constraint specifying an expected TargetInvocationException - The expected string - + - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. + Creates a constraint specifying that no exception is thrown - - - + - Write the constraint description to a MessageWriter + Attribute used to apply a category to a test - The writer on which the description is displayed - + - RegexConstraint can test whether a string matches - the pattern provided. + The name of the category - + - Initializes a new instance of the class. + Construct attribute for a given category based on + a name. The name may not contain the characters ',', + '+', '-' or '!'. However, this is not checked in the + constructor since it would cause an error to arise at + as the test was loaded without giving a clear indication + of where the problem is located. The error is handled + in NUnitFramework.cs by marking the test as not + runnable. - The pattern. + The name of the category - + - Test whether the constraint is satisfied by a given value + Protected constructor uses the Type name as the name + of the category. - The value to be tested - True for success, false for failure - + - Write the constraint description to a MessageWriter + The name of the category - The writer on which the description is displayed - + - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. + Used to mark a field for use as a datapoint when executing a theory + within the same fixture that requires an argument of the field's Type. - + - Initializes a new instance of the class, - using a constraint to be applied to the exception. + Used to mark an array as containing a set of datapoints to be used + executing a theory within the same fixture that requires an argument + of the Type of the array elements. - A constraint to apply to the caught exception. - + - Executes the code of the delegate and captures any exception. - If a non-null base constraint was provided, it applies that - constraint to the exception. + Attribute used to provide descriptive text about a + test case or fixture. - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Construct the attribute - - + Text describing the test - + - Write the constraint description to a MessageWriter + Gets the test description - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Enumeration indicating how the expected message parameter is to be used - The writer on which the actual value is displayed - + + Expect an exact match + + + Expect a message containing the parameter string + + + Match the regular expression provided as a parameter + + + Expect a message that starts with the parameter string + + - Returns the string representation of this constraint + ExpectedExceptionAttribute + - + - Get the actual exception thrown - used by Assert.Throws. + Constructor for a non-specific exception - + - ThrowsNothingConstraint tests that a delegate does not - throw an exception. + Constructor for a given type of exception + The type of the expected exception - + - Test whether the constraint is satisfied by a given value + Constructor for a given exception name - The value to be tested - True if no exception is thrown, otherwise false + The full name of the expected exception - + - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. + Gets or sets the expected exception type - - - + - Write the constraint description to a MessageWriter + Gets or sets the full Type name of the expected exception - The writer on which the description is displayed - + - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. + Gets or sets the expected message text - The writer on which the actual value is displayed - + - Modes in which the tolerance value for a comparison can - be interpreted. + Gets or sets the user message displayed in case of failure - + - The tolerance was created with a value, without specifying - how the value would be used. This is used to prevent setting - the mode more than once and is generally changed to Linear - upon execution of the test. + Gets or sets the type of match to be performed on the expected message - + - The tolerance is used as a numeric range within which - two compared values are considered to be equal. + Gets the name of a method to be used as an exception handler - + - Interprets the tolerance as the percentage by which - the two compared values my deviate from each other. + ExplicitAttribute marks a test or test fixture so that it will + only be run if explicitly executed from the gui or command line + or if it is included by use of a filter. The test will not be + run simply because an enclosing suite is run. - + - Compares two values based in their distance in - representable numbers. + Default constructor - + - The Tolerance class generalizes the notion of a tolerance - within which an equality test succeeds. Normally, it is - used with numeric types, but it can be used with any - type that supports taking a difference between two - objects and comparing that difference to a value. + Constructor with a reason + The reason test is marked explicit - + - Constructs a linear tolerance of a specdified amount + The reason test is marked explicit - + - Constructs a tolerance given an amount and ToleranceMode + Attribute used to mark a test that is to be ignored. + Ignored tests result in a warning message when the + tests are run. - + - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. + Constructs the attribute without giving a reason + for ignoring the test. - + - Returns an empty Tolerance object, equivalent to - specifying no tolerance. In most cases, it results - in an exact match but for floats and doubles a - default tolerance may be used. + Constructs the attribute giving a reason for ignoring the test + The reason for ignoring the test - + - Returns a zero Tolerance object, equivalent to - specifying an exact match. + The reason for ignoring a test - + - Gets the ToleranceMode for the current Tolerance + Abstract base for Attributes that are used to include tests + in the test run based on environmental settings. - + - Gets the value of the current Tolerance instance. + Constructor with no included items specified, for use + with named property syntax. - + - Returns a new tolerance, using the current amount as a percentage. + Constructor taking one or more included items + Comma-delimited list of included items - + - Returns a new tolerance, using the current amount in Ulps. + Name of the item that is needed in order for + a test to run. Multiple itemss may be given, + separated by a comma. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of days. + Name of the item to be excluded. Multiple items + may be given, separated by a comma. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of hours. + The reason for including or excluding the test - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of minutes. + PlatformAttribute is used to mark a test fixture or an + individual method as applying to a particular platform only. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of seconds. + Constructor with no platforms specified, for use + with named property syntax. - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of milliseconds. + Constructor taking one or more platforms + Comma-deliminted list of platforms - + - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of clock ticks. + CultureAttribute is used to mark a test fixture or an + individual method as applying to a particular Culture only. - + - Returns true if the current tolerance is empty. + Constructor with no cultures specified, for use + with named property syntax. - + - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. + Constructor taking one or more cultures + Comma-deliminted list of cultures - + - The expected Type used by the constraint + Marks a test to use a combinatorial join of any argument data + provided. NUnit will create a test case for every combination of + the arguments provided. This can result in a large number of test + cases and so should be used judiciously. This is the default join + type, so the attribute need not be used except as documentation. - + - Construct a TypeConstraint for a given Type + PropertyAttribute is used to attach information to a test as a name/value pair.. - - + - Write the actual value for a failing constraint test to a - MessageWriter. TypeConstraints override this method to write - the name of the type. + Construct a PropertyAttribute with a name and string value - The writer on which the actual value is displayed + The name of the property + The property value - + - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor + Construct a PropertyAttribute with a name and int value + The name of the property + The property value - + - Construct an ExactTypeConstraint for a given Type + Construct a PropertyAttribute with a name and double value - The expected Type. + The name of the property + The property value - + - Test that an object is of the exact type specified + Constructor for derived classes that set the + property dictionary directly. - The actual value. - True if the tested object is of the exact type provided, otherwise false. - + - Write the description of this constraint to a MessageWriter + Constructor for use by derived classes that use the + name of the type as the property name. Derived classes + must ensure that the Type of the property value is + a standard type supported by the BCL. Any custom + types will cause a serialization Exception when + in the client. - The MessageWriter to use - + - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. + Gets the property dictionary for this attribute - + - Constructs an ExceptionTypeConstraint + Default constructor - + - Write the actual value for a failing constraint test to a - MessageWriter. Overriden to write additional information - in the case of an Exception. + Marks a test to use pairwise join of any argument data provided. + NUnit will attempt too excercise every pair of argument values at + least once, using as small a number of test cases as it can. With + only two arguments, this is the same as a combinatorial join. - The MessageWriter to use - + - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. + Default constructor - + - Construct an InstanceOfTypeConstraint for the type provided + Marks a test to use a sequential join of any argument data + provided. NUnit will use arguements for each parameter in + sequence, generating test cases up to the largest number + of argument values provided and using null for any arguments + for which it runs out of values. Normally, this should be + used with the same number of arguments for each parameter. - The expected Type - + - Test whether an object is of the specified type or a derived type + Default constructor - The object to be tested - True if the object is of the provided type or derives from it, otherwise false. - + - Write a description of this constraint to a MessageWriter + Summary description for MaxTimeAttribute. - The MessageWriter to use - + - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. + Construct a MaxTimeAttribute, given a time in milliseconds. + The maximum elapsed time in milliseconds - + - Construct an AssignableFromConstraint for the type provided + RandomAttribute is used to supply a set of random values + to a single parameter of a parameterized test. - - + - Test whether an object can be assigned from the specified type + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - + - Write a description of this constraint to a MessageWriter + Abstract base class for attributes that apply to parameters + and supply data for the parameter. - The MessageWriter to use - + - AssignableToConstraint is used to test that an object - can be assigned to a given Type. + Gets the data to be provided to the specified parameter - + - Construct an AssignableToConstraint for the type provided + The collection of data to be returned. Must + be set by any derived attribute classes. + We use an object[] so that the individual + elements may have their type changed in GetData + if necessary. - - + - Test whether an object can be assigned to the specified type + Construct with one argument - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. + - + - Write a description of this constraint to a MessageWriter + Construct with two arguments - The MessageWriter to use + + - + - Thrown when an assertion failed. + Construct with three arguments - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception + + + - + - Serialization Constructor + Construct with an array of arguments + - + - Thrown when an assertion failed. + Get the collection of values to be used as arguments - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + Construct a set of doubles from 0.0 to 1.0, + specifying only the count. + - + - Thrown when a test executes inconclusively. + Construct a set of doubles from min to max - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception + + + - + - Serialization Constructor + Construct a set of ints from min to max + + + - + - Thrown when an assertion failed. + Get the collection of values to be used as arguments - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - + - Serialization Constructor + RangeAttribute is used to supply a range of values to an + individual parameter of a parameterized test. - + - + Construct a range of ints using default step of 1 - + + - + - Compares two objects of a given Type for equality within a tolerance + Construct a range of ints specifying the step size - The first object to compare - The second object to compare - The tolerance to use in the comparison - + + + - + - The different targets a test action attribute can be applied to + Construct a range of longs + + + - + - Default target, which is determined by where the action attribute is attached + Construct a range of doubles + + + - + - Target a individual test case + Construct a range of floats + + + - + - Target a suite of test cases + RepeatAttribute may be applied to test case in order + to run it multiple times. - + - Delegate used by tests that execute code and - capture any thrown exception. + Construct a RepeatAttribute + The number of times to run the test - + - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. + RequiredAddinAttribute may be used to indicate the names of any addins + that must be present in order to run some or all of the tests in an + assembly. If the addin is not loaded, the entire assembly is marked + as NotRunnable. - + - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. + Initializes a new instance of the class. + The required addin. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Gets the name of required addin. - - + The required addin name. - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Summary description for SetCultureAttribute. - - - + - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. + Construct given the name of a culture - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. + Summary description for SetUICultureAttribute. - The message to initialize the with. - Arguments to be used in formatting the message - + - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. + Construct given the name of a culture - The message to initialize the with. + - + - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. + SetUpAttribute is used in a TestFixture to identify a method + that is called immediately before each test is run. It is + also used in a SetUpFixture to identify the method that is + called once, before any of the subordinate tests are run. - + - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. - The message to initialize the with. - Arguments to be used in formatting the message - + - Throws an with the message that is - passed in. This is used by the other Assert functions. + Attribute used to mark a static (shared in VB) property + that returns a list of tests. - The message to initialize the with. - + - Throws an . - This is used by the other Assert functions. + Attribute used in a TestFixture to identify a method that is + called immediately after each test is run. It is also used + in a SetUpFixture to identify the method that is called once, + after all subordinate tests have run. In either case, the method + is guaranteed to be called, even if an exception is thrown. - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. + Provide actions to execute before and after tests. - The message to initialize the with. - Arguments to be used in formatting the message - + - Throws an with the message that is - passed in. This causes the test to be reported as ignored. + When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - The message to initialize the with. - + - Throws an . - This causes the test to be reported as ignored. + Executed before each test is run + Provides details about the test that is going to be run. - + - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. + Executed after each test is run - The message to initialize the with. - Arguments to be used in formatting the message + Provides details about the test that has just been run. - + - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. + Provides the target for the action attribute - The message to initialize the with. + The target for the action attribute - + - Throws an . - This causes the test to be reported as Inconclusive. + Adding this attribute to a method within a + class makes the method callable from the NUnit test runner. There is a property + called Description which is optional which you can provide a more detailed test + description. This class cannot be inherited. - - + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + publc void TestDescriptionMethod() + {} + } + + + + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Descriptive text for this test - A Constraint to be applied - The actual value to test - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + TestCaseAttribute is used to mark parameterized test cases + and provide them with their arguments. - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Construct a TestCaseAttribute with a list of arguments. + This constructor is not CLS-Compliant - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message + - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Construct a TestCaseAttribute with a single argument - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested + - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Construct a TestCaseAttribute with a two arguments - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure + + - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Construct a TestCaseAttribute with a three arguments - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message + + + - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Gets the list of arguments to a test case - A Constraint to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Gets or sets the expected result. Use + ExpectedResult by preference. - A Constraint to be applied - The actual value to test - The message that will be displayed on failure + The result. - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Gets or sets the expected result. - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message + The result. - + - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message + Gets a flag indicating whether an expected + result has been set. +
- + - Asserts that a condition is true. If the condition is false the method throws - an . + Gets a list of categories associated with this test; - The evaluated condition - The message to display if the condition is false - + - Asserts that a condition is true. If the condition is false the method throws - an . + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. - The evaluated condition - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Gets or sets the expected exception. - A TestDelegate to be executed - A ThrowsConstraint used in the test + The expected exception. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + Gets or sets the name the expected exception. - A Constraint to be applied - The actual value to test + The expected name of the exception. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + Gets or sets the expected message of the expected exception - A Constraint to be applied - The actual value to test - The message that will be displayed on failure + The expected message of the exception. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. + Gets or sets the type of match to be performed on the expected message - - This method is provided for use by VB developers needing to test - the value of properties with private setters. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Verifies that a delegate throws a particular exception when called. + Gets or sets the description. - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The description. - + - Verifies that a delegate throws a particular exception when called. + Gets or sets the name of the test. - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure + The name of the test. - + - Verifies that a delegate throws a particular exception when called. + Gets or sets the ignored status of the test - A constraint to be satisfied by the exception - A TestSnippet delegate - + - Verifies that a delegate throws a particular exception when called. + Gets or sets the ignored status of the test - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Verifies that a delegate throws a particular exception when called. + Gets or sets the explicit status of the test - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Gets or sets the reason for not running the test - The exception Type expected - A TestSnippet delegate - + - Verifies that a delegate throws a particular exception when called. + Gets or sets the reason for not running the test. + Set has the side effect of marking the test as ignored. - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The ignore reason. - + - Verifies that a delegate throws a particular exception when called. + FactoryAttribute indicates the source to be used to + provide test cases for a test method. - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate throws a particular exception when called. + Construct with the name of the data source, which must + be a property, field or method of the test class itself. - Type of the expected exception - A TestSnippet delegate + An array of the names of the factories that will provide data - + - Verifies that a delegate throws an exception when called - and returns it. + Construct with a Type, which must implement IEnumerable - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + The Type that will provide data - + - Verifies that a delegate throws an exception when called - and returns it. + Construct with a Type and name. + that don't support params arrays. - A TestDelegate - The message that will be displayed on failure + The Type that will provide data + The name of the method, property or field that will provide data - + - Verifies that a delegate throws an exception when called - and returns it. + The name of a the method, property or fiend to be used as a source - A TestDelegate - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + A Type to be used as a source - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Gets or sets the category associated with this test. + May be a single category or a comma-separated list. - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - + + + [TestFixture] + public class ExampleClass + {} + + + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Default constructor - The expected Exception Type - A TestDelegate - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Construct with a object[] representing a set of arguments. + In .NET 2.0, the arguments may later be separated into + type arguments and constructor arguments. - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message + - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Descriptive text for this fixture - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - + - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. + Gets and sets the category for this fixture. + May be a comma-separated list of categories. - The expected Exception Type - A TestDelegate - + - Verifies that a delegate does not throw an exception + Gets a list of categories for this fixture - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Verifies that a delegate does not throw an exception. + The arguments originally provided to the attribute - A TestSnippet delegate - The message that will be displayed on failure - + - Verifies that a delegate does not throw an exception. + Gets or sets a value indicating whether this should be ignored. - A TestSnippet delegate + true if ignore; otherwise, false. - + - Asserts that a condition is true. If the condition is false the method throws - an . + Gets or sets the ignore reason. May set Ignored as a side effect. - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + The ignore reason. - + - Asserts that a condition is true. If the condition is false the method throws - an . + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. - The evaluated condition - The message to display in case of failure - + - Asserts that a condition is true. If the condition is false the method throws - an . + Attribute used to identify a method that is + called before any tests in a fixture are run. - The evaluated condition - + - Asserts that a condition is true. If the condition is false the method throws - an . + Attribute used to identify a method that is called after + all the tests in a fixture have run. The method is + guaranteed to be called, even if an exception is thrown. - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . + Adding this attribute to a method within a + class makes the method callable from the NUnit test runner. There is a property + called Description which is optional which you can provide a more detailed test + description. This class cannot be inherited. - The evaluated condition - The message to display in case of failure + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + publc void TestDescriptionMethod() + {} + } + + - + - Asserts that a condition is true. If the condition is false the method throws - an . + Used on a method, marks the test with a timeout value in milliseconds. + The test will be run in a separate thread and is cancelled if the timeout + is exceeded. Used on a method or assembly, sets the default timeout + for all contained test methods. - The evaluated condition - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + Construct a TimeoutAttribute given a time in milliseconds +
+ The timeout value in milliseconds - + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure + Marks a test that must run in the STA, causing it + to run in a separate thread if necessary. + + On methods, you may also use STAThreadAttribute + to serve the same purpose. +
- + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Construct a RequiresSTAAttribute +
- + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message + Marks a test that must run in the MTA, causing it + to run in a separate thread if necessary. + + On methods, you may also use MTAThreadAttribute + to serve the same purpose. +
- + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure + Construct a RequiresMTAAttribute +
- + - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition + Marks a test that must run on a separate thread. +
- + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Construct a RequiresThreadAttribute - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Construct a RequiresThreadAttribute, specifying the apartment - The object that is to be tested - The message to display in case of failure - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + ValueSourceAttribute indicates the source to be used to + provide data for one parameter of a test method. - The object that is to be tested - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Construct with the name of the factory - for use with languages + that don't support params arrays. - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The name of the data source to be used - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + Construct with a Type and name - for use with languages + that don't support params arrays. - The object that is to be tested - The message to display in case of failure + The Type that will provide data + The name of the method, property or field that will provide data - + - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. + The name of a the method, property or fiend to be used as a source - The object that is to be tested - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + A Type to be used as a source - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. - The object that is to be tested - The message to display in case of failure - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Abstract base class used for prefixes - The object that is to be tested - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + The IConstraintExpression interface is implemented by all + complete and resolvable constraints and expressions. - The object that is to be tested - The message to display in case of failure - + - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. + Return the top-level constraint for this expression - The object that is to be tested + - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Static UnsetObject used to detect derived constraints + failing to set the actual value. - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The actual value being tested against a constraint - The value that is to be tested - The message to display in case of failure - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The display name of this Constraint for use by ToString() - The value that is to be tested - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Argument fields used by ToString(); - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + The builder holding this constraint - The value that is to be tested - The message to display in case of failure - + - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. + Construct a constraint with no arguments - The value that is to be tested - + - Assert that a string is empty - that is equal to string.Empty + Construct a constraint with one argument - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Assert that a string is empty - that is equal to string.Empty + Construct a constraint with two arguments - The string to be tested - The message to display in case of failure - + - Assert that a string is empty - that is equal to string.Empty + Sets the ConstraintBuilder holding this constraint - The string to be tested - + - Assert that an array, list or other collection is empty + Write the failure message to the MessageWriter provided + as an argument. The default implementation simply passes + the constraint and the actual value to the writer, which + then displays the constraint description and the value. + + Constraints that need to provide additional details, + such as where the error occured can override this. - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message + The MessageWriter on which to display the message - + - Assert that an array, list or other collection is empty + Test whether the constraint is satisfied by a given value - An array, list or other collection implementing ICollection - The message to display in case of failure + The value to be tested + True for success, false for failure - + - Assert that an array, list or other collection is empty + Test whether the constraint is satisfied by an + ActualValueDelegate that returns the value to be tested. + The default implementation simply evaluates the delegate + but derived classes may override it to provide for delayed + processing. - An array, list or other collection implementing ICollection + An + True for success, false for failure - + - Assert that a string is not empty - that is not equal to string.Empty + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + A reference to the value to be tested + True for success, false for failure - + - Assert that a string is not empty - that is not equal to string.Empty + Write the constraint description to a MessageWriter - The string to be tested - The message to display in case of failure + The writer on which the description is displayed - + - Assert that a string is not empty - that is not equal to string.Empty + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. - The string to be tested + The writer on which the actual value is displayed - + - Assert that an array, list or other collection is not empty + Default override of ToString returns the constraint DisplayName + followed by any arguments within angle brackets. - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Assert that an array, list or other collection is not empty + Returns the string representation of this constraint - An array, list or other collection implementing ICollection - The message to display in case of failure - + - Assert that an array, list or other collection is not empty + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. - An array, list or other collection implementing ICollection - + - Assert that a string is either null or equal to string.Empty + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - + - Assert that a string is either null or equal to string.Empty + This operator creates a constraint that is satisfied if the + argument constraint is not satisfied. - The string to be tested - The message to display in case of failure - + - Assert that a string is either null or equal to string.Empty + Returns a DelayedConstraint with the specified delay time. - The string to be tested + The delay in milliseconds. + - + - Assert that a string is not null or empty + Returns a DelayedConstraint with the specified delay time + and polling interval. - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message + The delay in milliseconds. + The interval at which to test the constraint. + - + - Assert that a string is not null or empty + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. - The string to be tested - The message to display in case of failure - + - Assert that a string is not null or empty + Returns a ConstraintExpression by appending And + to the current constraint. - The string to be tested - + - Asserts that an object may be assigned a value of a given Type. + Returns a ConstraintExpression by appending And + to the current constraint. - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that an object may be assigned a value of a given Type. + Returns a ConstraintExpression by appending Or + to the current constraint. - The expected Type. - The object under examination - The message to display in case of failure - + - Asserts that an object may be assigned a value of a given Type. + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. - The expected Type. - The object under examination - + - Asserts that an object may be assigned a value of a given Type. + The base constraint - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that an object may be assigned a value of a given Type. + Construct given a base constraint - The expected Type. - The object under examination - The message to display in case of failure + - + - Asserts that an object may be assigned a value of a given Type. + Construct an AllItemsConstraint on top of an existing constraint - The expected Type. - The object under examination + - + - Asserts that an object may not be assigned a value of a given Type. + Apply the item constraint to each item in the collection, + failing if any item fails. - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message + + - + - Asserts that an object may not be assigned a value of a given Type. + Write a description of this constraint to a MessageWriter - The expected Type. - The object under examination - The message to display in case of failure + - + - Asserts that an object may not be assigned a value of a given Type. + AndConstraint succeeds only if both members succeed. - The expected Type. - The object under examination - + - Asserts that an object may not be assigned a value of a given Type. + BinaryConstraint is the abstract base of all constraints + that combine two other constraints in some fashion. - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that an object may not be assigned a value of a given Type. + The first constraint being combined - The expected Type. - The object under examination - The message to display in case of failure - + - Asserts that an object may not be assigned a value of a given Type. + The second constraint being combined - The expected Type. - The object under examination - + - Asserts that an object is an instance of a given type. + Construct a BinaryConstraint from two other constraints - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message + The first constraint + The second constraint - + - Asserts that an object is an instance of a given type. + Create an AndConstraint from two other constraints - The expected Type - The object being examined - The message to display in case of failure + The first constraint + The second constraint - + - Asserts that an object is an instance of a given type. + Apply both member constraints to an actual value, succeeding + succeeding only if both of them succeed. - The expected Type - The object being examined + The actual value + True if the constraints both succeeded - + - Asserts that an object is an instance of a given type. + Write a description for this contraint to a MessageWriter - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message + The MessageWriter to receive the description - + - Asserts that an object is an instance of a given type. + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. - The expected Type - The object being examined - The message to display in case of failure + The writer on which the actual value is displayed - + - Asserts that an object is an instance of a given type. + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. - The expected Type - The object being examined - + - Asserts that an object is an instance of a given type. + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that an object is an instance of a given type. + The expected Type used by the constraint - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is an instance of a given type. + Construct a TypeConstraint for a given Type - The expected Type - The object being examined + - + - Asserts that an object is not an instance of a given type. + Write the actual value for a failing constraint test to a + MessageWriter. TypeConstraints override this method to write + the name of the type. - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message + The writer on which the actual value is displayed - + - Asserts that an object is not an instance of a given type. + Construct an AssignableFromConstraint for the type provided - The expected Type - The object being examined - The message to display in case of failure + - + - Asserts that an object is not an instance of a given type. + Test whether an object can be assigned from the specified type - The expected Type - The object being examined + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. - + - Asserts that an object is not an instance of a given type. + Write a description of this constraint to a MessageWriter - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message + The MessageWriter to use - + - Asserts that an object is not an instance of a given type. + AssignableToConstraint is used to test that an object + can be assigned to a given Type. - The expected Type - The object being examined - The message to display in case of failure - + - Asserts that an object is not an instance of a given type. + Construct an AssignableToConstraint for the type provided - The expected Type - The object being examined + - + - Asserts that an object is not an instance of a given type. + Test whether an object can be assigned to the specified type - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. - + - Asserts that an object is not an instance of a given type. + Write a description of this constraint to a MessageWriter - The expected Type - The object being examined - The message to display in case of failure + The MessageWriter to use - + - Asserts that an object is not an instance of a given type. + AttributeConstraint tests that a specified attribute is present + on a Type or other provider and that the value of the attribute + satisfies some other constraint. - The expected Type - The object being examined - + - Verifies that two values are equal. If they are not, then an - is thrown. + Constructs an AttributeConstraint for a specified attriute + Type and base constraint. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + + - + - Verifies that two values are equal. If they are not, then an - is thrown. + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Writes a description of the attribute to the specified writer. - The expected value - The actual value - + - Verifies that two values are equal. If they are not, then an - is thrown. + Writes the actual value supplied to the specified writer. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Returns a string representation of the constraint. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + AttributeExistsConstraint tests for the presence of a + specified attribute on a Type. - The expected value - The actual value - + - Verifies that two values are equal. If they are not, then an - is thrown. + Constructs an AttributeExistsConstraint for a specific attribute Type - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Verifies that two values are equal. If they are not, then an - is thrown. + Tests whether the object provides the expected attribute. - The expected value - The actual value - The message to display in case of failure + A Type, MethodInfo, or other ICustomAttributeProvider + True if the expected attribute is present, otherwise false - + - Verifies that two values are equal. If they are not, then an - is thrown. + Writes the description of the constraint to the specified writer - The expected value - The actual value - + - Verifies that two values are equal. If they are not, then an - is thrown. + BasicConstraint is the abstract base for constraints that + perform a simple comparison to a constant value. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are equal. If they are not, then an - is thrown. + Initializes a new instance of the class. - The expected value - The actual value - The message to display in case of failure + The expected. + The description. - + - Verifies that two values are equal. If they are not, then an - is thrown. + Test whether the constraint is satisfied by a given value - The expected value - The actual value + The value to be tested + True for success, false for failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Write the constraint description to a MessageWriter - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The writer on which the description is displayed - + - Verifies that two values are equal. If they are not, then an - is thrown. + BinarySerializableConstraint tests whether + an object is serializable in binary format. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are equal. If they are not, then an - is thrown. + Test whether the constraint is satisfied by a given value - The expected value - The actual value + The value to be tested + True for success, false for failure - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Write the constraint description to a MessageWriter - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message + The writer on which the description is displayed - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure + The writer on which the actual value is displayed - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Returns the string representation - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + CollectionConstraint is the abstract base class for + constraints that operate on collections. - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Construct an empty CollectionConstraint - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - + - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. + Construct a CollectionConstraint - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual + - + - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Determines whether the specified enumerable is empty. - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The enumerable. + + true if the specified enumerable is empty; otherwise, false. + - + - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Test whether the constraint is satisfied by a given value - The value that is expected - The actual value - The message to display in case of failure + The value to be tested + True for success, false for failure - + - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. + Protected method to be implemented by derived classes - The value that is expected - The actual value + + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + CollectionContainsConstraint is used to test whether a collection + contains an expected object as a member. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + CollectionItemsEqualConstraint is the abstract base class for all + collection constraints that apply some notion of item equality + as a part of their operation. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Construct an empty CollectionConstraint - The expected value - The actual value - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Construct a CollectionConstraint - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Flag the constraint to use the supplied EqualityAdapter. + NOTE: For internal use only. - The expected value - The actual value - The message to display in case of failure + The EqualityAdapter to use. + Self. - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Flag the constraint to use the supplied IComparer object. - The expected value - The actual value + The IComparer object to use. + Self. - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Flag the constraint to use the supplied IComparer object. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The IComparer object to use. + Self. - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Flag the constraint to use the supplied Comparison object. - The expected value - The actual value - The message to display in case of failure + The IComparer object to use. + Self. - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Flag the constraint to use the supplied IEqualityComparer object. - The expected value - The actual value + The IComparer object to use. + Self. - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Flag the constraint to use the supplied IEqualityComparer object. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + The IComparer object to use. + Self. - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Compares two collection members for equality - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Return a new CollectionTally for use in making tests - The expected value - The actual value + The collection to be included in the tally - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Flag the constraint to ignore case and return self. - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Construct a CollectionContainsConstraint - The expected value - The actual value - The message to display in case of failure + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Test whether the expected item is contained in the collection - The expected value - The actual value + + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Write a descripton of the constraint to a MessageWriter - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. - The expected value - The actual value - The message to display in case of failure - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Construct a CollectionEquivalentConstraint - The expected value - The actual value + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Test whether two collections are equivalent - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message + + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + Write a description of this constraint to a MessageWriter - The expected value - The actual value - The message to display in case of failure + - + - Verifies that two values are not equal. If they are equal, then an - is thrown. + CollectionOrderedConstraint is used to test whether a collection is ordered. - The expected value - The actual value - + - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. + Construct a CollectionOrderedConstraint - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. + Modifies the constraint to use an IComparer and returns self. - The value that is expected - The actual value - The message to display in case of failure - + - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. + Modifies the constraint to use an IComparer<T> and returns self. - The value that is expected - The actual value - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Modifies the constraint to use a Comparison<T> and returns self. - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Modifies the constraint to test ordering by the value of + a specified property and returns self. - The expected object - The actual object - The message to display in case of failure - + - Asserts that two objects refer to the same object. If they - are not the same an is thrown. + Test whether the collection is ordered - The expected object - The actual object + + - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Write a description of the constraint to a MessageWriter - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + Returns the string representation of the constraint. - The expected object - The actual object - The message to display in case of failure + - + - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. + If used performs a reverse comparison - The expected object - The actual object - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + CollectionSubsetConstraint is used to determine whether + one collection is a subset of another - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Construct a CollectionSubsetConstraint - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The collection that the actual value is expected to be a subset of - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Test whether the actual collection is a subset of + the expected collection provided. - The first value, expected to be greater - The second value, expected to be less + + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Write a description of this constraint to a MessageWriter - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + CollectionTally counts (tallies) the number of + occurences of each object in one or more enumerations. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Construct a CollectionTally object from a comparer and a collection - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Try to remove an object from the tally - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + The object to remove + True if successful, false if the object was not found - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Try to remove a set of objects from the tally - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The objects to remove + True if successful, false if any object was not found - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + The number of objects remaining in the tally - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + ComparisonAdapter class centralizes all comparisons of + values in NUnit, adapting to the use of any provided + IComparer, IComparer<T> or Comparison<T> - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Returns a ComparisonAdapter that wraps an IComparer - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Returns a ComparisonAdapter that wraps an IComparer<T> - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Returns a ComparisonAdapter that wraps a Comparison<T> - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compares two objects - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Construct a ComparisonAdapter for an IComparer - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compares two objects - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + + + - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Construct a default ComparisonAdapter - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + ComparisonAdapter<T> extends ComparisonAdapter and + allows use of an IComparer<T> or Comparison<T> + to actually perform the comparison. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Construct a ComparisonAdapter for an IComparer<T> - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compare a Type T to an object - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Construct a ComparisonAdapter for a Comparison<T> - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Compare a Type T to an object - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. + Abstract base class for constraints that compare values to + determine if one is greater than, equal to or less than + the other. This class supplies the Using modifiers. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + ComparisonAdapter to be used in making the comparison - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Modifies the constraint to use an IComparer and returns self - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Modifies the constraint to use an IComparer<T> and returns self - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Modifies the constraint to use a Comparison<T> and returns self - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + Delegate used to delay evaluation of the actual value + to be used in evaluating a constraint +
- + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + ConstraintBuilder maintains the stacks that are used in + processing a ConstraintExpression. An OperatorStack + is used to hold operators that are waiting for their + operands to be reognized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Appends the specified operator to the expression by first + reducing the operator stack and then pushing the new + operator on the stack. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The operator to push. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Appends the specified constraint to the expresson by pushing + it on the constraint stack. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The constraint to push. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Sets the top operator right context. - The first value, expected to be less - The second value, expected to be greater + The right context. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Reduces the operator stack until the topmost item + precedence is greater than or equal to the target precedence. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + The target precedence. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Resolves this instance, returning a Constraint. If the builder + is not currently in a resolvable state, an exception is thrown. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The resolved constraint - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets a value indicating whether this instance is resolvable. - The first value, expected to be less - The second value, expected to be greater + + true if this instance is resolvable; otherwise, false. + - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + OperatorStack is a type-safe stack for holding ConstraintOperators - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The builder. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Pushes the specified operator onto the stack. - The first value, expected to be less - The second value, expected to be greater + The op. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Pops the topmost operator from the stack. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets a value indicating whether this is empty. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + true if empty; otherwise, false. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Gets the topmost operator without modifying the stack. - The first value, expected to be less - The second value, expected to be greater + The top. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + ConstraintStack is a type-safe stack for holding Constraints - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure + The builder. - + - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. + Pushes the specified constraint. As a side effect, + the constraint's builder field is set to the + ConstraintBuilder owning this stack. - The first value, expected to be less - The second value, expected to be greater + The constraint. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Pops this topmost constrait from the stack. + As a side effect, the constraint's builder + field is set to null. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message + - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets a value indicating whether this is empty. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + true if empty; otherwise, false. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Gets the topmost constraint without modifying the stack. - The first value, expected to be greater - The second value, expected to be less + The topmost constraint - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + ConstraintExpression represents a compound constraint in the + process of being constructed from a series of syntactic elements. + + Individual elements are appended to the expression as they are + reognized. Once an actual Constraint is appended, the expression + returns a resolvable Constraint. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + ConstraintExpressionBase is the abstract base class for the + ConstraintExpression class, which represents a + compound constraint in the process of being constructed + from a series of syntactic elements. + + NOTE: ConstraintExpressionBase is separate because the + ConstraintExpression class was generated in earlier + versions of NUnit. The two classes may be combined + in a future version. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + The ConstraintBuilder holding the elements recognized so far - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Initializes a new instance of the + class passing in a ConstraintBuilder, which may be pre-populated. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The builder. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a string representation of the expression as it + currently stands. This should only be used for testing, + since it has the side-effect of resolving the expression. - The first value, expected to be greater - The second value, expected to be less + - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Appends an operator to the expression and returns the + resulting expression itself. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Appends a self-resolving operator to the expression and + returns a new ResolvableConstraintExpression. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Appends a constraint to the expression and returns that + constraint, which is associated with the current state + of the expression being built. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Initializes a new instance of the class. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Initializes a new instance of the + class passing in a ConstraintBuilder, which may be pre-populated. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure + The builder. - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding only if a specified number of them succeed. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a constraint that tests two items for equality - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a constraint that tests that two references are the same object - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the + actual value is greater than the suppled argument - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - + - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument - The first value, expected to be greater - The second value, expected to be less - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the + actual value is less than the suppled argument - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - + - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - The first value, expected to be less - The second value, expected to be greater - + - Asserts that an object is contained in a list. + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. - The expected object - The list to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - + - Asserts that an object is contained in a list. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - The expected object - The list to be examined - The message to display in case of failure - + - Asserts that an object is contained in a list. + Returns a constraint that succeeds if the actual + value matches the regular expression supplied as an argument. - The expected object - The list to be examined - + - Gets the number of assertions executed so far and - resets the counter to zero. + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. - + - AssertionHelper is an optional base class for user tests, - allowing the use of shorter names for constraints and - asserts and avoiding conflict with the definition of - , from which it inherits much of its - behavior, in certain mock object frameworks. + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. - A Constraint to be applied - The actual value to test - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. + Returns a constraint that tests whether the actual value falls + within a specified range. - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That + Returns a ConstraintExpression that negates any + following constraint. - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Returns a ConstraintExpression that negates any + following constraint. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. - A Constraint to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to Assert.That. - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to Assert.That. + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. - The evaluated condition - The message to display if the condition is false - + - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically Assert.That. + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. - The evaluated condition - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. - A TestDelegate to be executed - A ThrowsConstraint used in the test - + - Returns a ListMapper based on a collection. + With is currently a NOP - reserved for future use. - The original collection - - + - Provides static methods to express the assumptions - that must be met for a test to give a meaningful - result. If an assumption is not met, the test - should produce an inconclusive result. + Returns a constraint that tests for null - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Returns a constraint that tests for True - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Returns a constraint that tests for False - - - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests for a positive value - A Constraint expression to be applied - The actual value to test - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests for a negative value - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests for NaN - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests for empty - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests whether a collection + contains all unique items. - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - + - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests whether an object graph is serializable in binary format. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests whether an object graph is serializable in xml format. - A Constraint expression to be applied - The actual value to test - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + Returns a constraint that tests whether a collection is ordered - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - + - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. + ContainsConstraint tests a whether a string contains a substring + or a collection contains an object. It postpones the decision of + which test to use until the type of the actual argument is known. + This allows testing whether a string is contained in a collection + or as a substring of another string using the same syntax. - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message + Initializes a new instance of the class. +
+ The expected. - + - Asserts that a condition is true. If the condition is false the method throws - an . + Test whether the constraint is satisfied by a given value - The evaluated condition - The message to display if the condition is false + The value to be tested + True for success, false for failure - + - Asserts that a condition is true. If the condition is false the - method throws an . + Write the constraint description to a MessageWriter - The evaluated condition + The writer on which the description is displayed - + - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. + Flag the constraint to use the supplied IComparer object. - A TestDelegate to be executed - A ThrowsConstraint used in the test + The IComparer object to use. + Self. - + - A set of Assert methods operationg on one or more collections + Flag the constraint to use the supplied IComparer object. + The IComparer object to use. + Self. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Flag the constraint to use the supplied Comparison object. - - + The IComparer object to use. + Self. - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Flag the constraint to use the supplied IEqualityComparer object. - - + The IComparer object to use. + Self. - + - Asserts that all items contained in collection are of the type specified by expectedType. + Flag the constraint to use the supplied IEqualityComparer object. - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of + The IComparer object to use. + Self. - + - Asserts that all items contained in collection are of the type specified by expectedType. + Flag the constraint to ignore case and return self. - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - + - Asserts that all items contained in collection are of the type specified by expectedType. + Applies a delay to the match so that a match can be evaluated in the future. - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that all items contained in collection are not equal to null. + Creates a new DelayedConstraint - IEnumerable containing objects to be considered + The inner constraint two decorate + The time interval after which the match is performed + If the value of is less than 0 - + - Asserts that all items contained in collection are not equal to null. + Creates a new DelayedConstraint - IEnumerable containing objects to be considered - The message that will be displayed on failure + The inner constraint two decorate + The time interval after which the match is performed + The time interval used for polling + If the value of is less than 0 - + - Asserts that all items contained in collection are not equal to null. + Test whether the constraint is satisfied by a given value - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + The value to be tested + True for if the base constraint fails, false if it succeeds - + - Ensures that every object contained in collection exists within the collection - once and only once. + Test whether the constraint is satisfied by a delegate - IEnumerable of objects to be considered + The delegate whose value is to be tested + True for if the base constraint fails, false if it succeeds - + - Ensures that every object contained in collection exists within the collection - once and only once. + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. - IEnumerable of objects to be considered - The message that will be displayed on failure + A reference to the value to be tested + True for success, false for failure - + - Ensures that every object contained in collection exists within the collection - once and only once. + Write the constraint description to a MessageWriter - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + The writer on which the description is displayed - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. + Write the actual value for a failing constraint test to a MessageWriter. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered + The writer on which the actual value is displayed - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. + Returns the string representation of the constraint. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. + EmptyCollectionConstraint tests whether a collection is empty. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. + Check that the collection is empty - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure + + - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. + Write the constraint description to a MessageWriter - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + - + - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. + EmptyConstraint tests a whether a string or collection is empty, + postponing the decision about which test is applied until the + type of the actual argument is known. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + Test whether the constraint is satisfied by a given value - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered + The value to be tested + True for success, false for failure - + - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + Write the constraint description to a MessageWriter - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure + The writer on which the description is displayed - + - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + EmptyDirectoryConstraint is used to test that a directory is empty - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that expected and actual are not exactly equal. + Test whether the constraint is satisfied by a given value - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered + The value to be tested + True for success, false for failure - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Write the constraint description to a MessageWriter - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable + The writer on which the description is displayed - + - Asserts that expected and actual are not exactly equal. + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure + The writer on which the actual value is displayed - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + EmptyStringConstraint tests whether a string is empty. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - + - Asserts that expected and actual are not exactly equal. + Test whether the constraint is satisfied by a given value - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + The value to be tested + True for success, false for failure - + - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. + Write the constraint description to a MessageWriter - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message + The writer on which the description is displayed - + - Asserts that expected and actual are not equivalent. + EndsWithConstraint can test whether a string ends + with an expected substring. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - + - Asserts that expected and actual are not equivalent. + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - + - Asserts that expected and actual are not equivalent. + The expected value - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that collection contains actual as an item. + Indicates whether tests should be case-insensitive - IEnumerable of objects to be considered - Object to be found within collection - + - Asserts that collection contains actual as an item. + Constructs a StringConstraint given an expected value - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure + The expected value - + - Asserts that collection contains actual as an item. + Test whether the constraint is satisfied by a given value - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - Arguments to be used in formatting the message + The value to be tested + True for success, false for failure - + - Asserts that collection does not contain actual as an item. + Test whether the constraint is satisfied by a given string - IEnumerable of objects to be considered - Object that cannot exist within collection + The string to be tested + True for success, false for failure - + - Asserts that collection does not contain actual as an item. + Modify the constraint to ignore case in matching. - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - + - Asserts that collection does not contain actual as an item. + Initializes a new instance of the class. - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - Arguments to be used in formatting the message + The expected string - + - Asserts that superset is not a subject of subset. + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. - The IEnumerable superset to be considered - The IEnumerable subset to be considered + + - + - Asserts that superset is not a subject of subset. + Write the constraint description to a MessageWriter - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure + The writer on which the description is displayed - + - Asserts that superset is not a subject of subset. + EqualConstraint is able to compare an actual value with the + expected value provided in its constructor. Two objects are + considered equal if both are null, or if both have the same + value. NUnit has special semantics for some object types. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - + - Asserts that superset is a subset of subset. + If true, strings in error messages will be clipped - The IEnumerable superset to be considered - The IEnumerable subset to be considered - + - Asserts that superset is a subset of subset. + NUnitEqualityComparer used to test equality. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - + - Asserts that superset is a subset of subset. + Initializes a new instance of the class. - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message + The expected value. - + - Assert that an array, list or other collection is empty + Flag the constraint to use a tolerance when determining equality. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + Tolerance value to be used + Self. - + - Assert that an array, list or other collection is empty + Flag the constraint to use the supplied IComparer object. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + The IComparer object to use. + Self. - + - Assert that an array,list or other collection is empty + Flag the constraint to use the supplied IComparer object. - An array, list or other collection implementing IEnumerable + The IComparer object to use. + Self. - + - Assert that an array, list or other collection is empty + Flag the constraint to use the supplied IComparer object. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + The IComparer object to use. + Self. - + - Assert that an array, list or other collection is empty + Flag the constraint to use the supplied Comparison object. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + The IComparer object to use. + Self. - + - Assert that an array,list or other collection is empty + Flag the constraint to use the supplied IEqualityComparer object. - An array, list or other collection implementing IEnumerable + The IComparer object to use. + Self. - + - Assert that an array, list or other collection is ordered + Flag the constraint to use the supplied IEqualityComparer object. - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message + The IComparer object to use. + Self. - + - Assert that an array, list or other collection is ordered + Test whether the constraint is satisfied by a given value - An array, list or other collection implementing IEnumerable - The message to be displayed on failure + The value to be tested + True for success, false for failure - + - Assert that an array, list or other collection is ordered + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. - An array, list or other collection implementing IEnumerable + The MessageWriter to write to - + - Assert that an array, list or other collection is ordered + Write description of this constraint - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - Arguments to be used in formatting the message + The MessageWriter to write to - + - Assert that an array, list or other collection is ordered + Display the failure information for two collections that did not match. - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure + The MessageWriter on which to display + The expected collection. + The actual collection + The depth of this failure in a set of nested collections - + - Assert that an array, list or other collection is ordered + Displays a single line showing the types and sizes of the expected + and actual enumerations, collections or arrays. If both are identical, + the value is only shown once. - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons + The MessageWriter on which to display + The expected collection or array + The actual collection or array + The indentation level for the message line - + - Static helper class used in the constraint-based syntax + Displays a single line showing the point in the expected and actual + arrays at which the comparison failed. If the arrays have different + structures or dimensions, both values are shown. + The MessageWriter on which to display + The expected array + The actual array + Index of the failure point in the underlying collections + The indentation level for the message line - + - Creates a new SubstringConstraint + Display the failure information for two IEnumerables that did not match. - The value of the substring - A SubstringConstraint + The MessageWriter on which to display + The expected enumeration. + The actual enumeration + The depth of this failure in a set of nested collections - + - Creates a new CollectionContainsConstraint. + Flag the constraint to ignore case and return self. - The item that should be found. - A new CollectionContainsConstraint - + - Summary description for DirectoryAssert + Flag the constraint to suppress string clipping + and return self. - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Flag the constraint to compare arrays as collections + and return self. - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Switches the .Within() modifier to interpret its tolerance as + a distance in representable values (see remarks). - - + Self. + + Ulp stands for "unit in the last place" and describes the minimum + amount a given value can change. For any integers, an ulp is 1 whole + digit. For floating point values, the accuracy of which is better + for smaller numbers and worse for larger numbers, an ulp depends + on the size of the number. Using ulps for comparison of floating + point results instead of fixed tolerances is safer because it will + automatically compensate for the added inaccuracy of larger numbers. + - + - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. + Switches the .Within() modifier to interpret its tolerance as + a percentage that the actual values is allowed to deviate from + the expected value. + Self - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Causes the tolerance to be interpreted as a TimeSpan in days. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message + Self - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Causes the tolerance to be interpreted as a TimeSpan in hours. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal + Self - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Causes the tolerance to be interpreted as a TimeSpan in minutes. - A directory containing the value that is expected - A directory containing the actual value + Self - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Causes the tolerance to be interpreted as a TimeSpan in seconds. - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message + Self - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Causes the tolerance to be interpreted as a TimeSpan in milliseconds. - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal + Self - + - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Causes the tolerance to be interpreted as a TimeSpan in clock ticks. - A directory path string containing the value that is expected - A directory path string containing the actual value + Self - + - Asserts that two directories are not equal. If they are equal - an is thrown. + EqualityAdapter class handles all equality comparisons + that use an IEqualityComparer, IEqualityComparer<T> + or a ComparisonAdapter. - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Compares two objects, returning true if they are equal - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns true if the two objects can be compared by this adapter. + The base adapter cannot handle IEnumerables except for strings. - A directory containing the value that is expected - A directory containing the actual value - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns an EqualityAdapter that wraps an IComparer. - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - Arguments to be used in formatting the message - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns an EqualityAdapter that wraps an IEqualityComparer. - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - + - Asserts that two directories are not equal. If they are equal - an is thrown. + Returns an EqualityAdapter that wraps an IEqualityComparer<T>. - A directory path string containing the value that is expected - A directory path string containing the actual value - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Returns an EqualityAdapter that wraps an IComparer<T>. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Returns an EqualityAdapter that wraps a Comparison<T>. - A directory to search - The message to display if directories are not equal - + - Asserts that the directory is empty. If it is not empty - an is thrown. + EqualityAdapter that wraps an IComparer. - A directory to search - + - Asserts that the directory is empty. If it is not empty - an is thrown. + Returns true if the two objects can be compared by this adapter. + Generic adapter requires objects of the specified type. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - + - Asserts that the directory is empty. If it is not empty - an is thrown. + EqualityAdapter that wraps an IComparer. - A directory to search - The message to display if directories are not equal - + - Asserts that the directory is empty. If it is not empty - an is thrown. + EqualityAdapterList represents a list of EqualityAdapters + in a common class across platforms. - A directory to search - + - Asserts that the directory is not empty. If it is empty - an is thrown. + ExactCountConstraint applies another constraint to each + item in a collection, succeeding only if a specified + number of items succeed. - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Construct an ExactCountConstraint on top of an existing constraint - A directory to search - The message to display if directories are not equal + + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Apply the item constraint to each item in the collection, + succeeding only if the expected number of items pass. - A directory to search + + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Write a description of this constraint to a MessageWriter - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message + - + - Asserts that the directory is not empty. If it is empty - an is thrown. + ExactTypeConstraint is used to test that an object + is of the exact type provided in the constructor - A directory to search - The message to display if directories are not equal - + - Asserts that the directory is not empty. If it is empty - an is thrown. + Construct an ExactTypeConstraint for a given Type - A directory to search + The expected Type. - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Test that an object is of the exact type specified - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message + The actual value. + True if the tested object is of the exact type provided, otherwise false. - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Write the description of this constraint to a MessageWriter - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path + The MessageWriter to use - + - Asserts that path contains actual as a subdirectory or - an is thrown. + ExceptionTypeConstraint is a special version of ExactTypeConstraint + used to provided detailed info about the exception thrown in + an error message. - A directory to search - sub-directory asserted to exist under directory - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Constructs an ExceptionTypeConstraint + + + + + Write the actual value for a failing constraint test to a + MessageWriter. Overriden to write additional information + in the case of an Exception. + + The MessageWriter to use + + + + FailurePoint class represents one point of failure + in an equality test. + + + + + The location of the failure + + + + + The expected value + + + + + The actual value + + + + + Indicates whether the expected value is valid + + + + + Indicates whether the actual value is valid + + + + + FailurePointList represents a set of FailurePoints + in a cross-platform way. + + + + + FalseConstraint tests that the actual value is false + + + + + Initializes a new instance of the class. + + + + Helper routines for working with floating point numbers + + + The floating point comparison code is based on this excellent article: + http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm + + + "ULP" means Unit in the Last Place and in the context of this library refers to + the distance between two adjacent floating point numbers. IEEE floating point + numbers can only represent a finite subset of natural numbers, with greater + accuracy for smaller numbers and lower accuracy for very large numbers. + + + If a comparison is allowed "2 ulps" of deviation, that means the values are + allowed to deviate by up to 2 adjacent floating point values, which might be + as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. + + + + + Compares two floating point values for equality + First floating point value to be compared + Second floating point value t be compared + + Maximum number of representable floating point values that are allowed to + be between the left and the right floating point values + + True if both numbers are equal or close to being equal + + + Floating point values can only represent a finite subset of natural numbers. + For example, the values 2.00000000 and 2.00000024 can be stored in a float, + but nothing inbetween them. + + + This comparison will count how many possible floating point values are between + the left and the right number. If the number of possible values between both + numbers is less than or equal to maxUlps, then the numbers are considered as + being equal. + + + Implementation partially follows the code outlined here: + http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ + + + + + Compares two double precision floating point values for equality + First double precision floating point value to be compared + Second double precision floating point value t be compared + + Maximum number of representable double precision floating point values that are + allowed to be between the left and the right double precision floating point values + + True if both numbers are equal or close to being equal + + + Double precision floating point values can only represent a limited series of + natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 + can be stored in a double, but nothing inbetween them. + + + This comparison will count how many possible double precision floating point + values are between the left and the right number. If the number of possible + values between both numbers is less than or equal to maxUlps, then the numbers + are considered as being equal. + + + Implementation partially follows the code outlined here: + http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ + + + + + + Reinterprets the memory contents of a floating point value as an integer value + + + Floating point value whose memory contents to reinterpret + + + The memory contents of the floating point value interpreted as an integer + + + + + Reinterprets the memory contents of a double precision floating point + value as an integer value + + + Double precision floating point value whose memory contents to reinterpret + + + The memory contents of the double precision floating point value + interpreted as an integer + + + + + Reinterprets the memory contents of an integer as a floating point value + + Integer value whose memory contents to reinterpret + + The memory contents of the integer value interpreted as a floating point value + + + + + Reinterprets the memory contents of an integer value as a double precision + floating point value + + Integer whose memory contents to reinterpret + + The memory contents of the integer interpreted as a double precision + floating point value + + + + Union of a floating point variable and an integer + + + The union's value as a floating point variable + + + The union's value as an integer + + + The union's value as an unsigned integer + + + Union of a double precision floating point variable and a long + + + The union's value as a double precision floating point variable + + + The union's value as a long + + + The union's value as an unsigned long + + + + Tests whether a value is greater than the value supplied to its constructor + + + + + The value against which a comparison is to be made + + + + + Initializes a new instance of the class. + + The expected value. + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Tests whether a value is greater than or equal to the value supplied to its constructor - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - + - Asserts that path contains actual as a subdirectory or - an is thrown. + The value against which a comparison is to be made - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - + - Asserts that path contains actual as a subdirectory or - an is thrown. + Initializes a new instance of the class. - A directory to search - sub-directory asserted to exist under directory + The expected value. - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + Write the constraint description to a MessageWriter - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message + The writer on which the description is displayed - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + Test whether the constraint is satisfied by a given value - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path + The value to be tested + True for success, false for failure - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + InstanceOfTypeConstraint is used to test that an object + is of the same type provided or derived from it. - A directory to search - sub-directory asserted to exist under directory - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + Construct an InstanceOfTypeConstraint for the type provided - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message + The expected Type - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + Test whether an object is of the specified type or a derived type - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path + The object to be tested + True if the object is of the provided type or derives from it, otherwise false. - + - Asserts that path does not contain actual as a subdirectory or - an is thrown. + Write a description of this constraint to a MessageWriter - A directory to search - sub-directory asserted to exist under directory + The MessageWriter to use - + - Summary description for FileAssert. + Tests whether a value is less than the value supplied to its constructor - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + The value against which a comparison is to be made - - - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + Initializes a new instance of the class. - - + The expected value. - + - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Test whether the constraint is satisfied by a given value - The expected Stream - The actual Stream - The message to display if Streams are not equal - Arguments to be used in formatting the message + The value to be tested + True for success, false for failure - + - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Tests whether a value is less than or equal to the value supplied to its constructor - The expected Stream - The actual Stream - The message to display if objects are not equal - + - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + The value against which a comparison is to be made - The expected Stream - The actual Stream - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Initializes a new instance of the class. - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message + The expected value. - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Write the constraint description to a MessageWriter - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal + The writer on which the description is displayed - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Test whether the constraint is satisfied by a given value - A file containing the value that is expected - A file containing the actual value + The value to be tested + True for success, false for failure - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Static methods used in creating messages - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Static string used when strings are clipped - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal - + - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. + Returns the representation of a type as used in NUnitLite. + This is the same as Type.ToString() except for arrays, + which are displayed with their declared sizes. - The path to a file containing the value that is expected - The path to a file containing the actual value + + - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Converts any control characters in a string + to their escaped representation. - The expected Stream - The actual Stream - The message to be displayed when the two Stream are the same. - Arguments to be used in formatting the message + The string to be converted + The converted string - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Return the a string representation for a set of indices into an array - The expected Stream - The actual Stream - The message to be displayed when the Streams are the same. + Array of indices for which a string is needed - + - Asserts that two Streams are not equal. If they are equal - an is thrown. + Get an array of indices representing the point in a enumerable, + collection or array corresponding to a single int index into the + collection. - The expected Stream - The actual Stream + The collection to which the indices apply + Index in the collection + Array of indices - + - Asserts that two files are not equal. If they are equal - an is thrown. + Clip a string to a given length, starting at a particular offset, returning the clipped + string with ellipses representing the removed parts - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message + The string to be clipped + The maximum permitted length of the result string + The point at which to start clipping + The clipped string - + - Asserts that two files are not equal. If they are equal - an is thrown. + Clip the expected and actual strings in a coordinated fashion, + so that they may be displayed together. - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal + + + + - + - Asserts that two files are not equal. If they are equal - an is thrown. + Shows the position two strings start to differ. Comparison + starts at the start index. - A file containing the value that is expected - A file containing the actual value + The expected string + The actual string + The index in the strings at which comparison should start + Boolean indicating whether case should be ignored + -1 if no mismatch found, or the index where mismatch found - + - Asserts that two files are not equal. If they are equal - an is thrown. + NaNConstraint tests that the actual value is a double or float NaN - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - + - Asserts that two files are not equal. If they are equal - an is thrown. + Test that the actual value is an NaN - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal + + - + - Asserts that two files are not equal. If they are equal - an is thrown. + Write the constraint description to a specified writer - The path to a file containing the value that is expected - The path to a file containing the actual value + - + - GlobalSettings is a place for setting default values used - by the framework in performing asserts. + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. - + - Default tolerance for floating point equality + Construct a NoItemConstraint on top of an existing constraint + - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Apply the item constraint to each item in the collection, + failing if any item fails. + + - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. + Write a description of this constraint to a MessageWriter + - + - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. + NotConstraint negates the effect of some other constraint - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Initializes a new instance of the class. + The base constraint to be negated. - + - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. + Test whether the constraint is satisfied by a given value + The value to be tested + True for if the base constraint fails, false if it succeeds - + - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - Returns a ConstraintExpression that negates any - following constraint. + Write the actual value for a failing constraint test to a MessageWriter. + The writer on which the actual value is displayed - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + NullConstraint tests that the actual value is null - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. + Initializes a new instance of the class. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. + NullEmptyStringConstraint tests whether a string is either null or empty. - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. + Constructs a new NullOrEmptyStringConstraint - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. + The Numerics class contains common operations on numeric values. - + - Interface implemented by a user fixture in order to - validate any expected exceptions. It is only called - for test methods marked with the ExpectedException - attribute. + Checks the type of the object, returning true if + the object is a numeric type. + The object to check + true if the object is a numeric type - + - Method to handle an expected exception + Checks the type of the object, returning true if + the object is a floating point numeric type. - The exception to be handled + The object to check + true if the object is a floating point numeric type - + - Helper class with properties and methods that supply - a number of constraints used in Asserts. + Checks the type of the object, returning true if + the object is a fixed point numeric type. + The object to check + true if the object is a fixed point numeric type - + - Returns a constraint that tests two items for equality + Test two numeric values for equality, performing the usual numeric + conversions and using a provided or default tolerance. If the tolerance + provided is Empty, this method may set it to a default tolerance. + The expected value + The actual value + A reference to the tolerance in effect + True if the values are equal - + - Returns a constraint that tests that two references are the same object + Compare two numeric values, performing the usual numeric conversions. + The expected value + The actual value + The relationship of the values to each other - + - Returns a constraint that tests whether the - actual value is greater than the suppled argument + NUnitComparer encapsulates NUnit's default behavior + in comparing two objects. - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Compares two objects + + + - + - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument + Returns the default NUnitComparer. - + - Returns a constraint that tests whether the - actual value is less than the suppled argument + Generic version of NUnitComparer + - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + Compare two objects of the same type - + - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + - + - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. + Compares two objects for equality within a tolerance + The first object to compare + The second object to compare + The tolerance to use in the comparison + - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + If true, all string comparisons will ignore case - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + If true, arrays will be treated as collections, allowing + those of different dimensions to be compared - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + Comparison objects used in comparisons for some constraints. - + - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. + List of points at which a failure occured. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + RecursionDetector used to check for recursion when + evaluating self-referencing enumerables. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Compares two objects for equality within a tolerance, setting + the tolerance to the actual tolerance used if an empty + tolerance is supplied. - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Helper method to compare two arrays - + - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. + Method to compare two DirectoryInfo objects + first directory to compare + second directory to compare + true if equivalent, false if not - + - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. + Returns the default NUnitEqualityComparer - + - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. + Gets and sets a flag indicating whether case should + be ignored in determining equality. - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Gets and sets a flag indicating that arrays should be + compared as collections, without regard to their shape. - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Gets the list of external comparers to be used to + test for equality. They are applied to members of + collections, in place of NUnit's own logic. - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Gets the list of failure points for the last Match performed. + The list consists of objects to be interpreted by the caller. + This generally means that the caller may only make use of + objects it has placed on the list at a particular depthy. - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + RecursionDetector detects when a comparison + between two enumerables has reached a point + where the same objects that were previously + compared are again being compared. This allows + the caller to stop the comparison if desired. - + - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. + Check whether two objects have previously + been compared, returning true if they have. + The two objects are remembered, so that a + second call will always return true. - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + OrConstraint succeeds if either member succeeds - + - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. + Create an OrConstraint from two other constraints + The first constraint + The second constraint - + - Returns a constraint that tests whether the actual value falls - within a specified range. + Apply the member constraints to an actual value, succeeding + succeeding as soon as one of them succeeds. + The actual value + True if either constraint succeeded - + - Returns a ConstraintExpression that negates any - following constraint. + Write a description for this contraint to a MessageWriter + The MessageWriter to receive the description - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. - + - Returns a constraint that tests for null + The expected path used in the constraint - + - Returns a constraint that tests for True + Flag indicating whether a caseInsensitive comparison should be made - + - Returns a constraint that tests for False + Construct a PathConstraint for a give expected path + The expected path - + - Returns a constraint that tests for a positive value + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - Returns a constraint that tests for a negative value + Returns true if the expected path and actual path match - + - Returns a constraint that tests for NaN + Returns the string representation of this constraint - + - Returns a constraint that tests for empty + Transform the provided path to its canonical form so that it + may be more easily be compared with other paths. + The original path + The path in canonical form - + - Returns a constraint that tests whether a collection - contains all unique items. + Test whether one path in canonical form is under another. + The first path - supposed to be the parent path + The second path - supposed to be the child path + Indicates whether case should be ignored + - + - Returns a constraint that tests whether an object graph is serializable in binary format. + Modifies the current instance to be case-insensitve + and returns it. - + - Returns a constraint that tests whether an object graph is serializable in xml format. + Modifies the current instance to be case-sensitve + and returns it. - + - Returns a constraint that tests whether a collection is ordered + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. - + - The Iz class is a synonym for Is intended for use in VB, - which regards Is as a keyword. + Construct a PredicateConstraint from a predicate - + - The List class is a helper class with properties and methods - that supply a number of constraints used with lists and collections. + Determines whether the predicate succeeds when applied + to the actual value. - + - List.Map returns a ListMapper, which can be used to map - the original collection to another collection. + Writes the description to a MessageWriter - - - + - ListMapper is used to transform a collection used as an actual argument - producing another collection to be used in the assertion. + PropertyConstraint extracts a named property and uses + its value as the actual value for a chained constraint. - + - Construct a ListMapper based on a collection + Initializes a new instance of the class. - The collection to be transformed + The name. + The constraint to apply to the property. - + - Produces a collection containing all the values of a property + Test whether the constraint is satisfied by a given value - The collection of property values - + The value to be tested + True for success, false for failure - + - Randomizer returns a set of random values in a repeatable - way, to allow re-running of tests if necessary. + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - Get a randomizer for a particular member, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + The writer on which the actual value is displayed - + - Get a randomizer for a particular parameter, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. + Returns the string representation of the constraint. + - + - Construct a randomizer using a random seed + PropertyExistsConstraint tests that a named property + exists on the object provided through Match. + + Originally, PropertyConstraint provided this feature + in addition to making optional tests on the vaue + of the property. The two constraints are now separate. - + - Construct a randomizer using a specified seed + Initializes a new instance of the class. + The name of the property. - + - Return an array of random doubles between 0.0 and 1.0. + Test whether the property exists for a given object - - + The object to be tested + True for success, false for failure - + - Return an array of random doubles with values in a specified range. + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - Return an array of random ints with values in a specified range. + Write the actual value for a failing constraint test to a + MessageWriter. + The writer on which the actual value is displayed - + - Get a random seed for use in creating a randomizer. + Returns the string representation of the constraint. + - + - The SpecialValue enum is used to represent TestCase arguments - that cannot be used as arguments to an Attribute. + RangeConstraint tests whether two values are within a + specified range. - + - Null represents a null value, which cannot be used as an - argument to an attriute under .NET 1.x + Initializes a new instance of the class. + From. + To. - + - Basic Asserts on strings. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. + Write the constraint description to a MessageWriter - - + The writer on which the description is displayed - + - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. + RegexConstraint can test whether a string matches + the pattern provided. - - - + - Asserts that a string is found within another string. + Initializes a new instance of the class. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message + The pattern. - + - Asserts that a string is found within another string. + Test whether the constraint is satisfied by a given value - The expected string - The string to be examined - The message to display in case of failure + The value to be tested + True for success, false for failure - + - Asserts that a string is found within another string. + Write the constraint description to a MessageWriter - The expected string - The string to be examined + The writer on which the description is displayed - + - Asserts that a string is not found within another string. + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string is found within another string. + Create a new instance of ResolvableConstraintExpression - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string is found within another string. + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. - The expected string - The string to be examined - + - Asserts that a string starts with another string. + Resolve the current expression to a Constraint - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string starts with another string. + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string starts with another string. + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. - The expected string - The string to be examined - + - Asserts that a string does not start with another string. + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string does not start with another string. + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string does not start with another string. + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. - The expected string - The string to be examined - + - Asserts that a string ends with another string. + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string ends with another string. + This operator creates a constraint that is satisfied if the + argument constraint is not satisfied. - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string ends with another string. + Appends an And Operator to the expression - The expected string - The string to be examined - + - Asserts that a string does not end with another string. + Appends an Or operator to the expression. - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that a string does not end with another string. + ReusableConstraint wraps a constraint expression after + resolving it so that it can be reused consistently. - The expected string - The string to be examined - The message to display in case of failure - + - Asserts that a string does not end with another string. + Construct a ReusableConstraint from a constraint expression - The expected string - The string to be examined + The expression to be resolved and reused - + - Asserts that two strings are equal, without regard to case. + Converts a constraint to a ReusableConstraint - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message + The constraint to be converted + A ReusableConstraint - + - Asserts that two strings are equal, without regard to case. + Returns the string representation of the constraint. - The expected string - The actual string - The message to display in case of failure + A string representing the constraint - + - Asserts that two strings are equal, without regard to case. + Resolves the ReusableConstraint by returning the constraint + that it originally wrapped. - The expected string - The actual string + A resolved constraint - + - Asserts that two strings are not equal, without regard to case. + SameAsConstraint tests whether an object is identical to + the object passed to its constructor - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - + - Asserts that two strings are Notequal, without regard to case. + Initializes a new instance of the class. - The expected string - The actual string - The message to display in case of failure + The expected object. - + - Asserts that two strings are not equal, without regard to case. + Test whether the constraint is satisfied by a given value - The expected string - The actual string + The value to be tested + True for success, false for failure - + - Asserts that a string matches an expected regular expression pattern. + Write the constraint description to a MessageWriter - The regex pattern to be matched - The actual string - The message to display in case of failure - Arguments used in formatting the message + The writer on which the description is displayed - + - Asserts that a string matches an expected regular expression pattern. + Summary description for SamePathConstraint. - The regex pattern to be matched - The actual string - The message to display in case of failure - + - Asserts that a string matches an expected regular expression pattern. + Initializes a new instance of the class. - The regex pattern to be matched - The actual string + The expected path - + - Asserts that a string does not match an expected regular expression pattern. + Test whether the constraint is satisfied by a given value - The regex pattern to be used - The actual string - The message to display in case of failure - Arguments used in formatting the message + The expected path + The actual path + True for success, false for failure - + - Asserts that a string does not match an expected regular expression pattern. + Write the constraint description to a MessageWriter - The regex pattern to be used - The actual string - The message to display in case of failure + The writer on which the description is displayed - + - Asserts that a string does not match an expected regular expression pattern. + SamePathOrUnderConstraint tests that one path is under another - The regex pattern to be used - The actual string - + - The TestCaseData class represents a set of arguments - and other parameter info to be used for a parameterized - test case. It provides a number of instance modifiers - for use in initializing the test case. - - Note: Instance modifiers are getters that return - the same instance after modifying it's state. + Initializes a new instance of the class. + The expected path - + - The argument list to be provided to the test + Test whether the constraint is satisfied by a given value + The expected path + The actual path + True for success, false for failure - + - The expected result to be returned + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - Set to true if this has an expected result + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. - + - The expected exception Type + Construct a SomeItemsConstraint on top of an existing constraint + - + - The FullName of the expected exception + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + - + - The name to be used for the test + Write a description of this constraint to a MessageWriter + - + - The description of the test + StartsWithConstraint can test whether a string starts + with an expected substring. - + - A dictionary of properties, used to add information - to tests without requiring the class to change. + Initializes a new instance of the class. + The expected string - + - If true, indicates that the test case is to be ignored + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + - + - If true, indicates that the test case is marked explicit + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - The reason for ignoring a test case + SubPathConstraint tests that the actual path is under the expected path - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The arguments. + The expected path - + - Initializes a new instance of the class. + Test whether the constraint is satisfied by a given value - The argument. + The expected path + The actual path + True for success, false for failure - + - Initializes a new instance of the class. + Write the constraint description to a MessageWriter - The first argument. - The second argument. + The writer on which the description is displayed - + - Initializes a new instance of the class. + SubstringConstraint can test whether a string contains + the expected substring. - The first argument. - The second argument. - The third argument. - + - Sets the expected result for the test + Initializes a new instance of the class. - The expected result - A modified TestCaseData + The expected. - + - Sets the expected exception type for the test + Test whether the constraint is satisfied by a given value - Type of the expected exception. - The modified TestCaseData instance + The value to be tested + True for success, false for failure - + - Sets the expected exception type for the test + Write the constraint description to a MessageWriter - FullName of the expected exception. - The modified TestCaseData instance + The writer on which the description is displayed - + - Sets the name of the test case + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. - The modified TestCaseData instance - + - Sets the description for the test case - being constructed. + Initializes a new instance of the class, + using a constraint to be applied to the exception. - The description. - The modified TestCaseData instance. + A constraint to apply to the caught exception. - + - Applies a category to the test + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. - - + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false - + - Applies a named property to the test + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. - - - - + - Applies a named property to the test + Write the constraint description to a MessageWriter - - - + The writer on which the description is displayed - + - Applies a named property to the test + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. - - - + The writer on which the actual value is displayed - + - Ignores this TestCase. + Returns the string representation of this constraint - - + - Ignores this TestCase, specifying the reason. + Get the actual exception thrown - used by Assert.Throws. - The reason. - - + - Marks this TestCase as Explicit + ThrowsNothingConstraint tests that a delegate does not + throw an exception. - - + - Marks this TestCase as Explicit, specifying the reason. + Test whether the constraint is satisfied by a given value - The reason. - + The value to be tested + True if no exception is thrown, otherwise false - + - Gets the argument list to be provided to the test + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - Gets the expected result + Write the actual value for a failing constraint test to a + MessageWriter. Overridden in ThrowsNothingConstraint to write + information about the exception that was actually caught. + The writer on which the actual value is displayed - + - Returns true if the result has been set + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. - + - Gets the expected exception Type + Constructs a linear tolerance of a specdified amount - + - Gets the FullName of the expected exception + Constructs a tolerance given an amount and ToleranceMode - + - Gets the name to be used for the test + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. - + - Gets the description of the test + Returns an empty Tolerance object, equivalent to + specifying no tolerance. In most cases, it results + in an exact match but for floats and doubles a + default tolerance may be used. - + - Gets a value indicating whether this is ignored. + Returns a zero Tolerance object, equivalent to + specifying an exact match. - true if ignored; otherwise, false. - + - Gets a value indicating whether this is explicit. + Gets the ToleranceMode for the current Tolerance - true if explicit; otherwise, false. - + - Gets the ignore reason. + Gets the value of the current Tolerance instance. - The ignore reason. - + - Gets a list of categories associated with this test. + Returns a new tolerance, using the current amount as a percentage. - + - Gets the property dictionary for this test + Returns a new tolerance, using the current amount in Ulps. - + - Provide the context information of the current test + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of days. - + - Constructs a TestContext using the provided context dictionary + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of hours. - A context dictionary - + - Get the current test context. This is created - as needed. The user may save the context for - use within a test, but it should not be used - outside the test for which it is created. + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of minutes. - + - Gets a TestAdapter representing the currently executing test in this context. + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of seconds. - + - Gets a ResultAdapter representing the current result for the test - executing in this context. + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of milliseconds. - + - Gets the directory containing the current test assembly. + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of clock ticks. - + - Gets the directory to be used for outputing files created - by this test run. + Returns true if the current tolerance is empty. - + - TestAdapter adapts a Test for consumption by - the user test code. + Modes in which the tolerance value for a comparison can be interpreted. - + - Constructs a TestAdapter for this context + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. - The context dictionary - + - The name of the test. + The tolerance is used as a numeric range within which + two compared values are considered to be equal. - + - The FullName of the test + Interprets the tolerance as the percentage by which + the two compared values my deviate from each other. - + - The properties of the test. + Compares two values based in their distance in + representable numbers. - + - ResultAdapter adapts a TestResult for consumption by - the user test code. + TrueConstraint tests that the actual value is true - + - Construct a ResultAdapter for a context + Initializes a new instance of the class. - The context holding the result - + - The TestState of current test. This maps to the ResultState - used in nunit.core and is subject to change in the future. + UniqueItemsConstraint tests whether all the items in a + collection are unique. - + - The TestStatus of current test. This enum will be used - in future versions of NUnit and so is to be preferred - to the TestState value. + Check that all items are unique. + + - + - Provides details about a test + Write a description of this constraint to a MessageWriter + - + - Creates an instance of TestDetails + XmlSerializableConstraint tests whether + an object is serializable in XML format. - The fixture that the test is a member of, if available. - The method that implements the test, if available. - The full name of the test. - A string representing the type of test, e.g. "Test Case". - Indicates if the test represents a suite of tests. - + - The fixture that the test is a member of, if available. + Test whether the constraint is satisfied by a given value + The value to be tested + True for success, false for failure - + - The method that implements the test, if available. + Write the constraint description to a MessageWriter + The writer on which the description is displayed - + - The full name of the test. + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + The writer on which the actual value is displayed - + - A string representing the type of test, e.g. "Test Case". + Returns the string representation of this constraint - + - Indicates if the test represents a suite of tests. + Represents a constraint that succeeds if all the + members of a collection match a base constraint. - + - The ResultState enum indicates the result of running a test + Abstract base for operators that indicate how to + apply a constraint to items in a collection. - + - The result is inconclusive + PrefixOperator takes a single constraint and modifies + it's action in some way. - + - The test was not runnable. + The ConstraintOperator class is used internally by a + ConstraintBuilder to represent an operator that + modifies or combines constraints. + + Constraint operators use left and right precedence + values to determine whether the top operator on the + stack should be reduced before pushing a new operator. - + - The test has been skipped. + The precedence value used when the operator + is about to be pushed to the stack. - + - The test has been ignored. + The precedence value used when the operator + is on the top of the stack. - + - The test succeeded + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + - + - The test failed + The syntax element preceding this operator - + - The test encountered an unexpected exception + The syntax element folowing this operator - + - The test was cancelled by the user + The precedence value used when the operator + is about to be pushed to the stack. - + - The TestStatus enum indicates the result of running a test + The precedence value used when the operator + is on the top of the stack. - + - The test was inconclusive + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + - + - The test has skipped + Returns the constraint created by applying this + prefix to another constraint. + + - + - The test succeeded + Constructs a CollectionOperator - + - The test failed + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + they all succeed. - + - Helper class with static methods used to supply constraints - that operate on strings. + Operator that requires both it's arguments to succeed - + - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. + Abstract base class for all binary operators - + - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + - + - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. - + - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. + Gets the left precedence of the operator - + - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. + Gets the right precedence of the operator - + - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. + Construct an AndOperator - + - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. + Apply the operator to produce an AndConstraint - + - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. + Operator that tests for the presence of a particular attribute + on a type and optionally applies further tests to the attribute. - + - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. - + - TextMessageWriter writes constraint descriptions and messages - in displayable form as a text stream. It tailors the display - of individual message components to form the standard message - format of NUnit assertion failure messages. + Construct an AttributeOperator for a particular Type + The Type of attribute tested - + - Prefix used for the expected value line of a message + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. - + - Prefix used for the actual value line of a message + Represents a constraint that succeeds if the specified + count of members of a collection match a base constraint. - + - Length of a message prefix + Construct an ExactCountOperator for a specified count + The expected count - + - Construct a TextMessageWriter + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. - + - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. + Represents a constraint that succeeds if none of the + members of a collection match a base constraint. - - - + - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. - The indentation level of the message - The message to be written - Any arguments used in formatting the message - + - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. + Negates the test of the constraint it wraps. - The constraint that failed - + - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. + Constructs a new NotOperator - The expected value - The actual value causing the failure - + - Display Expected and Actual lines for given values, including - a tolerance value on the expected line. + Returns a NotConstraint applied to its argument. - The expected value - The actual value causing the failure - The tolerance within which the test was made - + - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. + Operator that requires at least one of it's arguments to succeed - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in string comparisons - If true, clip the strings to fit the max line length - + - Writes the text for a connector. + Construct an OrOperator - The connector. - + - Writes the text for a predicate. + Apply the operator to produce an OrConstraint - The predicate. - + - Write the text for a modifier. + Operator used to test for the presence of a named Property + on an object and optionally apply further tests to the + value of that property. - The modifier. - + - Writes the text for an expected value. + Constructs a PropOperator for a particular named property - The expected value. - + - Writes the text for an actual value. + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. - The actual value. + - + - Writes the text for a generalized value. + Gets the name of the property to which the operator applies - The value. - + - Writes the text for a collection value, - starting at a particular point, to a max length + Represents a constraint that succeeds if any of the + members of a collection match a base constraint. - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - + - Write the generic 'Expected' line for a constraint + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + any of them succeed. - The constraint that failed - + - Write the generic 'Expected' line for a given value + Operator that tests that an exception is thrown and + optionally applies further tests to the exception. - The expected value - + - Write the generic 'Expected' line for a given value - and tolerance. + Construct a ThrowsOperator - The expected value - The tolerance within which the test was made - + - Write the generic 'Actual' line for a constraint + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. - The constraint for which the actual value is to be written - + - Write the generic 'Actual' line for a given value + Represents a constraint that simply wraps the + constraint provided as an argument, without any + further functionality, but which modifes the + order of evaluation because of its precedence. - The actual value causing a failure - + - Gets or sets the maximum line length for this writer + Constructor for the WithOperator - + - Helper class with properties and methods that supply - constraints that operate on exceptions. + Returns a constraint that wraps its argument - + - Creates a constraint specifying the exact type of exception expected + Thrown when an assertion failed. - + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Creates a constraint specifying the exact type of exception expected + Serialization Constructor - + - Creates a constraint specifying the type of exception expected + Thrown when an assertion failed. - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Creates a constraint specifying the type of exception expected + Serialization Constructor - + - Creates a constraint specifying an expected exception + Thrown when a test executes inconclusively. - + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Creates a constraint specifying an exception with a given InnerException + Serialization Constructor - + - Creates a constraint specifying an expected TargetInvocationException + Thrown when an assertion failed. - + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + - Creates a constraint specifying an expected TargetInvocationException + Serialization Constructor - + - Creates a constraint specifying an expected TargetInvocationException + + - + - Creates a constraint specifying that no exception is thrown + Compares two objects of a given Type for equality within a tolerance + The first object to compare + The second object to compare + The tolerance to use in the comparison + diff --git a/packages/NUnit.2.6.0.12054/license.txt b/packages/NUnit.2.6.3/license.txt similarity index 91% rename from packages/NUnit.2.6.0.12054/license.txt rename to packages/NUnit.2.6.3/license.txt index 530a6e0..b12903a 100644 --- a/packages/NUnit.2.6.0.12054/license.txt +++ b/packages/NUnit.2.6.3/license.txt @@ -1,4 +1,4 @@ -Copyright © 2002-2012 Charlie Poole +Copyright © 2002-2013 Charlie Poole Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov Copyright © 2000-2002 Philip A. Craig @@ -8,7 +8,7 @@ Permission is granted to anyone to use this software for any purpose, including 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. -Portions Copyright © 2002-2012 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig +Portions Copyright © 2002-2013 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. diff --git a/src/ImageResizer.FluentExtensions.Mvc/ImageResizer.FluentExtensions.Mvc.csproj b/src/ImageResizer.FluentExtensions.Mvc/ImageResizer.FluentExtensions.Mvc.csproj index 2546401..dfff4e7 100644 --- a/src/ImageResizer.FluentExtensions.Mvc/ImageResizer.FluentExtensions.Mvc.csproj +++ b/src/ImageResizer.FluentExtensions.Mvc/ImageResizer.FluentExtensions.Mvc.csproj @@ -34,7 +34,9 @@ - + + C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Mvc.dll + diff --git a/src/ImageResizer.FluentExtensions.Tests.Web/ImageResizer.FluentExtensions.Tests.Web.csproj b/src/ImageResizer.FluentExtensions.Tests.Web/ImageResizer.FluentExtensions.Tests.Web.csproj index 593e319..bea955a 100644 --- a/src/ImageResizer.FluentExtensions.Tests.Web/ImageResizer.FluentExtensions.Tests.Web.csproj +++ b/src/ImageResizer.FluentExtensions.Tests.Web/ImageResizer.FluentExtensions.Tests.Web.csproj @@ -1,5 +1,6 @@  + Debug AnyCPU @@ -15,6 +16,12 @@ v4.0 false false + true + + + + + 4.0 true @@ -157,8 +164,13 @@ + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + - + +