Index

Symbols

.NET Core console application;net core 87

.NET events;net events 204

[CheckAuthorization] aspect;CheckAuthorization 354

[CircuitBreaker] attribute;CircuitBreaker 349

[Transaction] attribute;Transaction 349

@model directive 57

a

abstract classes vs. interfaces 6869

Abstract Factory pattern 77, 130130, 191193

Abstractions 4, 65, 67

abstract keyword 69

ActionDescriptor property 397, 431

Activator.CreateInstance 156, 157

Activator class 155

ActivatorUtilities class 485486, 487, 489, 497

Adapter design pattern 13, 72

AddProductCommand property 223, 225

AddProduct method 223

AddScoped method 378, 472, 479

AddSingleton<T>() method 175

AddSingleton method 231, 378, 472, 479

AddTransient method 378, 472, 479, 482

AdjustInventory command 321, 323

AdjustInventoryService 323, 324, 335, 335, 401, 436, 475

AdjustInventoryViewModel 321

Administrator role 331

ADO.NET Data Services 46

AlertUser method 298

Ambient Context anti-pattern

accessing time through 146148

logging through 148153

negative effects of 150151

refactoring toward DI 151153

ambient scopes 443444

ambiguity, removing

refactoring by 417418, 455455, 487487

using ActivatorUtilities 485486

using code blocks 484485

using conditional registrations 453454

AOP (Aspect-Oriented Programming) 31, 31, 302, 302

APIs (application programming interfaces), registering 409412, 447451, 480483

App class 227

applications

ApplyDiscountFor method 104, 108

Apply method 108, 109

AsClosedTypesOf 401402

As method 397, 414

ASP.NET Core framework

IUserContext Adapter specific to 7172

MVC applications, composing 228234

using custom controller activators in 230231

ASP.NET Core web application 87

ASP.NET Web Forms 98, 213

aspect attributes 331, 350

Aspect-Oriented Programming

AspNetUserContextAdapter class 72, 72, 72, 72, 72, 158, 158, 159, 195, 197, 198, 204, 243, 243, 243, 260, 367, 370, 370, 371, 371, 375, 375

Assert.Equal method 24

Assert.Fail method 312

asynchronous application models 276278

async keyword 233

AsyncScopedLifestyle 444

attribute parameter 111

auditing

implementing aspects 328331

implementing audit trail 203

implementing using Decorators 287290

AuditingCommandServiceDecorator<TCommand> 329

AuditingUserRepositoryDecorator class 288, 288, 288, 289, 289, 290290, 306, 307, 308, 327

authorization 334

Autofac.Core.KeyedService 424

Autofac container 380

Auto-Registration 361, 376, 379, 383, 474

AutoWireContainer 365, 367, 371

Auto-Wiring 363364, 364, 371, 410, 413, 415, 417, 430, 453, 489

await keyword 233

Azure 18, 46

AzureProductRepository class 132, 132

Azure Table data access layer 47

Azure Table Service 76

B

BCL (Base Class Library) 16, 26, 44, 65

BeginLifetimeScope method 407

BeginScope method 441

big object graphs 98

Binding markup extension 225

Bitmap 108

BuildServiceProvider 469

bus factor 386

c

caching 291

CalculateRoute 191

Captive Dependencies 110, 266269, 446446

Castle.DynamicProxy.IInterceptor interface 344

Castle.DynamicProxy.IInvocation 347

Castle Dynamic Proxy 344346

Chain of Responsibility pattern 287

CircuitBreakerAttribute 353

CircuitBreaker class 295

CircuitBreakerInterceptor

applying inside Composition Root using Pure DI 345346

implementing 344345

Circuit Breaker pattern

creating for IProductRepository 294295

implementations of 295297

intercepting with 292297

CircuitBreakerProductRepositoryDecorator class 294, 296, 302, 308, 342

client applications 7

Closed state 295

CLR (Common Language Runtime) 57, 348, 363

code blocks

registering objects with 411412, 450451, 482483

removing ambiguity with 484485

code cohesion 40

code smells 118, 127, 164, 164

cohesion 40, 306

collaborators 1515

Collection.Create method 456

Collection.Register method 434, 440

Command-Query Separation (CQS) 315

commands 315

