())
17 | .WithService.DefaultInterfaces()
18 | .LifestyleTransient()
19 | );
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/CastleWindsor/SharpArchInstaller.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.CastleWindsor
2 | {
3 | using Castle.MicroKernel.Registration;
4 | using Castle.MicroKernel.SubSystems.Configuration;
5 | using Castle.Windsor;
6 | using SharpArch.Domain.PersistenceSupport;
7 | using SharpArch.NHibernate;
8 |
9 | ///
10 | /// Installs S#Arch
11 | ///
12 | public class SharpArchInstaller : IWindsorInstaller
13 | {
14 | public void Install(IWindsorContainer container, IConfigurationStore store)
15 | {
16 | container.Register(
17 | Component.For(typeof (IEntityDuplicateChecker))
18 | .ImplementedBy(typeof (EntityDuplicateChecker))
19 | .Named("entityDuplicateChecker")
20 | .LifestyleTransient());
21 |
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_128.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_16.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_32.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_64.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_75.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_Shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_Shadow.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_ShadowWhite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/TardisBankLogo_ShadowWhite.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/Thumbs.db
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/hover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/hover.gif
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/meandleo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/meandleo.jpg
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/meandleo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/meandleo.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/seperator.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/seperator.gif
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/title_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/images/title_background.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/img/sharp_arch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/img/sharp_arch.jpg
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/img/sharp_arch_small.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/img/sharp_arch_small.gif
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/menu_style.css:
--------------------------------------------------------------------------------
1 | #menu {
2 | background: #333;
3 | float: left;
4 | list-style: none;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | }
9 | #menu li {
10 | float: left;
11 | margin: 0;
12 | padding: 0;
13 | }
14 | #menu a {
15 | background: #333 url("images/seperator.gif") bottom right no-repeat;
16 | color: #ccc;
17 | display: block;
18 | float: left;
19 | margin: 0;
20 | padding: 8px 12px;
21 | text-decoration: none;
22 | }
23 | #menu a:hover {
24 | background: #2580a2 url("images/hover.gif") bottom center no-repeat;
25 | color: #fff;
26 | padding-bottom: 8px;
27 | }
28 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/reset.css:
--------------------------------------------------------------------------------
1 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/text.css:
--------------------------------------------------------------------------------
1 | body{font:13px/1.5 'Helvetica Neue',Arial,'Liberation Sans',FreeSans,sans-serif}a:focus{outline:1px dotted}hr{border:0 #ccc solid;border-top-width:1px;clear:both;height:0}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}ul{list-style:disc}li{margin-left:30px}p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset{margin-bottom:20px}
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/accordion.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Accordion 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/accordion/#theming
10 | */
11 | .ui-accordion .ui-accordion-header {
12 | display: block;
13 | cursor: pointer;
14 | position: relative;
15 | margin: 2px 0 0 0;
16 | padding: .5em .5em .5em .7em;
17 | min-height: 0; /* support: IE7 */
18 | font-size: 100%;
19 | }
20 | .ui-accordion .ui-accordion-icons {
21 | padding-left: 2.2em;
22 | }
23 | .ui-accordion .ui-accordion-icons .ui-accordion-icons {
24 | padding-left: 2.2em;
25 | }
26 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
27 | position: absolute;
28 | left: .5em;
29 | top: 50%;
30 | margin-top: -8px;
31 | }
32 | .ui-accordion .ui-accordion-content {
33 | padding: 1em 2.2em;
34 | border-top: 0;
35 | overflow: auto;
36 | }
37 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/all.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI CSS Framework 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/category/theming/
10 | */
11 | @import "base.css";
12 | @import "theme.css";
13 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/autocomplete.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Autocomplete 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/autocomplete/#theming
10 | */
11 | .ui-autocomplete {
12 | position: absolute;
13 | top: 0;
14 | left: 0;
15 | cursor: default;
16 | }
17 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/base.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI CSS Framework 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/category/theming/
10 | */
11 | @import url("core.css");
12 |
13 | @import url("accordion.css");
14 | @import url("autocomplete.css");
15 | @import url("button.css");
16 | @import url("datepicker.css");
17 | @import url("dialog.css");
18 | @import url("draggable.css");
19 | @import url("menu.css");
20 | @import url("progressbar.css");
21 | @import url("resizable.css");
22 | @import url("selectable.css");
23 | @import url("selectmenu.css");
24 | @import url("sortable.css");
25 | @import url("slider.css");
26 | @import url("spinner.css");
27 | @import url("tabs.css");
28 | @import url("tooltip.css");
29 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/draggable.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Draggable 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | */
9 | .ui-draggable-handle {
10 | -ms-touch-action: none;
11 | touch-action: none;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_444444_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_444444_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_454545_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_454545_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_555555_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_555555_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_777620_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_777620_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_777777_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_777777_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_888888_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_888888_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_cc0000_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_cc0000_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_cd0a0a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_cd0a0a_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/menu.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Menu 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/menu/#theming
10 | */
11 | .ui-menu {
12 | list-style: none;
13 | padding: 0;
14 | margin: 0;
15 | display: block;
16 | outline: none;
17 | }
18 | .ui-menu .ui-menu {
19 | position: absolute;
20 | }
21 | .ui-menu .ui-menu-item {
22 | position: relative;
23 | margin: 0;
24 | padding: 3px 1em 3px .4em;
25 | cursor: pointer;
26 | min-height: 0; /* support: IE7 */
27 | /* support: IE10, see #8844 */
28 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
29 | }
30 | .ui-menu .ui-menu-divider {
31 | margin: 5px 0;
32 | height: 0;
33 | font-size: 0;
34 | line-height: 0;
35 | border-width: 1px 0 0 0;
36 | }
37 | .ui-menu .ui-state-focus,
38 | .ui-menu .ui-state-active {
39 | margin: -1px;
40 | }
41 |
42 | /* icon support */
43 | .ui-menu-icons {
44 | position: relative;
45 | }
46 | .ui-menu-icons .ui-menu-item {
47 | padding-left: 2em;
48 | }
49 |
50 | /* left-aligned */
51 | .ui-menu .ui-icon {
52 | position: absolute;
53 | top: 0;
54 | bottom: 0;
55 | left: .2em;
56 | margin: auto 0;
57 | }
58 |
59 | /* right-aligned */
60 | .ui-menu .ui-menu-icon {
61 | left: auto;
62 | right: 0;
63 | }
64 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/selectable.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Selectable 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | */
9 | .ui-selectable {
10 | -ms-touch-action: none;
11 | touch-action: none;
12 | }
13 | .ui-selectable-helper {
14 | position: absolute;
15 | z-index: 100;
16 | border: 1px dotted black;
17 | }
18 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/selectmenu.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Selectmenu 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/selectmenu/#theming
10 | */
11 | .ui-selectmenu-menu {
12 | padding: 0;
13 | margin: 0;
14 | position: absolute;
15 | top: 0;
16 | left: 0;
17 | display: none;
18 | }
19 | .ui-selectmenu-menu .ui-menu {
20 | overflow: auto;
21 | /* Support: IE7 */
22 | overflow-x: hidden;
23 | padding-bottom: 1px;
24 | }
25 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
26 | font-size: 1em;
27 | font-weight: bold;
28 | line-height: 1.5;
29 | padding: 2px 0.4em;
30 | margin: 0.5em 0 0 0;
31 | height: auto;
32 | border: 0;
33 | }
34 | .ui-selectmenu-open {
35 | display: block;
36 | }
37 | .ui-selectmenu-button {
38 | display: inline-block;
39 | overflow: hidden;
40 | position: relative;
41 | text-decoration: none;
42 | cursor: pointer;
43 | }
44 | .ui-selectmenu-button span.ui-icon {
45 | right: 0.5em;
46 | left: auto;
47 | margin-top: -8px;
48 | position: absolute;
49 | top: 50%;
50 | }
51 | .ui-selectmenu-button span.ui-selectmenu-text {
52 | text-align: left;
53 | padding: 0.4em 2.1em 0.4em 1em;
54 | display: block;
55 | line-height: 1.4;
56 | overflow: hidden;
57 | text-overflow: ellipsis;
58 | white-space: nowrap;
59 | }
60 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/sortable.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Sortable 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | */
9 | .ui-sortable-handle {
10 | -ms-touch-action: none;
11 | touch-action: none;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/spinner.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Spinner 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/spinner/#theming
10 | */
11 | .ui-spinner {
12 | position: relative;
13 | display: inline-block;
14 | overflow: hidden;
15 | padding: 0;
16 | vertical-align: middle;
17 | }
18 | .ui-spinner-input {
19 | border: none;
20 | background: none;
21 | color: inherit;
22 | padding: 0;
23 | margin: .2em 0;
24 | vertical-align: middle;
25 | margin-left: .4em;
26 | margin-right: 22px;
27 | }
28 | .ui-spinner-button {
29 | width: 16px;
30 | height: 50%;
31 | font-size: .5em;
32 | padding: 0;
33 | margin: 0;
34 | text-align: center;
35 | position: absolute;
36 | cursor: default;
37 | display: block;
38 | overflow: hidden;
39 | right: 0;
40 | }
41 | /* more specificity required here to override default borders */
42 | .ui-spinner a.ui-spinner-button {
43 | border-top: none;
44 | border-bottom: none;
45 | border-right: none;
46 | }
47 | /* vertically center icon */
48 | .ui-spinner .ui-icon {
49 | position: absolute;
50 | margin-top: -8px;
51 | top: 50%;
52 | left: 0;
53 | }
54 | .ui-spinner-up {
55 | top: 0;
56 | }
57 | .ui-spinner-down {
58 | bottom: 0;
59 | }
60 |
61 | /* TR overrides */
62 | .ui-spinner .ui-icon-triangle-1-s {
63 | /* need to fix icons sprite */
64 | background-position: -65px -16px;
65 | }
66 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/tabs.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Tabs 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/tabs/#theming
10 | */
11 | .ui-tabs {
12 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
13 | padding: .2em;
14 | }
15 | .ui-tabs .ui-tabs-nav {
16 | margin: 0;
17 | padding: .2em .2em 0;
18 | }
19 | .ui-tabs .ui-tabs-nav li {
20 | list-style: none;
21 | float: left;
22 | position: relative;
23 | top: 0;
24 | margin: 1px .2em 0 0;
25 | border-bottom-width: 0;
26 | padding: 0;
27 | white-space: nowrap;
28 | }
29 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
30 | float: left;
31 | padding: .5em 1em;
32 | text-decoration: none;
33 | }
34 | .ui-tabs .ui-tabs-nav li.ui-tabs-active {
35 | margin-bottom: -1px;
36 | padding-bottom: 1px;
37 | }
38 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
39 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
40 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
41 | cursor: text;
42 | }
43 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
44 | cursor: pointer;
45 | }
46 | .ui-tabs .ui-tabs-panel {
47 | display: block;
48 | border-width: 0;
49 | padding: 1em 1.4em;
50 | background: none;
51 | }
52 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/base/tooltip.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Tooltip 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/tooltip/#theming
10 | */
11 | .ui-tooltip {
12 | padding: 8px;
13 | position: absolute;
14 | z-index: 9999;
15 | max-width: 300px;
16 | -webkit-box-shadow: 0 0 5px #aaa;
17 | box-shadow: 0 0 5px #aaa;
18 | }
19 | body .ui-tooltip {
20 | border-width: 2px;
21 | }
22 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_glass_50_3baae3_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_glass_50_3baae3_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_2694e8_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_2694e8_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_3d80b3_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_3d80b3_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_72a7cf_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_72a7cf_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Content/themes/cupertino/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/AnalyticsController.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers
2 | {
3 | using System.Web.Mvc;
4 |
5 | using Suteki.TardisBank.Tasks;
6 |
7 | public class AnalyticsController : Controller
8 | {
9 | readonly TardisConfiguration configuration;
10 |
11 | public AnalyticsController(TardisConfiguration configuration)
12 | {
13 | this.configuration = configuration;
14 | }
15 |
16 | [ChildActionOnly]
17 | public PartialViewResult Index()
18 | {
19 | return this.PartialView(this.configuration);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/HomeController.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers
2 | {
3 | using System.Web.Mvc;
4 |
5 | using Suteki.TardisBank.Domain;
6 |
7 | public class HomeController : Controller
8 | {
9 | public ViewResult Index()
10 | {
11 | return this.View("Index");
12 | }
13 |
14 | public ViewResult Error()
15 | {
16 | // throw an error for testing
17 | throw new TardisBankException("Something really bad happened!");
18 | }
19 |
20 | public ActionResult NotFound()
21 | {
22 | return new HttpStatusCodeResult(404);
23 | }
24 |
25 | public ViewResult About()
26 | {
27 | return this.View();
28 | }
29 |
30 | public ViewResult Legal()
31 | {
32 | return this.View();
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/MenuController.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers
2 | {
3 | using System.Web.Mvc;
4 |
5 | using Suteki.TardisBank.Domain;
6 | using Suteki.TardisBank.Tasks;
7 |
8 | public class MenuController : Controller
9 | {
10 | readonly IUserService userService;
11 |
12 | public MenuController(IUserService userService)
13 | {
14 | this.userService = userService;
15 | }
16 |
17 | [ChildActionOnly]
18 | public PartialViewResult Index()
19 | {
20 | var user = this.userService.CurrentUser;
21 |
22 | if (user == null) return this.PartialView("GuestMenu");
23 | if (user is Parent) return this.PartialView("ParentMenu", user as Parent);
24 | if (user is Child) return this.PartialView("ChildMenu", user as Child);
25 |
26 | throw new TardisBankException("Unknown User type");
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/NewsController.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers
2 | {
3 | using System;
4 | using System.Web.Mvc;
5 | using Suteki.TardisBank.Domain;
6 | using Suteki.TardisBank.Tasks;
7 | using Suteki.TardisBank.Web.Mvc.Models.News;
8 |
9 | public class NewsController : Controller
10 | {
11 | readonly IHttpContextService context;
12 |
13 |
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// is .
18 | public NewsController(IHttpContextService context)
19 | {
20 | if (context == null) throw new ArgumentNullException("context");
21 | this.context = context;
22 | }
23 |
24 |
25 | // GET: News
26 | public ActionResult Index()
27 | {
28 | var vm = new NewsListModel
29 | {
30 | IsParent = context.UserIsInRole(UserRoles.Parent),
31 | };
32 |
33 | return View(vm);
34 | }
35 |
36 | [Authorize(Roles = UserRoles.Parent)]
37 | public ActionResult Edit()
38 | {
39 | return View();
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ScheduleRunnerController.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers
2 | {
3 | using System;
4 | using System.Web.Mvc;
5 |
6 | using Suteki.TardisBank.Tasks;
7 | using Suteki.TardisBank.Web.Mvc.Utilities;
8 |
9 | public class ScheduleRunnerController : Controller
10 | {
11 | readonly ISchedulerService schedulerService;
12 | readonly TardisConfiguration configuration;
13 |
14 | public ScheduleRunnerController(ISchedulerService schedulerService, TardisConfiguration configuration)
15 | {
16 | this.schedulerService = schedulerService;
17 | this.configuration = configuration;
18 | }
19 |
20 | [HttpGet, SharpArch.Web.Mvc.Transaction]
21 | public ActionResult Execute(string id)
22 | {
23 | if (id == null || this.configuration.ScheduleKey != id) return StatusCode.NotFound;
24 |
25 | this.schedulerService.ExecuteUpdates(DateTime.Now);
26 | return StatusCode.Ok;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/AccountSummaryViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using Suteki.TardisBank.Domain;
4 |
5 | public class AccountSummaryViewModel
6 | {
7 | public Child Child { get; set; }
8 | public Parent Parent { get; set; }
9 |
10 | public bool IsParentView
11 | {
12 | get { return this.Parent != null; }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/AddScheduleViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System;
4 | using System.ComponentModel.DataAnnotations;
5 |
6 | using Suteki.TardisBank.Domain;
7 |
8 | public class AddScheduleViewModel
9 | {
10 | [Required]
11 | public int ChildId{ get; set; }
12 |
13 | [Required]
14 | [Range(-1000000, 1000000)]
15 | public decimal Amount { get; set; }
16 |
17 | [Required]
18 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
19 | public string Description { get; set; }
20 |
21 | [Required]
22 | public Interval Interval { get; set; }
23 |
24 | [Required]
25 | public DateTime StartDate { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/ChangePasswordViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | public class ChangePasswordViewModel
6 | {
7 | [DataType(DataType.Password)]
8 | [Required(ErrorMessage = "You must enter your old password")]
9 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
10 | public string OldPassword { get; set; }
11 |
12 | [DataType(DataType.Password)]
13 | [Required(ErrorMessage = "You must enter your new password")]
14 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
15 | public string NewPassword { get; set; }
16 |
17 | [DataType(DataType.Password)]
18 | [Compare("NewPassword", ErrorMessage = "The password is different than in the other field. They must be identical")]
19 | [Required(ErrorMessage = "You must re-enter your password to make sure you didn't mistype it the first time")]
20 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
21 | public string NewPasswordRepeat { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/DeleteChildConfirmViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | public class DeleteChildConfirmViewModel
4 | {
5 | public int ChildId { get; set; }
6 | public string ChildName { get; set; }
7 | }
8 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/ForgottenPasswordViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | public class ForgottenPasswordViewModel
6 | {
7 | [Required(ErrorMessage = "You must enter a User Name or Password")]
8 | public string UserName { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/LoginViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | public class LoginViewModel
6 | {
7 | [Required(ErrorMessage = "You must enter your user name")]
8 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
9 | public string Name { get; set; }
10 |
11 | [Required(ErrorMessage = "You must enter your password")]
12 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
13 | public string Password { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/MakePaymentViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | public class MakePaymentViewModel
6 | {
7 | [Required]
8 | public int ChildId{ get; set; }
9 |
10 | [Required]
11 | public string ChildName { get; set; }
12 |
13 | [Required]
14 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
15 | public string Description { get; set; }
16 |
17 | [Required]
18 | [Range(0, 1000000)]
19 | public decimal Amount { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/RegistrationViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | public class RegistrationViewModel
6 | {
7 | [Required(ErrorMessage = "You must supply an email address")]
8 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
9 | public string Email { get; set; }
10 |
11 | [Required(ErrorMessage = "You must supply a name")]
12 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
13 | public string Name { get; set; }
14 |
15 | [Required(ErrorMessage = "You must supply a password")]
16 | public string Password { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/UserViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | public class UserViewModel
4 | {
5 | public string UserName { get; set; }
6 | public bool IsLoggedIn { get; set; }
7 | }
8 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/WithdrawCashForChildViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | public class WithdrawCashForChildViewModel
6 | {
7 | public int ChildId{ get; set; }
8 | public string ChildName { get; set; }
9 |
10 | [Required]
11 | public string Description { get; set; }
12 |
13 | [Required]
14 | [Range(0, 1000000)]
15 | public decimal Amount { get; set; }
16 | }
17 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Controllers/ViewModels/WithdrawCashViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Controllers.ViewModels
2 | {
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | public class WithdrawCashViewModel
6 | {
7 | [Required]
8 | [StringLength(140, ErrorMessage = "Sorry maximum of 140 chars, just like Twitter :)")]
9 | public string Description { get; set; }
10 |
11 | [Required]
12 | [Range(0, 1000000)]
13 | public decimal Amount { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Suteki.TardisBank.Web.Mvc.MvcApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Icon.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Models/AnnouncementModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Models
2 | {
3 | using System;
4 | using System.ComponentModel.DataAnnotations;
5 | using Newtonsoft.Json;
6 |
7 | ///
8 | /// Announcement summary model.
9 | ///
10 | public class AnnouncementSummary
11 | {
12 | [JsonProperty("id")]
13 | public int Id { get; set; }
14 |
15 | [JsonProperty("date")]
16 | [DataType(DataType.Date)]
17 | public DateTime Date { get; set; }
18 |
19 | [Required]
20 | [JsonProperty("title")]
21 | public string Title { get; set; }
22 | }
23 |
24 | ///
25 | /// Full announcement details.
26 | ///
27 | public class AnnouncementModel : AnnouncementSummary
28 | {
29 | [JsonProperty("content")]
30 | [Required]
31 | public string Content { get; set; }
32 | }
33 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Models/News/NewsListModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Models.News
2 | {
3 | public class NewsListModel
4 | {
5 | public bool IsParent { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/NHibernate.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Source=.;Initial Catalog=TardisBank;Integrated Security=True;Application Name=Suteki.TardisBank;
5 | NHibernate.Dialect.MsSql2008Dialect
6 | NHibernate.Connection.DriverConnectionProvider
7 | NHibernate.Driver.SqlClientDriver
8 | true
9 | auto
10 | 500
11 |
12 |
14 | update
15 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 |
3 | // General Information about an assembly is controlled through the following
4 | // set of attributes. Change these attribute values to modify the information
5 | // associated with an assembly.
6 | [assembly: AssemblyTitle("Suteki.TardisBank.Web")]
7 | [assembly: AssemblyDescription("")]
8 | [assembly: AssemblyConfiguration("")]
9 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Scripts/_references.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 | ///
10 | ///
11 | ///
12 | ///
13 | ///
14 | ///
15 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Scripts/app/common.js:
--------------------------------------------------------------------------------
1 | var app = function(me, $) {
2 | me.common = function(commonModule) {
3 |
4 | var rootUrl;
5 |
6 | commonModule.toLocalDate = function(aDate) {
7 | var date = new Date(aDate);
8 | return date.toLocaleDateString();
9 | };
10 |
11 | // navigation
12 | commonModule.nav = {
13 | setRootUrl : function(url) {
14 | rootUrl = url;
15 | },
16 | getFullUrl : function(path) {
17 | return rootUrl + path;
18 | },
19 | toLoginPage: function() {
20 | location.replace(app.common.nav.getFullUrl("User/Login"));
21 | }
22 | };
23 |
24 |
25 | // redirect unauthorized user requests to login page
26 | $(document).ajaxError(function(event, jqxhr, settings, thrownError) {
27 | if (jqxhr.status == 401) {
28 | app.common.nav.toLoginPage();
29 | }
30 | });
31 |
32 | return commonModule;
33 | }(me.common || {});
34 | return me;
35 | }(app || {}, jQuery);
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Utilities/Current.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Utilities
2 | {
3 | using System.Threading;
4 |
5 | public class Current
6 | {
7 | public static string CurrencySymbol
8 | {
9 | get { return Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol; }
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Utilities/DateFormatter.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Utilities
2 | {
3 | public static class DateFormatter
4 | {
5 | public static string CurrentJQuery
6 | {
7 | get
8 | {
9 | var systemPattern = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
10 | // change to a style that jQuery UI understands
11 | return systemPattern.Replace("M", "m").Replace("yyyy", "yy");
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Utilities/HttpContextService.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Utilities
2 | {
3 | using System.Web;
4 |
5 | using Suteki.TardisBank.Domain;
6 | using Suteki.TardisBank.Tasks;
7 |
8 | public class HttpContextService : IHttpContextService
9 | {
10 | public string UserName
11 | {
12 | get { return CurrentHttpContext.User.Identity.Name; }
13 | }
14 |
15 | public bool UserIsAuthenticated
16 | {
17 | get { return CurrentHttpContext.User.Identity.IsAuthenticated; }
18 | }
19 |
20 | public bool UserIsInRole(string role)
21 | {
22 | return CurrentHttpContext.User.IsInRole(role);
23 | }
24 |
25 | static HttpContext CurrentHttpContext
26 | {
27 | get
28 | {
29 | var context = HttpContext.Current;
30 | if (context == null)
31 | {
32 | throw new TardisBankException("HttpContext.Current is null");
33 | }
34 | return context;
35 | }
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Utilities/StatusCode.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Utilities
2 | {
3 | using System.Web.Mvc;
4 |
5 | public static class StatusCode
6 | {
7 | public static ActionResult NotFound
8 | {
9 | get { return new HttpStatusCodeResult(404); }
10 | }
11 |
12 | public static ActionResult Ok
13 | {
14 | get { return new HttpStatusCodeResult(200); }
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Utilities/UserLocaleModule.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.Utilities
2 | {
3 | using System;
4 | using System.Globalization;
5 | using System.Threading;
6 | using System.Web;
7 |
8 | public class UserLocaleModule : IHttpModule
9 | {
10 | public void Init(HttpApplication httpApplication)
11 | {
12 | httpApplication.BeginRequest += (sender, eventArgs) =>
13 | {
14 | var app = sender as HttpApplication;
15 | if (app == null)
16 | {
17 | throw new ApplicationException("Sender is null or not an HttpApplication");
18 | }
19 | var request = app.Context.Request;
20 | if (request.UserLanguages == null || request.UserLanguages.Length == 0) return;
21 |
22 | var language = request.UserLanguages[0];
23 | if (language == null) return;
24 |
25 | try
26 | {
27 | Thread.CurrentThread.CurrentCulture = new CultureInfo(language);
28 | }
29 | catch
30 | {}
31 | };
32 | }
33 |
34 | public void Dispose()
35 | {
36 |
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Account/MakePayment.cshtml:
--------------------------------------------------------------------------------
1 | @using Suteki.TardisBank.Web.Mvc.Utilities
2 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.MakePaymentViewModel
3 |
4 | @{
5 | Layout = "~/Views/Shared/SiteLayout.cshtml";
6 | }
7 | Make a Payment to @Model.ChildName
8 | @Html.ValidationSummary()
9 |
10 | @{ Html.BeginForm(); }
11 | @Html.HiddenFor(x => x.ChildId)
12 | @Html.HiddenFor(x => x.ChildName)
13 |
27 | @{ Html.EndForm(); }
28 |
29 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Account/PaymentConfirmation.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.MakePaymentViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Payment Confirmed
8 | You have transferred @Model.Amount.ToString("c") to @Model.ChildName's account with the description "@Model.Description".
9 | @Html.ActionLink(Model.ChildName + "'s Account", "ParentView", "Account", new { id = @Model.ChildId }, null)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Account/WithdrawCash.cshtml:
--------------------------------------------------------------------------------
1 | @using Suteki.TardisBank.Web.Mvc.Utilities
2 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.WithdrawCashViewModel
3 |
4 | @{
5 | Layout = "~/Views/Shared/SiteLayout.cshtml";
6 | }
7 | Withdraw Cash
8 | @Html.ValidationSummary()
9 |
10 | @{ Html.BeginForm(); }
11 |
25 | @{ Html.EndForm(); }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Account/WithdrawCashConfirm.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.WithdrawCashViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Withdrawl Confirmed
8 | A message has been sent to your parent asking for the amount of @Model.Amount.ToString("c"). Ask them to check their messages.
9 | @Html.ActionLink("Back to your account", "ChildView", "Account")
10 |
11 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Account/WithdrawCashForChild.cshtml:
--------------------------------------------------------------------------------
1 | @using Suteki.TardisBank.Web.Mvc.Utilities
2 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.WithdrawCashForChildViewModel
3 |
4 | @{
5 | Layout = "~/Views/Shared/SiteLayout.cshtml";
6 | }
7 | Withdraw Cash For Your Child
8 | Use this form if you want to give your child some cash, or if you have bought something on their behalf. The amount will be deducted from their account.
9 | @Html.ValidationSummary()
10 |
11 | @{ Html.BeginForm(); }
12 | @Html.HiddenFor(x => x.ChildId)
13 | @Html.HiddenFor(x => x.ChildName)
14 |
28 | @{ Html.EndForm(); }
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Account/WithdrawCashForChildConfirm.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.WithdrawCashForChildViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 | Withdrawl Confirmed
7 | @Model.Amount has been withdrawn from @Model.ChildName's account.
8 | @Html.ActionLink(Model.ChildName + "'s Account", "ParentView", "Account", new { id = @Model.ChildId }, null)
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Admin/DeleteParentConfirm.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Are you sure you want to delete your account?
8 | This action can not be undone.
9 | @Html.ActionLink("Yes I'm sure. Delete my account", "DeleteParent", null, new { @class = "warning" })
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Admin/Index.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Administer your account
8 | To delete your account, including your children's accounts, click the button below.
9 | @Html.ActionLink("Delete My Account", "DeleteParentConfirm")
10 |
11 | To change your password, click the button below.
12 | @Html.ActionLink("Change my password", "ChangePassword")
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Analytics/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Tasks.TardisConfiguration
2 |
3 |
16 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Child/DeleteChild.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.DeleteChildConfirmViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Are you sure you want to delete @Model.ChildName's account?
8 |
9 | @{ Html.BeginForm(); }
10 | @Html.HiddenFor(x => x.ChildId)
11 | @Html.HiddenFor(x => x.ChildName)
12 |
18 | @{ Html.EndForm(); }
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Child/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Domain.Parent
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Your Childrens' Accounts
8 |
9 | @if(Model.Children.Count == 0){
10 | Please click on the button below to create accounts for your children.
11 | } else {
12 | This is list of your childrens' accounts. To view the account, click 'View Account'.
13 | }
14 |
15 |
16 | @foreach(var child in Model.Children) {
17 |
18 | @child.Name
19 | @Html.ActionLink("View Account", "ParentView", "Account", new { id = child.Id }, null)
20 | @Html.ActionLink("Delete", "DeleteChild", "Child", new { id = child.Id }, new { @class = "warning" })
21 |
22 | }
23 |
24 |
25 |
26 | @Html.ActionLink("Add A Child", "AddChild", "User")
27 |
28 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Home/Legal.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 |
8 |
Legal Stuff
9 |
Tardis Bank is for educational use only.
10 |
While we do our best to make sure it works properly, We make no guarantees about either the integrity or the safety of your data.
11 |
We a not liable for any loss or inconvenience you may experience as a consequence of using this site.
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Menu/ChildMenu.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Domain.Child
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Menu/GuestMenu.cshtml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Menu/ParentMenu.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Domain.Parent
2 |
3 |
11 |
12 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/News/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @using Suteki.TardisBank.Web.Mvc
2 | @model dynamic
3 |
4 | @{
5 | ViewBag.Title = "Edit news";
6 | }
7 | Edit news
8 |
9 |
10 | Add Annoouncement
11 | Title
12 |
13 |
14 |
15 |
16 | Contents
17 |
18 |
19 |
20 |
21 |
22 | Add new
23 | Delete
24 |
25 |
26 |
27 | Published announcements
28 |
30 |
31 |
32 | @section scripts
33 | {
34 |
37 |
38 | @Scripts.Render(BundleConfig.NewsScript)
39 |
40 |
48 |
49 |
50 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/News/Index.cshtml:
--------------------------------------------------------------------------------
1 | @using Suteki.TardisBank.Web.Mvc
2 | @model Suteki.TardisBank.Web.Mvc.Models.News.NewsListModel
3 |
4 | @{
5 | ViewBag.Title = "News";
6 | Layout = "~/Views/Shared/SiteLayout.cshtml";
7 | }
8 |
9 | @if (Model.IsParent)
10 | {
11 |
12 | @Html.ActionLink("Click here to edit news list", "Edit", "News")
13 |
14 | }
15 |
16 | Latest news
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | @section scripts
28 | {
29 |
35 |
36 |
39 |
40 | @Scripts.Render(BundleConfig.NewsScript)
41 |
42 |
50 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Openid/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/SiteLayout.cshtml";
3 | }
4 |
5 | Members Only Area
6 | Congratulations,
7 | You have completed the OpenID login process.
8 |
9 |
10 | Logout
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Openid/Login.cshtml:
--------------------------------------------------------------------------------
1 | @if (ViewData["Message"] != null) {
2 |
3 | @Html.Encode(ViewData["Message"].ToString())
4 |
5 | }
6 | You must log in before entering the Members Area:
7 |
12 |
13 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Password/ChildConfirm.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Password Reset Sucessfully
8 | We have sent your new password to your parent. Ask them to check their email.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Password/Forgot.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.ForgottenPasswordViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Reset Your Password
8 | If you are a child, enter your user name below. If you are a parent, enter your email address.
9 | @Html.ValidationSummary()
10 |
11 | @{ Html.BeginForm(); }
12 |
22 | @{ Html.EndForm(); }
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Password/ParentConfirm.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Password Reset Sucessfully
8 | We have sent your new password to your email address.
9 |
10 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/Schedule/AddScheduleConfirm.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.AddScheduleViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Schedule Created
8 | Your child's regular pocket money schedule has been created.
9 | The first payment of @Model.Amount.ToString("c") will be paid on @Model.StartDate.ToLongDateString(), and then every @Model.Interval after that.
10 | @Html.ActionLink("Return to your child's account", "ParentView", "Account", new { id = Model.ChildId }, null)
11 |
12 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/User/ActivateConfirm.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Congratulations!
8 | You are now registered at Tardis Bank. Please Log in.
9 | @Html.ActionLink("Login", "Login")
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/User/ActivationFailed.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Activation Failed
8 | We are very sorry, but we didn't recognise your activation key.
9 | Please try again, making sure you copy the URL exactly into your browser.
10 | it still doesn't work, contact us at
11 | info@tardisbank.com
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/User/AddChild.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.RegistrationViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 | Add a Child Account
7 | Complete the form below to create an account for your child.
8 | @Html.ValidationSummary()
9 |
10 | @{ Html.BeginForm(); }
11 |
33 | @{ Html.EndForm(); }
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/User/Confirm.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/SiteLayout.cshtml";
3 | }
4 |
5 | Now check your email (or just login if no smtp server is configured)
6 | You should have recieved an email from us with a link to an activation page. Just click on the link to activate your account
7 | If you don't get the email, please contact us at info@tardisbank.com
8 |
9 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/User/DisplayGreeting.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.UserViewModel
2 |
3 | @Model.UserName
4 | @if(Model.IsLoggedIn) {
5 | @Html.ActionLink("Logout", "Logout")
6 | } else {
7 | @Html.ActionLink("Login", "Login")
8 | }
9 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/User/Login.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Web.Mvc.Controllers.ViewModels.LoginViewModel
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 | Log In
7 | @Html.ValidationSummary()
8 |
9 | @{ Html.BeginForm(); }
10 |
24 | @{ Html.EndForm(); }
25 |
26 |
27 |
Forgotten your password? Just click this link...
28 | @Html.ActionLink("I've forgotten my password", "Forgot", "Password")
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/User/Messages.cshtml:
--------------------------------------------------------------------------------
1 | @model Suteki.TardisBank.Domain.User
2 |
3 | @{
4 | Layout = "~/Views/Shared/SiteLayout.cshtml";
5 | }
6 |
7 | Your Messages
8 | @if(Model.Messages.Count == 0) {
9 | You have no messages
10 | } else {
11 |
12 |
13 | @foreach(var message in Model.Messages.Reverse()) {
14 |
15 | @message.Date.ToShortDateString()
16 | @message.Text
17 | @if(message.HasBeenRead) {
18 | Done
19 | } else {
20 | @Html.ActionLink("OK", "ReadMessage", new { id = @message.Id })
21 | }
22 |
23 | }
24 |
25 |
26 | (Note: we only keep the last @Suteki.TardisBank.Domain.User.MaxMessages messages)
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/SiteLayout.cshtml";
3 | }
4 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/WebApi/ValidateModel.cs:
--------------------------------------------------------------------------------
1 | namespace Suteki.TardisBank.Web.Mvc.WebApi
2 | {
3 | using System.Net;
4 | using System.Net.Http;
5 | using System.Web.Http.Controllers;
6 | using System.Web.Http.Filters;
7 |
8 | ///
9 | /// Automatically validate model.
10 | ///
11 | ///
12 | /// Taken from article http://www.asp.net/web-api/overview/formats-and-model-binding/model-validation-in-aspnet-web-api
13 | ///
14 | public sealed class ValidateModelAttribute : ActionFilterAttribute
15 | {
16 | public override void OnActionExecuting(HttpActionContext actionContext)
17 | {
18 | if (actionContext.ModelState.IsValid == false)
19 | {
20 | actionContext.Response = actionContext.Request.CreateErrorResponse(
21 | HttpStatusCode.BadRequest, actionContext.ModelState);
22 | }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/favicon.ico
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/favicon.png
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/Samples/old/TardisBank/Solutions/Suteki.TardisBank.Web.Mvc/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/SharpArchitecture.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "."
5 | }
6 | ]
7 | }
--------------------------------------------------------------------------------
/Src/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | runtime; build; native; contentfiles; analyzers; buildtransitive
9 | all
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/DomainModel/DomainSignatureAttribute.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.DomainModel
2 | {
3 | using System;
4 | using JetBrains.Annotations;
5 |
6 | ///
7 | /// Facilitates indicating which property(s) describe the unique signature of an
8 | /// entity. See for when this is leveraged.
9 | ///
10 | ///
11 | /// This is intended for use with . It may NOT be used on a .
12 | ///
13 | [Serializable]
14 | [AttributeUsage(AttributeTargets.Property)]
15 | [PublicAPI]
16 | [BaseTypeRequired(typeof(IEntity<>))]
17 | public sealed class DomainSignatureAttribute : Attribute
18 | { }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/DomainModel/IHasAssignedId.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.DomainModel
2 | {
3 | using System;
4 | using JetBrains.Annotations;
5 |
6 | ///
7 | /// Defines the public members of a class that supports setting an assigned ID of an object.
8 | ///
9 | /// The type of the ID.
10 | [PublicAPI]
11 | public interface IHasAssignedId
12 | where TId : IEquatable
13 | {
14 | ///
15 | /// Sets the assigned ID of an object.
16 | ///
17 | ///
18 | /// This is not part of since most entities do not have assigned
19 | /// IDs and since business rules will certainly vary as to what constitutes a valid,
20 | /// assigned ID for one object but not for another.
21 | ///
22 | void SetAssignedIdTo(TId assignedId);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/PersistenceSupport/IEntityDuplicateChecker.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.PersistenceSupport
2 | {
3 | using DomainModel;
4 | using JetBrains.Annotations;
5 |
6 | ///
7 | /// Defines the public members of a class that checks an entity for duplicates.
8 | ///
9 | [PublicAPI]
10 | public interface IEntityDuplicateChecker
11 | {
12 | /// Returns a value indicating whether a duplicate of the specified exists.
13 | /// The entity.
14 | /// is null.
15 | ///
16 | /// true if a duplicate exists, false otherwise.
17 | ///
18 | bool DoesDuplicateExistWithTypedIdOf(IEntity entity);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/PersistenceSupport/ISupportsTransactionStatus.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.PersistenceSupport
2 | {
3 | using JetBrains.Annotations;
4 |
5 |
6 | ///
7 | /// Returns transaction status.
8 | ///
9 | [PublicAPI]
10 | public interface ISupportsTransactionStatus
11 | {
12 | ///
13 | /// Checks whether transaction is active or not.
14 | ///
15 | bool IsActive { get; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/PersistenceSupport/RepositoryExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.PersistenceSupport
2 | {
3 | using System;
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 | using DomainModel;
7 | using JetBrains.Annotations;
8 |
9 |
10 | ///
11 | /// Repository extension methods.
12 | ///
13 | [PublicAPI]
14 | public static class RepositoryExtensions
15 | {
16 | ///
17 | /// Saves the specified object to the repository and evicts it from the session.
18 | ///
19 | ///
20 | /// or is
21 | /// .
22 | ///
23 | public static async Task SaveAndEvictAsync(
24 | this IRepository repository, TEntity entity, CancellationToken cancellationToken = default)
25 | where TEntity : class, IEntity
26 | where TId : IEquatable
27 | {
28 | if (repository == null) throw new ArgumentNullException(nameof(repository));
29 | if (entity == null) throw new ArgumentNullException(nameof(entity));
30 | var saved = await repository.SaveAsync(entity, CancellationToken.None).ConfigureAwait(false);
31 | await repository.EvictAsync(saved, cancellationToken).ConfigureAwait(false);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/Reflection/ITypePropertyDescriptorCache.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.Reflection
2 | {
3 | using System;
4 | using JetBrains.Annotations;
5 |
6 | ///
7 | /// Property descriptors cache.
8 | ///
9 | ///
10 | /// Implementation is thread-safe.
11 | ///
12 | [PublicAPI]
13 | public interface ITypePropertyDescriptorCache
14 | {
15 | ///
16 | /// Returns number of entries in the cache.
17 | ///
18 | int Count { get; }
19 |
20 | ///
21 | /// Find cached property descriptor.
22 | ///
23 | /// The type.
24 | /// or null if does not exists.
25 | TypePropertyDescriptor? Find(Type type);
26 |
27 | ///
28 | /// Get existing property descriptor or create and cache it.
29 | ///
30 | /// The type.
31 | /// The factory to create descriptor.
32 | ///
33 | TypePropertyDescriptor GetOrAdd(Type type, Func factory);
34 |
35 | ///
36 | /// Clears the cache.
37 | ///
38 | void Clear();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/SharpArch.Domain.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Provides the core interfaces and classes needed by a Sharp Architecture application. It is persistence ignorant and would be used with other packages that provide persistance support.
9 | $(PackageTags);domain
10 | icon.png
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/Specifications/AdHoc.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.Specifications
2 | {
3 | using System;
4 | using System.Linq.Expressions;
5 | using JetBrains.Annotations;
6 |
7 | ///
8 | /// An ad hoc query specification.
9 | ///
10 | /// The entity type.
11 | [PublicAPI]
12 | public class AdHoc : QuerySpecification
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The expression.
18 | public AdHoc(Expression>? expression)
19 | {
20 | MatchingCriteria = expression;
21 | }
22 |
23 | ///
24 | /// Gets the matching criteria.
25 | ///
26 | public override Expression>? MatchingCriteria { get; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Src/SharpArch.Domain/Specifications/ILinqSpecification.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Domain.Specifications
2 | {
3 | using System.Linq;
4 |
5 | ///
6 | /// Defines a contract for the behaviour of a LINQ Specification design pattern.
7 | ///
8 | /// The type to be used for Input / Output.
9 | public interface ILinqSpecification
10 | {
11 | ///
12 | /// Returns the elements from the specified candidates that are satisfying the
13 | /// specification.
14 | ///
15 | /// The candidates.
16 | /// A list of satisfying elements.
17 | IQueryable SatisfyingElementsFrom(IQueryable candidates);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Src/SharpArch.Infrastructure/CodeBaseLocator.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.Infrastructure
2 | {
3 | using System;
4 | using System.IO;
5 | using System.Reflection;
6 | using JetBrains.Annotations;
7 |
8 |
9 | ///
10 | /// Resolves assembly code base directory.
11 | ///
12 | [PublicAPI]
13 | public class CodeBaseLocator
14 | {
15 | ///
16 | /// Returns directory of assembly code base.
17 | ///
18 | /// Assembly
19 | /// Directory path
20 | /// is
21 | public static string GetAssemblyCodeBasePath(Assembly assembly)
22 | {
23 | if (assembly == null) throw new ArgumentNullException(nameof(assembly));
24 |
25 | #if NET5_0_OR_GREATER
26 | return Path.GetDirectoryName(assembly.Location)
27 | ?? Directory.GetCurrentDirectory();
28 |
29 | #else
30 | var uri = new UriBuilder(assembly.CodeBase);
31 | var uriPath = Uri.UnescapeDataString(uri.Path);
32 | return Path.GetDirectoryName(uriPath)!;
33 | #endif
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Src/SharpArch.Infrastructure/SharpArch.Infrastructure.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Provides infrastrucure components for Sharp Architecture application.
5 | $(PackageTags);infrastructure
6 | icon.png
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/FluentNHibernate/Conventions/CustomForeignKeyConvention.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate.FluentNHibernate.Conventions
2 | {
3 | using System;
4 | using global::FluentNHibernate;
5 | using global::FluentNHibernate.Conventions;
6 | using JetBrains.Annotations;
7 |
8 |
9 | ///
10 | /// Foreign key convention.
11 | ///
12 | ///
13 | [PublicAPI]
14 | public class CustomForeignKeyConvention : ForeignKeyConvention
15 | {
16 | ///
17 | /// Generates Foreign Key name.
18 | ///
19 | protected override string GetKeyName(Member property, Type type)
20 | {
21 | if (property == null) {
22 | return type.Name + "Id";
23 | }
24 |
25 | return property.Name + "Id";
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/FluentNHibernate/Conventions/PrimaryKeyConvention.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate.FluentNHibernate.Conventions
2 | {
3 | using global::FluentNHibernate.Conventions;
4 | using global::FluentNHibernate.Conventions.Instances;
5 | using JetBrains.Annotations;
6 |
7 |
8 | ///
9 | /// Primary Key convention.
10 | ///
11 | ///
12 | /// Defines Primary Key name as EntityType+Id. E.c. ColorId
13 | ///
14 | ///
15 | [PublicAPI]
16 | public class PrimaryKeyConvention : IIdConvention
17 | {
18 | ///
19 | /// Applies convention.
20 | ///
21 | public void Apply(IIdentityInstance instance)
22 | {
23 | instance.Column(instance.EntityType.Name + "Id");
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/FluentNHibernate/Conventions/TableNameConvention.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate.FluentNHibernate.Conventions
2 | {
3 | using global::FluentNHibernate.Conventions;
4 | using global::FluentNHibernate.Conventions.Instances;
5 | using JetBrains.Annotations;
6 |
7 |
8 | ///
9 | /// Table name convention.
10 | ///
11 | /// Defines table name to match entity name. E.g.: Color .
12 | ///
13 | [PublicAPI]
14 | public class TableNameConvention : IClassConvention
15 | {
16 | ///
17 | /// Applies convention.
18 | ///
19 | public void Apply(IClassInstance instance)
20 | {
21 | instance.Table(instance.EntityType.Name);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/FluentNHibernate/GeneratorHelper.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate.FluentNHibernate
2 | {
3 | using System;
4 | using System.Linq;
5 | using JetBrains.Annotations;
6 |
7 |
8 | ///
9 | /// An optional helper class used to view the mapping file generated from a fluent nhibernate class mapper
10 | ///
11 | ///
12 | /// This is not necessary for Fluent Nhibernate to function properly.
13 | ///
14 | [PublicAPI]
15 | public class GeneratorHelper
16 | {
17 | const string GeneratorInterface = nameof(IMapGenerator);
18 |
19 | ///
20 | /// Scans assembly for IMapGenerator implementers.
21 | ///
22 | ///
23 | public static IMapGenerator[] GetMapGenerators()
24 | {
25 | var assembly = typeof(IMapGenerator).Assembly;
26 |
27 | return (from type in assembly.GetTypes()
28 | where null != type.GetInterface(GeneratorInterface)
29 | select Activator.CreateInstance(type)).OfType().ToArray();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/FluentNHibernate/IAutoPersistenceModelGenerator.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate.FluentNHibernate
2 | {
3 | using global::FluentNHibernate.Automapping;
4 | using JetBrains.Annotations;
5 |
6 |
7 | ///
8 | /// Fluent NHibernate auto-mapping model generator.
9 | ///
10 | ///
11 | /// Interface implementors will be automatically executed by TestDatabaseInitializer during test database
12 | /// initialization.
13 | ///
14 | [PublicAPI]
15 | public interface IAutoPersistenceModelGenerator
16 | {
17 | ///
18 | /// Generates persistence model.
19 | ///
20 |
21 | AutoPersistenceModel Generate();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/FluentNHibernate/IMapGenerator.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate.FluentNHibernate
2 | {
3 | using System.Xml;
4 | using JetBrains.Annotations;
5 |
6 |
7 | ///
8 | /// Facilitates the visitor pattern for to spit out the NHibernate
9 | /// XML for the class.
10 | /// To use, have your mapper implement this interface. Then, simply include the following line within
11 | /// Generate(): return CreateMapping(new MappingVisitor());
12 | /// Now you can call Generate on your mapper class to view the generated XML.
13 | ///
14 | ///
15 | /// This is not necessary for Fluent Nhibernate to function properly.
16 | ///
17 | [PublicAPI]
18 | public interface IMapGenerator
19 | {
20 | ///
21 | /// File name.
22 | ///
23 | string FileName { get; }
24 |
25 | ///
26 | /// Generates XML mapping document.
27 | ///
28 |
29 | XmlDocument Generate();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/INHibernateTransactionManager.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate
2 | {
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 | using Domain.PersistenceSupport;
6 | using global::NHibernate;
7 |
8 |
9 | ///
10 | /// NHibernate transaction support.
11 | ///
12 | public interface INHibernateTransactionManager : ITransactionManager
13 | {
14 | ///
15 | /// Returns NHibernate session.
16 | ///
17 | ISession Session { get; }
18 |
19 | ///
20 | /// Flushes everything that has been changed since the last commit.
21 | ///
22 | Task FlushChangesAsync(CancellationToken cancellationToken = default);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/ISessionFactoryKeyProvider.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate
2 | {
3 | using JetBrains.Annotations;
4 |
5 |
6 | ///
7 | /// Provides the key to retrieve session factory from IoC.
8 | ///
9 | [PublicAPI]
10 | public interface ISessionFactoryKeyProvider
11 | {
12 | ///
13 | /// Gets the session factory key.
14 | ///
15 | ///
16 |
17 | string GetKey();
18 |
19 | ///
20 | /// Gets the session factory key.
21 | ///
22 | /// An optional object that may have an attribute used to determine the session factory key.
23 | ///
24 |
25 | string GetKeyFrom(object anObject);
26 | }
27 | }
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/NHibernateQuery.cs:
--------------------------------------------------------------------------------
1 | namespace SharpArch.NHibernate
2 | {
3 | using System;
4 | using global::NHibernate;
5 | using JetBrains.Annotations;
6 |
7 | ///
8 | /// Base class for NHibernate query objects.
9 | ///
10 | [PublicAPI]
11 | public abstract class NHibernateQuery
12 | {
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | /// The session.
17 | /// is null .
18 | protected NHibernateQuery(ISession session)
19 | {
20 | if (session == null) throw new ArgumentNullException(nameof(session));
21 |
22 | this.Session = session;
23 | }
24 |
25 | ///
26 | /// NHibernate .
27 | ///
28 |
29 | protected virtual ISession Session { get; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Src/SharpArch.NHibernate/SharpArch.NHibernate.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Provides NHibernate persistance support for a Sharp Architecture application, providing NHibernate session managment and initialisation, and implementations of core SharpArch data access interfaces.
9 | $(PackageTags);nhibernate;persistance
10 | icon.png
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Src/SharpArch.RavenDb/SharpArch.RavenDb.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Provides RavenDB persistance support for a Sharp Architecture application, providing implementations of core SharpArch data access interfaces.
9 | $(PackageTags);raven-db;persistance
10 | icon.png
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Src/SharpArch.Testing.NUnit/SharpArch.Testing.NUnit.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Provides base classes to help with testing applications written with Sharp Architecture and NHibernate.
10 | This is legacy package, for future development xUnit is recommended.
11 | $(PackageTags);testing;nunit
12 | icon.png
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Src/SharpArch.Testing.Xunit.NHibernate/SharpArch.Testing.Xunit.NHibernate.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Provides base classes to help with testing applications written with Sharp Architecture using xUnit.
10 | $(PackageTags);testing;xunit;db-testing;nhibernate
11 | false
12 | icon.png
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | false
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Src/SharpArch.Testing.Xunit/SharpArch.Testing.Xunit.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Provides base classes to help with testing applications written with Sharp Architecture using xUnit.
9 | $(PackageTags);testing;xunit
10 | icon.png
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | false
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Src/SharpArch.Testing/SharpArch.Testing.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Provides base classes and extension methods to help with testing applications written with Sharp Architecture library.
9 | $(PackageTags);testing
10 | icon.png
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Src/SharpArch.Web.AspNetCore/SharpArch.Web.AspNetCore.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | $(AppTargetFrameworks)
10 |
11 |
12 |
13 | Provides AspNet.Core MVC extensions.
14 | $(PackageTags);aspnet-core;web-api;aspnet-core-mvc
15 | icon.png
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.Tests.NHibernate/PreInsertlistener.cs:
--------------------------------------------------------------------------------
1 | namespace Tests.SharpArch.NHibernate
2 | {
3 | using System;
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 | using global::NHibernate.Event;
7 |
8 |
9 | [Serializable]
10 | class PreInsertListener : IPreInsertEventListener
11 | {
12 | public Task OnPreInsertAsync(PreInsertEvent @event, CancellationToken cancellationToken)
13 | {
14 | return PreUpdateListener.True;
15 | }
16 |
17 | public bool OnPreInsert(PreInsertEvent @event)
18 | {
19 | return true;
20 | }
21 | }
22 |
23 |
24 | [Serializable]
25 | public class PreUpdateListener : IPreUpdateEventListener
26 | {
27 | internal static readonly Task True = Task.FromResult(true);
28 |
29 | public Task OnPreUpdateAsync(PreUpdateEvent @event, CancellationToken cancellationToken)
30 | {
31 | return True;
32 | }
33 |
34 | public bool OnPreUpdate(PreUpdateEvent @event)
35 | {
36 | return true;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.Tests.NHibernate/RepositoryTests.cs:
--------------------------------------------------------------------------------
1 | // ReSharper disable UnusedMember.Local
2 | namespace Tests.SharpArch.NHibernate
3 | {
4 | using FluentAssertions;
5 | using global::NHibernate;
6 | using global::SharpArch.Domain.DomainModel;
7 | using global::SharpArch.Domain.PersistenceSupport;
8 | using global::SharpArch.NHibernate;
9 | using Moq;
10 | using NUnit.Framework;
11 |
12 |
13 | [TestFixture]
14 | // ReSharper disable once TestFileNameWarning
15 | class RepositoryTests
16 | {
17 | [Test]
18 | public void CanCastConcreteLinqRepositoryToInterfaceILinqRepository()
19 | {
20 | var session = new Mock();
21 | var transactionManager = new Mock();
22 | transactionManager.SetupGet(t => t.Session).Returns(session.Object);
23 | var concreteRepository = new LinqRepository(transactionManager.Object);
24 |
25 | concreteRepository.Should().BeAssignableTo>();
26 | }
27 | }
28 |
29 |
30 | public class MyEntity: Entity
31 | {
32 | string? Name { get; set; }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.Tests.NHibernate/hibernate.cfg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | NHibernate.Connection.DriverConnectionProvider
7 |
8 |
9 | NHibernate.Dialect.SQLiteDialect
10 |
11 |
12 | NHibernate.Driver.SQLite20Driver
13 |
14 |
15 | Data Source=:memory:;Version=3;New=True;
16 |
17 | on_close
18 | create
19 |
20 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.Tests.NHibernate/sqlite-nhibernate-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | NHibernate.Dialect.SQLiteDialect
8 |
9 |
10 | NHibernate.Driver.SQLite20Driver
11 |
12 |
13 | Data Source=:memory:;Version=3;New=True;
14 |
15 | on_close
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests.NHibernate/HasUniqieDomainSignatureTestsBase.cs:
--------------------------------------------------------------------------------
1 | namespace Tests.SharpArch.NHibernate
2 | {
3 | using System;
4 | using System.ComponentModel.DataAnnotations;
5 | using global::SharpArch.Domain.PersistenceSupport;
6 | using global::SharpArch.NHibernate;
7 | using global::SharpArch.Testing.Xunit.NHibernate;
8 | using Mappings;
9 | using Moq;
10 |
11 |
12 | public abstract class HasUniqueDomainSignatureTestsBase : TransientDatabaseTests
13 | {
14 | protected readonly Mock ServiceProviderMock;
15 | protected ValidationContext? ValidationContext;
16 |
17 | public HasUniqueDomainSignatureTestsBase()
18 | : base(new NHibernateTestsSetup())
19 | {
20 | ServiceProviderMock = new Mock();
21 | ServiceProviderMock.Setup(sp => sp.GetService(typeof(IEntityDuplicateChecker)))
22 | .Returns(new EntityDuplicateChecker(Session));
23 | }
24 |
25 | ///
26 | /// Create validation context for given object.
27 | ///
28 | ///
29 | ///
30 | protected ValidationContext ValidationContextFor(object objectToValidate)
31 | {
32 | return new(objectToValidate, ServiceProviderMock.Object, null);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests.NHibernate/NHibernateTestsSetup.cs:
--------------------------------------------------------------------------------
1 | namespace Tests.SharpArch.NHibernate
2 | {
3 | using System.Collections.Generic;
4 | using System.Reflection;
5 | using Domain;
6 | using FluentNHibernate.Cfg.Db;
7 | using global::NHibernate.Cfg;
8 | using global::SharpArch.NHibernate;
9 | using global::SharpArch.Testing.NHibernate;
10 | using Mappings;
11 |
12 |
13 | public class NHibernateTestsSetup : TestDatabaseSetup
14 | {
15 | public NHibernateTestsSetup()
16 | : base(Assembly.GetExecutingAssembly().Location,
17 | typeof(TestsPersistenceModelGenerator),
18 | new[]
19 | {
20 | typeof(ObjectWithGuidId).Assembly,
21 | //typeof(TestsPersistenceModelGenerator).Assembly
22 | })
23 | {
24 | }
25 |
26 | ///
27 | protected override void Customize(NHibernateSessionFactoryBuilder builder)
28 | {
29 | base.Customize(builder);
30 | builder.UsePersistenceConfigurer(new SQLiteConfiguration().InMemory());
31 | builder.UseProperties(new SortedList
32 | {
33 | [Environment.ReleaseConnections] = "on_close",
34 | [Environment.Hbm2ddlAuto] = "create"
35 | });
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests.NHibernate/PreInsertlistener.cs:
--------------------------------------------------------------------------------
1 | namespace Tests.SharpArch.NHibernate
2 | {
3 | using System;
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 | using global::NHibernate.Event;
7 |
8 |
9 | [Serializable]
10 | internal class PreInsertListener : IPreInsertEventListener
11 | {
12 | public Task OnPreInsertAsync(PreInsertEvent @event, CancellationToken cancellationToken)
13 | {
14 | return PreUpdateListener.True;
15 | }
16 |
17 | public bool OnPreInsert(PreInsertEvent @event)
18 | {
19 | return true;
20 | }
21 | }
22 |
23 |
24 | [Serializable]
25 | public class PreUpdateListener : IPreUpdateEventListener
26 | {
27 | internal static readonly Task True = Task.FromResult(true);
28 |
29 | public Task OnPreUpdateAsync(PreUpdateEvent @event, CancellationToken cancellationToken)
30 | {
31 | return True;
32 | }
33 |
34 | public bool OnPreUpdate(PreUpdateEvent @event)
35 | {
36 | return true;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests.NHibernate/RepositoryTests.cs:
--------------------------------------------------------------------------------
1 | // ReSharper disable UnusedMember.Global
2 | namespace Tests.SharpArch.NHibernate
3 | {
4 | using FluentAssertions;
5 | using global::NHibernate;
6 | using global::SharpArch.Domain.DomainModel;
7 | using global::SharpArch.Domain.PersistenceSupport;
8 | using global::SharpArch.NHibernate;
9 | using Moq;
10 | using Xunit;
11 |
12 |
13 | public class RepositoryTests
14 | {
15 | [Fact]
16 | public void CanCastConcreteLinqRepositoryToInterfaceILinqRepository()
17 | {
18 | var session = new Mock();
19 | var transactionManager = new Mock();
20 | transactionManager.SetupGet(t => t.Session).Returns(session.Object);
21 | var concreteRepository = new LinqRepository(transactionManager.Object);
22 |
23 | concreteRepository.Should().BeAssignableTo>();
24 | }
25 | }
26 |
27 |
28 | public class MyEntity: Entity
29 | {
30 | public string? Name { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests.NHibernate/sqlite-nhibernate-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | NHibernate.Dialect.SQLiteDialect
8 |
9 |
10 | NHibernate.Driver.SQLite20Driver
11 |
12 |
13 | Data Source=:memory:;Version=3;New=True;
14 |
15 | on_close
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests/Helpers/ITestService.cs:
--------------------------------------------------------------------------------
1 | namespace Tests.Helpers
2 | {
3 | internal interface ITestService
4 | {
5 | void Do();
6 | }
7 |
8 |
9 | internal class TestService : ITestService
10 | {
11 | public void Do()
12 | {
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests/SharpArch.Domain/Reflection/TypePropertyDescriptorCacheTests.cs:
--------------------------------------------------------------------------------
1 | namespace Tests.SharpArch.Domain.Reflection
2 | {
3 | using System;
4 | using FluentAssertions;
5 | using global::SharpArch.Domain.Reflection;
6 | using Xunit;
7 |
8 |
9 | public class TypePropertyDescriptorCacheTests
10 | {
11 | readonly TypePropertyDescriptorCache _cache;
12 |
13 | public TypePropertyDescriptorCacheTests()
14 | {
15 | _cache = new TypePropertyDescriptorCache();
16 | }
17 |
18 | [Fact]
19 | public void Clear_Should_ClearTheCache()
20 | {
21 | _cache.GetOrAdd(GetType(), t => new TypePropertyDescriptor(t, null));
22 | _cache.Clear();
23 | _cache.Find(GetType()).Should().BeNull();
24 | }
25 |
26 | [Fact]
27 | public void Find_Should_ReturnNullForMissingDescriptor()
28 | {
29 | _cache.Find(typeof(TypePropertyDescriptorCache)).Should().BeNull();
30 | }
31 |
32 | [Fact]
33 | public void GetOrAdd_Should_AddMissingItemToCache()
34 | {
35 | Type type = GetType();
36 | var descriptor = new TypePropertyDescriptor(type, null);
37 | _cache.GetOrAdd(type, _ => descriptor).Should().BeSameAs(descriptor);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests/SharpArch.Infrastructure/CodeBaseLocatorTests.cs:
--------------------------------------------------------------------------------
1 | namespace Tests.SharpArch.Infrastructure
2 | {
3 | using System;
4 | using System.IO;
5 | using System.Reflection;
6 | using FluentAssertions;
7 | using global::SharpArch.Infrastructure;
8 | using Xunit;
9 | using Xunit.Abstractions;
10 |
11 |
12 | public class CodeBaseLocatorTests
13 | {
14 | readonly ITestOutputHelper _output;
15 |
16 | public CodeBaseLocatorTests(ITestOutputHelper output)
17 | {
18 | _output = output ?? throw new ArgumentNullException(nameof(output));
19 | }
20 |
21 | [Fact]
22 | public void CanResolveAssemblyPath()
23 | {
24 | var path = CodeBaseLocator.GetAssemblyCodeBasePath(Assembly.GetExecutingAssembly());
25 | _output.WriteLine("Assembly path: '{0}'", path);
26 | path.Should().NotBeNullOrEmpty();
27 | Directory.Exists(path).Should().BeTrue();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Src/Tests/SharpArch.XunitTests/SharpArch.XunitTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tests
5 | $(NoWarn);1701;1702;EPS06
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | all
16 | runtime; build; native; contentfiles; analyzers
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Src/dupFinder.config:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | 70
5 | false
6 | false
7 | false
8 | false
9 | false
10 |
11 |
12 |
13 | SharpArch.sln
14 |
15 |
16 | **\obj\**\*.cs
17 |
18 |
19 | false
20 | ..\Drops\Inspections\DuplicateReport.xml
21 | false
22 | true
23 |
--------------------------------------------------------------------------------
/Src/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "6.0.100-rc.1.21463.6"
4 | }
5 | }
--------------------------------------------------------------------------------
/VersionHistory.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharparchitecture/Sharp-Architecture/1003810562889c4b79a3f8f00f9dd297c787822e/VersionHistory.txt
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "6.0.100-rc.2.21505.57"
4 | }
5 | }
--------------------------------------------------------------------------------
/readthedocs.yml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 |
5 | # Required
6 | version: 2
7 |
8 | # Build documentation in the docs/ directory with Sphinx
9 | sphinx:
10 | configuration: Artefacts/Documentation/source/conf.py
11 |
12 | # Build documentation with MkDocs
13 | #mkdocs:
14 | # configuration: mkdocs.yml
15 |
16 | # Optionally build your docs in additional formats such as PDF and ePub
17 | formats: all
18 |
19 | # Optionally set the version of Python and requirements required to build your docs
20 | python:
21 | version: 3.7
22 | install:
23 | - requirements: Artefacts/Documentation/requirements.txt
24 |
--------------------------------------------------------------------------------