Commerce.Web assembly 375

CommerceContext. DbContext 203

CommerceContext class 37, 38, 38, 48, 50, 70, 71, 75, 251, 290, 367

CommerceControllerActivator class 90, 90, 90, 91, 231, 231231, 232, 232, 242, 243, 243, 244, 245, 252, 253, 257, 258

Common Language Runtime (CLR) 57, 348, 363

Common Service Locator (CSL) 138

compile time

coupling caused by compile-time weaving 354354

loss of support with dynamic Interception 347347

compile-time support 347

compile-time weaving 348355

component elements 404

ComponentNotRegisteredException 396

components

in Autofac, multiple

selecting among multiple candidates 413417

wiring Composites 422425

wiring Decorators 420422

wiring sequences 417420

in MS.DI, multiple 483498

in Simple Injector, multiple 451464

interaction between 7475

named 416417

releasing 406409, 440443, 477479

selecting from larger set 418420, 455457, 488489

composability

evaluating 4547

missing, analysis of 4750

Composer class 242, 242, 264, 264

Composite design pattern 13, 170

CompositeEventHandler<TEvent> class 424, 461, 496

CompositeLogger 275

CompositeNotificationService 171, 172, 172, 177, 422, 423, 459, 459, 492, 493, 493

Composite pattern

generic, wiring 424425, 461461, 496498

non-generic, wiring 422424, 459460, 493495

wiring 422425, 459461, 492498

composite wrapping 177

Composition Root pattern 60, 68, 8593

concrete classes 69

Concrete Factory 129130, 130

concrete types 396397, 430431, 469470

concurrency bugs, by tying instances to lifetime of threads 275278

conditional registrations 453454

configuration

ContainerBuilder 398404

containers 432438

DI Containers 372385

instance scopes 405406

Lifestyles 439440, 477477

multiple implementations of same service 413414, 452453, 484484

primitive Dependencies 409411, 448449, 480481

ServiceCollection 471476

Configuration as Code

configuring ContainerBuilder with 398400

configuring containers with 433434

configuring DI Containers with 377379

configuring ServiceCollection with 472473

configuration files

configuring ContainerBuilder with 403404

configuring containers with 437438

configuring DI Containers with 372376

configuring instance scopes with 406406

connectionString parameter 367

console applications, composing 213218

Console class 16

ConsoleMessageWriter class 15, 15, 16, 16, 18, 20, 21, 25, 31

ConsoleWriter class 20

Constrained Construction anti-pattern 19, 98, 153160

Constructor Chaining 133

Constructor Injection pattern 16, 16, 24, 53, 60, 64, 91, 93, 95102

Constructor Over-injection code smell 164180

ConstructorResolutionBehavior property 118, 119, 119, 119

ContainerBuilder, configuring 398404

Container class 433

ContainerOptions class 119, 119

containers

configuring 432438

detecting Captive Dependencies 446446

diagnosing for lifetime problems 444447

Content property 225

context parameter 111

Control Freak anti-pattern 88, 97, 127136, 185

controller activators, custom

creating 230232

using in ASP.NET Core 230231

Controller class 42

controllers 42, 231, 362362

ControllerTypeInfo property 397, 431

controllerType variable 397, 431, 470

converter field 102

ConvertTo method 112

coupling at compile time 354354

CQS (Command-Query Separation) 315

create, update, and delete (CUD) operations 299

CreateCurrencyParser method 215, 216, 216216, 216, 276, 276

CreateHomeController method 252

CreateInstance<T> method 485

CreateInstance method 155

Create method 90, 183, 186, 230, 243

CreateNew method 366

CreatePage method 228

CreateRateDisplayer method 264

CreateScope method 478

Cross-Cutting Concerns 12, 28, 31, 48, 150, 282, 348

cross-sellings 310

CSL (Common Service Locator) 138

CUD (create, update, and delete) operations 299

currencies, updating 214214

Currency class 217

currency conversions

adding to featured products 100102

adding to Product Entity 112113

CurrencyMonitoring program 262

CurrencyParser class 216, 216

Currency property 102

CurrencyRateDisplayer class 263, 264

Current property 146

CurrentUser property 197

CustomerServices class 107

D

Danish krone symbol 58

data access interface 4849

data access layers 4647, 50, 53, 7071, 76

data access library 47, 48

database engines 5

DataContext property 220, 220, 225

data layers 3639

DataTemplate 225

Data Transfer Objects (DTOs) 58, 182

DateTime method 146

DbContext.ChangeTracker property 203

DbContext.SaveChanges method 203

DbContext class 37, 38, 251, 262265

DbContextOptionsBuilder 37

DbSet<T> class 175

DDD (Domain-Driven Design) 105

DDOS (Distributed Denial of Service) 292

Decorator pattern 284287

defaultAssembly attribute 375, 403

Delete method 248, 302

Dependencies

Captive 266269, 446446

consumers of 105108

cyclic, fixing 194206

disposable 245255

injected 108109

injecting into MainViewModel 220225

lifecycles of 239242

named 414416

newing up 128128

primitive

configuring 409411, 448449, 480481

extracting to Parameter Objects 449450, 481481

releasing 250254255

selecting based on runtime data 187193

Stable 2626

Volatile 2627

with Composition Root 9293

dependency graphs

analyzing 7578

evaluating 4445

for analysis of missing composability 4748

Dependency Inversion Principle (DIP) 66, 304

Dependency Lifetime, managing 238245

Dependency property 114

deployment artifact 87

DI (Dependency Injection)

advantages of 1724

compile-time weaving aspects are unfriendly to 352354

myths about 58

purpose of 814

refactoring from Ambient Context toward 151153

refactoring from Constrained Construction toward 157160

refactoring from Control Freak toward 135136

refactoring from Service Locator toward 144144

scope 2731

three dimensions of 3131

diagnosing containers for lifetime problems 444447

diagnostic warnings 447

DI Containers 88, 26, 76, 85, 261

Dictionary<TKey, TValue> class 175

DIP (Dependency Inversion Principle) 676768, 68, 304, 304

DiscountedProduct class 60, 60

DisplayRates method 265

disposable Dependencies 245255

disposables, ephemeral 247249

disposable Transients 479

Dispose method 442

Distributed Denial of Service (DDOS) 292

Domain-Driven Design (DDD) 105

domain events 173180

domain layers 36, 3942

domain models, independent, building 6169

DoSomething method 110

DRY (Don't Repeat Yourself) principle 117, 306, 342

DTOs (Data Transfer Objects) 58, 182

dynamic Interception 342348

e

e-commerce applications, rebuilding 5374

EditProductCommand property 223, 224, 225

EditProduct method 223

EditProductViewModel 248

EndpointAddress 109

EndpointAddressBuilder 109

Entity 63

Entity Framework Core 38, 70

enum 188

ephemeral disposables 247, 247248, 249

Equal method 24

error handling 140, 291

ErrorHandlingProductRepositoryDecorator class 297, 298

event handlers 424

exceptions, reporting 297298

Exclaim method 16, 24

executables 87

Execute method 323

extensibility 17, 1920, 48, 118120

F

Facade Services 168173

factories, Control Freak through 129133

fault tolerance 291, 328

fear, uncertainty, and doubt (FUD) 4

FeaturedProductsViewModel class 57, 57

feedback cycles 388389

finally statement 253

Fixture Teardown 144

folding 84

Foreign Default 97, 133

FormalGreeter 286

FUD (fear, uncertainty, and doubt) 4

g

general-purpose library 76

Generic Subdomain 361

generic type constraints 431

GetAllInstances method 462

GetAll method 295

GetAttributeAdapter 111

GetById method 289

GetByName method 199, 200, 201, 201

GetCurrentScope method 444

GetCurrentTime method 148

GetFeaturedProducts method 47, 48, 60, 61, 64, 75, 101, 112, 113, 113, 128, 141, 185, 270

GetInstance method 430, 431, 462

GetLogger method 151

GetRequiredService method 470, 470, 470, 476, 484

GetRoute method 188

GetService method 140, 143, 470

GetTypesToRegister method 435

GetWelcomeMessage method 147

GoBack method 223

God Class 165

God Objects 69

Greet method 285

GridView, XAML 224

Guard Clauses 16, 59, 119, 140, 167

Guard method 294

H

Half-Open state 295

Handle method 176

HasTierPrices property 318

Hello DI! 1424, 28

HomeController class 42, 56, 95, 137, 180, 181, 232, 367

HttpContext 39

HttpContext.Response.RegisterForDispose method 230, 254

HttpContextAccessor 72

I

I/O operations 347

IApplicationContext 108

IAttributeAdapter method 111, 111

IAuditTrailAppender interface 195, 195, 198, 200, 201, 205, 287, 288, 289, 306

IBillingSystem 166

ICircuitBreaker interface 295, 296, 303, 353

ICommandService interface 319, 321323, 326, 327, 382, 401, 436, 475

IComponentContext interface 419

IConstructorResolutionBehavior interface 118, 450

IControllerActivator interface 90, 90, 90, 229, 230, 397, 431

ICurrencyConverter.Exchange method 112, 113

ICurrencyConverter interface 100, 101, 101, 111, 113, 113, 214, 214

ICustomerRepository interface 107

IDisposable interface 30, 183, 183, 239, 245

IEnumerable<T> interface 175, 273275

IEventHandler<TEvent> interface 175, 175, 176

IExchangeRateProvider interface 216, 216

IGreeter interface 285

IHttpContext interface 182, 182

IIdentity 20

IImageEffectAddIn 109

IInventoryManagement 166, 168

IInvocation interface 345, 345

IL (Intermediate Language) 348

ILifestyleSelectionBehavior 440

ILocationService 166, 168

IMessageService 166

IMessageWriter.Write method 24

IMessageWriter interface 16, 16, 18, 19, 19, 20, 21, 25

implementation attribute 438

implementations, splitting 315317

INavigationService.NavigateTo method 222

independent domain models, building 6169

Index method 42, 43

Index view markup 43

Initialize method 109, 110, 111, 222

injected streams 463

INotificationService 170, 171, 173, 179, 422, 459, 492

INotifyPropertyChanged interface 222, 223

Insert method 303

InsertProduct command 318

inside-out technique 55

InstancePerDependency 446

instance-scope attribute 406

instance scopes, configuring 405406

Interception 3031, 62

Intercept method 87, 345

Interceptor

interfaces 5

Interface Segregation Principle

Intermediate Language (IL) 348

InvalidOperationException 469

InventoryController 322

Invoke method 233

IoC (Inversion of Control) 29, 76

IOrderFulfillment interface 168, 168

IOrderRepository interface 166, 246, 247

IPrincipal interface 65, 67

IProductCommandServices interface 315, 315, 336

IProductManagementService interface 249

IProductQueryServices interface 336

IProductRepositoryFactory interface 130, 157, 157, 158, 183, 184, 186

IProductRepository interface 62, 63, 70, 76, 128, 130, 131, 154, 157, 183, 184, 257, 294295, 297, 346, 367, 369, 381

IProductService interface 59, 309, 348, 367, 436, 475

IRouteAlgorithmFactory interface 189, 189, 189, 191, 192

IRouteAlgorithm interface 188, 188, 191

IRouteCalculator interface 191

isCustomerPreferred parameter 40

IsDecoratorFor method 424, 495

IServiceCollection 88

IServiceProvider 497

IServiceScope 469, 477, 482

ISP (Interface Segregation Principle) 186, 186, 304, 304

ItemClickCommand 224

ITimeProvider interface 146, 147, 195, 329

ITypeDescriptorContext 111

IUIControlFactory interface 7

IUpdateProductReviewTotalsService 318

IUserByNameRetriever 200, 201

IUserContext Adapter 7172

IUserContext interface 65, 67, 71, 101, 158, 183, 183, 198, 200, 367

IUserRepository 200, 201, 288, 288, 306

IValidationAttributeAdapterProvider interface 111

IViewModel interface 223

IVoucherRedemptionService 107, 107

J

JIT (Just-In-Time) compiler 348

justification argument 447

K

KeyedService class 424

KeyNotFoundException 141

key-value database 46

l

lambda expression 369

late binding 5617, 18, 19, 29, 48, 154156, 377

layering in UpdateCurrency 217218

Lazy<T> 269272

LazyAuditTrailAppender 205, 206

LazyUserContextProxy 272, 272

Leaky Abstractions

as parameterless factory methods 183184

code smells 182183

IEnumerable<T> as 273275

Lazy<T> as 269272

to leak Lifestyle choices to consumers 269275

legacy applications 21

libraries

resuable 69

third-party 386387

lifecycles of Dependencies 239239240, 242

Lifestyle.Singleton and Lifestyle.Transient 442

Lifestyles

bad choices 266278

configuring 439440, 477477

patterns 255265

Lifetime Management 30, 183, 185, 404409, 438447, 476479

lifetime scopes 406

LINQ query 495

Liskov Substitution Principle 10, 21, 30, 241, 283

Local Default 97, 101, 114

Locator.Reset() method 144

Locator class 140, 143

logging 76, 102, 149, 328, 330

LoggingMiddleware class 233

logic

implementing application logic 1516

unit testing 2324

logical artifacts 87

LogManager.GetLogger method 151

Log method 275

long-running applications 262265

loose coupling 5, 26, 283

loosely coupled code

analyzing loosely coupled implementations 7478

rebuilding e-commerce applications 5374

LSP (Liskov Substitution Principle)

analyzing accidental violations 323324

fixing using generic Abstraction 324326

M

Main method 15, 15, 28, 29, 86, 87, 88, 213

maintainability 17, 2121, 48

MainViewModel class

injecting Dependencies into 220225

wiring up 225225

MakePreferred method 106

mapping Abstractions to concrete types 396397, 469470

messages, intercepting 21

messageWriter application 19

messaging 179

method calls

varying Dependency consumer on each 105108

varying injected Dependency on each 108109

MethodExecutionTag property 351

Method Injection pattern 53, 104113

Microsoft.Extensions.DependencyInjection 378,

Microsoft Azure 46

Microsoft Distributed Transaction Coordinator (MSDTC) 322

middleware 233234

Model property 57, 225

MS.DI (Microsoft.Extensions.DependencyInjection)

Lifetime Management 476479

overview of 467476

registering difficult APIs 480483

working with multiple components 483498

MSDTC (Microsoft Distributed Transaction Coordinator) 322

multi-threading 276278

MVC (Model View Controller) applications, for ASP.NET Core 228234

MVVM (Model-View-ViewModel) 218, 218, 220, 220

MyApp.Services.Products namespace 323

N

Named method 414

Navigate method 225

NavigateTo method 222, 222

new keyword 50, 127, 127, 134

NewProductViewModel 223

n-layer application 35, 60

no operation 117

NuGet packages 441

null argument 96

Null Object pattern 102, 117

NullReferenceException 11, 115, 293, 353

null value 141

O

Object Composition 28, 2929, 91, 212, 385

object graphs 72, 72, 98

Object Lifetime 3030

objects

Abstractions to concrete types 430431

resolving 395397, 429432, 468471

with code blocks, registering 411412, 450451, 482483

OCP (Open/Closed Principle)

fixing using Parameter Objects 317321

IProductService violates 312313

OnLaunched method 219

OnMethodBoundaryAspect 350, 351

OnSuccess method 351

Open/Closed Principle 14, 21, 116, 200, 297, 410

Open state 295

optional method arguments 222

Options property 119

OrderAccepted event 179

OrderApproved class 174

OrderCancelled class 174

OrderFulfillment class 175, 176

OrderService class 167, 168, 169, 246

outside-in technique 55

overloaded constructors 133134

p

parallel development 17, 2021, 49

parameterless factory methods 183184

Parameter Objects

extracting primitive Dependencies to 449450, 481481

fixing OCP using 317321

passive attributes 331

patterns, choosing 120121

performance monitoring 328

PermittedRoleAttribute 332, 332, 333

persistence ignorance 70

per-thread Lifestyle 266

POCOs (Plain Old CLR Objects) 57, 57, 220, 220

Policy suffix 401

PostSharp tool 350

PowerShell 213

predicate value 453

price value parameter 105

primitive Dependencies

configuring 409411, 480481

extracting to Parameter Objects 481481

private readonly field 151

Proceed method 345

Product class 37, 50, 63, 70

Product Entity 112113

product-management rich clients, wiring up 219225

productRepository 239

ProductRepository 75, 154156

ProductRepositoryFactory class 131, 131, 132, 132

ProductRepositoryStub 141

ProductService class 40, 40, 42, 47, 64, 72, 86, 101, 101, 111, 128, 129, 133, 140142, 143, 239, 243, 260, 272

ProductViewModel class 57

Program class 87, 213, 264

Property Injection pattern 93, 102, 114120, 204, 204, 205

public keyword 69

Pure DI 15, 88, 144, 216, 376

r

readonly field 144

readonly keyword 245

reads, separating from writes 314315

RedeemVoucher method 106, 107

refactoring

by removing ambiguity 417418, 455455, 487487

from Abstract Factory to Adapter 191193

from Ambient Context toward DI 151153

from Constrained Construction toward DI 157160

from Constructor Over-injection to domain events 173180

from Constructor Over-injection to Facade Services 168173

from Control Freak toward DI 135136

from Service Locator toward DI 144144

from SRP violations to resolve Dependency cycles 200203

RegisterAssemblyTypes method 400, 401, 402, 421, 423

RegisterConditional method 453

RegisterDecorator 383, 420421, 457, 461

registered components 456

RegisterGenericDecorator 420, 421422, 424

Register method 141, 365, 411

Register Resolve Release pattern 372

RegisterType method 397, 398

registrations

conditional 453454

difficult APIs 409412, 447451, 480483

named Dependencies 414416

objects with code blocks 411412, 450451, 482483

suppressing warnings on individual 447447

Release method 230, 253

releasing components 406409, 440443, 477479

reliable messaging 179, 179

Repository pattern

resolving multiple 259260

thread-safe in-memory 257258

repository variable 128, 128, 241

Reset method 141

Resolve<T> method 397

Resolve API 361363

ResolvedParameter class 415

Resolve method 88, 362, 362, 368

resolving 394404

reusable libraries 69, 118120

role-based security 334

RouteCalculator class 192, 243

RouteController 188, 189, 191, 232

RouteType 188

row-based security 334

runtime data, selecting Dependencies based on 187193

S

Salutation class 15, 15, 16, 16, 19, 23, 24, 25

scoped DbContext 262265

Scoped Dependencies 261, 278

Scoped Lifestyle pattern 260265

scopes, ambient 443444

Seams 25, 213, 218

SecureMessageWriter class 20, 20, 20, 21, 31, 287

SecureProductRepositoryDecorator 299, 308, 331

security 19, 291, 328, 331334

sensitive functionality 298300

separation of concerns 40, 50

sequences

Auto-Wiring 418418, 455455, 487487

streams as 462464

wiring 417420, 454457, 486489

ServiceCollection, configuring 471476

Service Locator anti-pattern 7, 7, 8, 88, 88, 136144, 353

ServiceProvider property 467, 478

services, weakly typed 397397, 431432, 470471

SimpleDecorator class 285, 286

Simple Injector

Lifetime Management 438447

overview of 428438

registering difficult APIs 447451

working with multiple components 451464

SimpleInjector.Containe 430

SingleInstance method 405

Single Responsibility Principle

Singleton Dependencies 261

Singleton Lifestyle pattern 242, 256258, 439

Singletons 245

Site property 118

SOLID

analysis of IProductService from perspective of 311313

applying principles to improve design 314327

as driver for AOP 308337

principles for 304308

split classes 204

splitting

implementations 315317

interfaces 315317

SpyMessageWriter 24

SqlAuditTrailAppender 195, 195, 198, 204, 204, 205

SqlExchangeRateProvider 216, 276

SqlProductRepository 66, 67, 72, 128, 132, 132, 133, 158, 158, 158, 185, 185, 239, 243, 243, 283, 350, 367, 370, 381

SqlProductRepositoryFactory 158, 159, 159, 159

SqlProductRepositoryProxy 186, 186, 186

SqlUserByNameRetriever 201

SqlUserRepository class 197, 199, 199, 201, 204, 260

SRP (Single Responsibility Principle) 21, 28, 31, 40, 40, 40, 50, 165, 165

Stable Dependencies 2626

StackOverflowExceptions 199, 371

Startup.ConfigureServices method 90

Startup class 88, 88, 230, 230, 233, 245

stateless service 259

Static Factory 131133

string argument 154

SummaryText property 57

SuppressDiagnosticWarning 447

SUT (System Under Test) 21

System.Activator class 366

System.ComponentModel.DataAnnotations 328

System.ComponentModel.Design.IDesigner 111

System.ComponentModel namespace 111

System.Data.SqlClient.SqlDataReader 462

System.DateTime.Now 27

System.IO.StreamReader class 99

System.IO.StreamWriter class 99

System.Lazy<T> class 269

System.Random 27

System.Security.Cryptography.RandomNumberGenerator 27

System.Security.Principal.WindowsIdentity class 20

System.Timers.Timer class 265

System.Transactions.TransactionScope class 322

System.Windows.Input.ICommand 220

System.Xml assembly 24

System Under Test (SUT) 21

T

Table Storage Service 46

TCommand argument 382

TDD (Test-Driven Development) 6, 55, 182

Temporal Coupling code smell 109110

testability 17, 2123, 49, 182

Test Doubles 21, 24

Test-Driven Development (TDD) 6, 55, 182

testing 6623, 24

TEvent type 175

text messages, intercepting 21

third-party add-ins 5

third-party libraries 386387

ThreadPool.QueueUserWorkItem 276

threads 260

thread-safe in-memory Repository 257258

three-layer diagram 35

tightly coupled code

analysis of missing composability 4750

building tightly coupled applications 3544

evaluating tightly coupled applications 4447

TimeProvider class 147, 148

TimeSpan 156

TitledGreeterDecorator class 286

ToEndpointAddress method 109

Torn Lifestyles 388, 399

TrackDisposable method 252, 254

transaction aspect, applying using compile-time weaving 349351

TransactionAttribute 349, 350, 350

TransactionCommandServiceDecorator class 321

transaction handling, applying using Abstraction 326327

TransactionScope class 322, 351, 443

Transient Lifestyle pattern 259260, 439

Transients, disposible 408, 479

transitivity 93

try statement 253

Type instance 19

type parameters 175, 362

U

UI (user interface) toolkits 7

UI Layer 36

UIs (user interfaces)

building 4546

creating layers 4244

maintainable, building 5661

unauthorized access to sensitive functionality 298300

uninterrupted power supply (UPS) 11

UnitPrice property 225

unit testing 624

Universal Windows Programming

UpdateCurrencyCommand 217

UpdateCurrency program

building Composition Root of 215216

layering in 217218

updating currencies with 214214

UpdateHasDiscountsApplied 312

UpdateHasTierPricesProperty command 310, 312, 318

UpdateProductReviewTotals 323

UpdateProductReviewTotalsService 323

updating currencies 214214

UPS (uninterrupted power supply) 11

Uri property 109

Use extension method 233

userContext variable 198

user interface (UI) toolkits 7

user interfaces

UserMailAddressChanged even 203

User property 39, 43

user repository 288289

userRepository variable 198

UserService class 199

using statement 249

uto-Registered Abstractions 458

UWP (Universal Windows Programming) applications 87

V

Validate method 247

validateScopes 469

validation 291, 328

ValidationAttribute 111, 111

valueAccessor delegate 415

Value property 270

violations

of LSP, accidental 323324

of SRP

Dependency cycle caused by 195198

refactoring from to resolve Dependency Cycle 200203

Virtual Proxy 205, 272

Visual Studio 5

Volatile Dependencies 2627, 50, 53, 127, 355355

w

warnings, suppressing 447447

WCF (Windows Communication Foundation) 247

WcfProductRepository class 248, 249, 294, 297

web-based UI 76

WelcomeMessageGenerator 151

whenDone action 222

Where method 401

Windows Communication Foundation (WCF) 247

Windows Presentation Foundation (WPF) 45

wiring

Composites 422425, 459461, 492498

Decorators 420422, 457459, 489492

MainViewModel 225225

product-management rich clients 219225

sequences 417420, 454457, 486489

WithParameter method 412, 415, 419, 425

WPF applications 87

WPF-based UI 76

wrapping, composite 177

Write method 16, 20

writer instance 14

writes, separating from reads 314315

WrittenMessage property 24

X

XmlProductRepository 156

XmlReader argument 156

XmlWriter 24

Y

YAGNI principle 55

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.187.210