INDEX

A common tasks, 372–376 components, 378–380 ABC model, 441–442 connection pooling, 403 abstract base class, 213–215 connection string formats, 380–381 abstract interfaces, 217–225 data providers, 378, 380 abstract method, 214 DataAdapter objects, 389–394 abstraction, 104, 180, 225–227 database structure, 408 access modifi ers, 209 DataException class, 264 access permissions, 722–723 DataReader object, 385–386 ActionLink HTML Helper, 613, 616 DataSet component, 395–401 actions, 605–609, 615, 617–618, 620 DataTable objects, 398–401 Activator class, 714 deleting data, 375–376 Active Database Objects (ADO), 407 design goals, 371 Active Directory, 730 Entity Data Model, 410 ActiveX Data Objects, 369 comparison, 409–410 Adapter, 684 inserting data, 373–374 Add New Item dialog, 641 multi-tiered environments, 371–372 Add Reference dialog, 27, 84 namespaces and classes, 377–378 Add Service Reference dialog, 445–447, .NET data providers, 379–380 456–457 selecting data, 372–373 Add View dialog, 606–607, 610 stored procedures, 382–385 AddHandler, 156, 158–160 transactions, 403–406 lambda expressions, 244 updating data, 374–375 AddressOf, 759 COPYRIGHTED MATERIALXML data sets, 370 Administrators role, 730 Advanced Encryption Standard (AES), 758, ADO. See Active Database Objects 765 ADO.NET, 120, 315, 369, 407 Advanced properties, 548–549 architecture, 371–372 AES. See Advanced Encryption Standard asynchronous command execution, AesCryptoServiceProvider, 744 387–389 AesManaged, 773 basic features, 372–380 AggregateException, 785, 790, 792, 800 class types, 378 AJAX, 561 common , 401–403 alpha channel, 487

833

bbindex.inddindex.indd 883333 111/29/20121/29/2012 112:32:202:32:20 PPMM And conditional – ASP.NET

And conditional, 115–116 ArrayList, 287, 293–294 And operator, 171 arrays, 281, 282–286 AndAlso, 172 multidimensional, 283, 284 animation, 549–551 parameter, 132–133 ANSI X9.31, 748 Preserve, 286 app bar, 521 ReDim, 285–286 app stores, 816–817 UBound, 284–285 AppBar, 524–527 ASCII, 124 app.config fi le, 26 AsOrdered, 812–813 AppDomain class, 710, 711 AsParallel, 811–812 AppendChild, 340, 341 ASP.NET, 4, 14, 59, 356, 561 application confi guration fi le, 706 AJAX, 561 Application Event Log, 96, 273 culture setting, 646, 650–652 application isolation, 703–704 currencies, 656 application services, 667, 668. See also DataList control, 362 Windows Services event logs, 274 application templates forms authentication module, 743 Common folder, 555 global culture declaration, 649–650 Grid App, 552–554 layouts, 472 Internet Application, 604 list boxes, 504 layout aware pages, 555 local resources, 658–663 online documentation, 556 Model-View-Controller pattern, Silverlight, 551 603–605 Split App, 552 namespace referencing, 89–90 StandardStyles.xaml, 555–556 Razor view engine, 561 Visual Studio 2012, 551–556 resource fi les, 658–663 Windows Presentation Foundation resource managers, 406 (WPF), 551 server-side development options, 563 application-private assemblies, 697, 701 shared variables, 165 applications. See also Windows Store Trace and Debug objects, 275 applications transactions, 406 assemblies private to, 697, 701 views, 575 building, 44–45 ViewState encoding, 739 confi guration fi les, 706 Visual Studio 2012 support, 562–563 elements, 61–65 Visual Studio support, 562–563 isolating assemblies, 703–704 WCF communication, 434 running in debugger, 45–52 Web API, 561, 625–628 signing, 736–737, 829 Web Forms, 563–586 UAC settings, 735–739 Web Pages, 561, 586–602 ArgumentException, 267–268 web server options, 562–563 Array class, 125 XML, 361–367

834

bbindex.inddindex.indd 883434 111/29/20121/29/2012 112:32:212:32:21 PPMM ASP.NET Development Server – BasedOn styles

Xml server control, 366–367 modifi er, 16 XmlDataSource, 361–366 AssemblyLoad, 220, 233 ASP.NET Development Server, 562–563 asymmetric encryption, 740. See also Public ASP.NET MVC, 561, 586, 602–624 Key Cryptographic System actions, 605–609, 615, 617–618, 620 Async keyword, 238, 247–255 controllers, 605–609, 615 core concept, 248–252 CRUD operations, 614–623 lambda expression use with, 248 models, 609 pickers, 543 routing, 614 using, 252–255 scaffolding, 614–623 AsyncCallback, 388 views, 609–613 asynchronous execution, 793 assemblies, 63–65, 693 ADO.NET, 387–389 application isolation, 703–704 asynchronous methods, 247–248 application-private, 697, 701 asynchronous operations, 790, 794 culture, 700 asynchronous programming, 247–248, 253 defi ning location, 708 AsyncState, 389, 790 deployment, 701–703 atomic operations, 806 dynamic loading, 713–716 attached properties, 473–474 fi nding types in, 711–712 attribute syntax, 470–471 global cache, 702–703 audit type entries, 274 identity, 696–700 Authorized Users settings, 732 loading, 705–706 AutoLog property, 673, 679 management tools, 737 automatic size columns, 475 manifest, 63–64 Autos window, 52 metadata hash, 702 Await keyword, 238, 247–255 namespaces, 83, 471 core concept, 248–252 referenced, 700–701 exceptions within, 249 self-describing components, 704 using, 252–255 shared, 697, 701–703, 707 awaitable methods, 252 side-by-side execution, 704 Azure, 13 signing, 698–700 strong names, 698–700 B structure, 694 version numbers, 64–65, 698 Background, 470 version policies, 704–706 base class, 182, 184, 193 versioning, 64, 703–709 abstract, 213–215 assembly attributes, 16–17 fragile, 199, 201–202 Assembly class, 710–711 interacting with, 202–205 LoadFrom, 713–714 preventing inheritance, 215 Assembly Information, 16–17 Base Class Library (BCL), 293, 297 assembly level scoping, 105 BasedOn styles, 512

835

bbindex.inddindex.indd 883535 111/29/20121/29/2012 112:32:212:32:21 PPMM BasicHttpBinding – Chr

BasicHttpBinding, 450 Button, 469, 473, 476 BCL. See Base Class Library content model implications, 485 Begin methods, 247–248 Radio, 470 BeginExecuteNonQuery, 387 Byte, 110, 113, 117, 123–124 BeginExecuteReader, 387, 389 BeginExecuteXmlReader, 387 C BeginForm helper, 622 Beginning ASP.NET Web Pages with C#, 3, 10, 230 WebMatrix (Brind and Spaanjaars), 586 conversions, 137 behavior, 7, 106–107 iterators, 238 bigint value, 120 static variables, 165 binary operators, 170, 171 C++, 3, 199, 300 BindableBase, 555 debugging options, 22 BindGrid, 389 CA. See Certifi cate Authority Binding class, 491–492 Call Stack window, 51 binding expressions, 491–492 callback methods, 172 BindingList, 297–298, 312 ADO.NET, 388 bit shifting, 171 CancellationToken, 787, 800 BitArray, 287 CancellationTokenSource, 800–801 bitwise operation, 171 CanDeserialize, 322 BizTalk, 315 CanStop, 684 Blank App template, 551, 555 Canvas, 478–479 BlockingCOllection(Of T), 807 Catch, 265–267 blocks, 133–134 Cert2spc.exe, 737 blogs, 363–364 Certifi cate Authority (CA), 751 Boolean, 113, 115, 117, 118–119 certifi cate management tools, 737 Boolean conversion, 171 Certifi cate Trust List (CTL), 737 BooleanNegationConverter, 555 certifi cation, 720 BooleanToVisibilityConverter, 555 Certifi cation Requirements, 820 BooleanVisibilityConverter, 507 Certmgr.exe, 737 Border, 468, 470 chains of inheritance, 199 boxing, 125, 282, 291–292 Char, 113, 117, 123–124 Break, 782 Character, 110 breakpoints, 46, 48–50 charms, 520, 521 Brind, Mike, 586 CheckBox, 470, 492–493 Browse, 612 ASP.NET, 575 browser zoom factor, 472 reskinning, 514–515 brushes, XAML, 486–488 child class, 182 building applications, 44–45 ChildNodes, 339 BuildSqlCommand, 391–392 Children, 473 Business Data Catalog projects, 13 Chr, 124

836

bbindex.inddindex.indd 883636 111/29/20121/29/2012 112:32:212:32:21 PPMM chromeless apps – command lines

chromeless apps, 522 user input, 636–637 ChrW, 124 validation, 638 circular references, 72 Web API, 625–628 Class, 6 Cloud Services projects, 13 Class, 7 code access permissions, managing sets, class constraints, 310 731–734 Class Designer, 56, 181, 185, 188 Code Analysis tab, 28 class diagrams, 54–56 Code Editor, 53 Class keyword, 143–144 code expansion, 35–38 Class Library, 4 code regions, 41–42 Class Library project, 11 code reuse, 182, 200 Class View window, 415 code snippets, 39–41 classes, 105, 125–131 Code Snippets, page markup editing, 567 Activator, 714 Code view, 33–34 AppDomain, 710, 711 Code View, 29 Assembly, 710–711, 713–714 CodeAccessPermission, 727–728 base, 182, 193 CodeAccessPermission, 723 basic, 143–152 code-behind child, 182 model binding, 584 creating, 143–161 Web Forms, 565–566 derived, 182 Windows 8 Style apps, 640 fi elds, 145 XAML, 468–469 generic, 300–306 Collection classes, 125 immutable, 128–130 collections, 282, 286–292 interacting with, 202–205 boxing, 291–292 methods, 145–146 concurrency classes, 805 parent, 182 FIFO, 807 scope, 133 iterative statements, 288–291 super, 182 LIFO, 807, 809 Type, 710, 711–713 Collections, 286 virtual, 215 CollectionView, 239 clauses, 245 CollectionViewSource, 536 ClearPool, 403 colors, XAML, 486–487 Click events, 152–153, 157 ColumnDefinitions, 474 ClickOnce, 815 editor, 476–477 client-side web development, 624–638 Width property, 475–476 building website, 628–629 COM, 370, 407 forms, 634–636 COM components, 23, 83 handling events, 632–633 COM interfaces, 65 jQuery, 629–632 ComboBox, 239, 688 REST services, 625–628 command lines, 9

837

bbindex.inddindex.indd 883737 111/29/20121/29/2012 112:32:212:32:21 PPMM Command object – constructor methods

Command object, 381–382 concurrency, 763–764 stored procedures, 382–385 collection classes, 805, 807–810 CommandBehavior.CloseConnection, LINQ queries, 809 386, 388 namespaces, 776, 807 commands. See also specifi c commands concurrent collection features, 807–810 conditional, 114–117 ConcurrentBag(Of T), 807, 813 custom, 686–688 ConcurrentDictionary(Of TKey, CommittableTransaction, 404 TValue), 807 Common folder, 555 ConcurrentQueue(Of T), 807–809 common implementations, 221–222 ConcurrentStack(Of T), 807, (CLR), 4–5, 12, 809–810 57–58, 693 conditional commands, 114–117 code access permissions, 727 confi guration fi les, 706–709 exceptions, 263 application, 706 garbage collector, 71–81, 128 assembly location, 708 metadata system, 62, 66–69 machine, 706 task scheduler, 795 runtime settings, 707–709 as runtime, 58 search path, 708–709 Common properties, 548–549 service references, 449–450 common provider model, 401–403 startup settings, 707 (CTS), 65–66 versioning, 706–709 Async and Await add-on, 248 WCF consumers, 449–450 Company accounts, 818 connection pooling, 403 comparison operators, 115–116, 170 connection string formats, 380–381 compilation, 304 Console, 6 compiler settings, 18–21 console applications, 10 compile-time environments, 5 WCF service hosting in, 439–443, 456 component-based design, 105 Console Class, 10 components. See also DataSet component; Console.Out, 319–320 specifi c components Console.WriteLine, 349, 352 ADO.NET, 378–380 constants, string, 130 COM, 23, 83 Constants class, 130 EventLog, 679–680 constraints, 302, 308–311 FileSystemWatcher, 677–679, 681 class, 310 self-describing, 704 multiple, 311 Windows Services .NET components, new, 310 677–680 structure, 310 composition model type, 308–310 content model implications, 485 constructor methods, 160–161 XAML, 466, 485 optional parameters, 164 concatenation, 171 overloading, 164–165

838

bbindex.inddindex.indd 883838 111/29/20121/29/2012 112:32:212:32:21 PPMM constructors – cultures

constructors, 126, 206–209 CreateAttribute, 340 inheritance, 206 CreateComment, 340 locked, 806 Created event, 680 overloading, 208–209 CreateDecryptor, 746 parameterized, 160–161 CreateElement, 340 with parameters, 207–208 CreateEncryptor, 745 simple, 206 createGrouped function, 640 variable initialization, 208–209 CreateInstance, 233, 714 content model, implications, 485–486 CreateNode, 340 content pages, Web Forms, 571–575 CreationOptions, 790 ContentControl, 484, 501 Crockford, Douglas, 637 ContentPlaceHolder, 572–575 cross-language integration, 65–70 continuations, 805 CRUD operations, ASP.NET MVC, 614–623 Continue, 289 cryptographic hash algorithms, 741–742 ContinuePending, 684 Cryptographic Next Generation algorithm, ContinueWith, 805 748 contracts cryptography, 720. See also encryption data, 453–455 categories, 739–741 implementing, 558–559 public key, 720, 740 Service Contracts, 434, 453–455 CryptoStream, 746 contravariance, 312–313 CSDL fi les, 414–415 control events, Web Forms, 569–571 CTL. See Certifi cate Trust List control panels, 683 ctor. See constructors control templates, 513–515 CTS. See common type system creating, 515 CType, 141–142, 171, 299 lookless controls, 513–514 culture attribute, 649, 659 XAML, 466, 513–515 culture defi nitions, 646, 647 controllers, 605–609 CultureInfo object, 648–649 MVC, 615 cultures, 646–652 scaffolding, 615 ASP.NET settings, 646, 650–652 Web API, 626–627 assembly identity, 700 controls. See also specifi c controls dates, 652–654 Name property, 469 global declaration, 649–650 terminology, 469 Internet Explorer settings, 651 third-party, 471 invariant, 647 XAML, 484–488 neutral defi nition, 647, 662–663 conversion methods, 139–140 numbers and currencies, 654–656 converting currencies, 655 server-side declaration, 649–650 Core i7, 788 sorting differences, 656–658 covariance, 312–313 thread, 647–649 Create, 615, 617 types, 647

839

bbindex.inddindex.indd 883939 111/29/20121/29/2012 112:32:212:32:21 PPMM currencies – DataTableCollection

currencies data templates, 499–510 ASP.NET, 656 data binding in, 506–507 converting, 655 ListBox, 503–506 cultural differences, 654–656 ListView, 534 Currency, 121 switching, 507–509 CurrentID, 790 XAML, 466 currentItem.PrimaryKey, 616 data types custom commands, Windows Services, 686– conversion, 137–138 688 delegate, 173–174 Custom Event key phrase, 156 operator support, 169 custom events, 155–156 DataAdapter, 382, 389–394 custom partitioner, 775 Database Helpers, 594 DataBind, 577 D DataContext, 492 DataException class, 264 DAO. See Data Access Objects DataList control, 362 Data Access Objects (DAO), 407 DataProtectionPermission, 723 data binding, 489–499 DataProtectionPermissionAttribute, complex paths, 498 723 data conversion during, 494–497 DataReader, 372–373, 381, 385–386, 389, data templates, 506–507 400 failures, 497 DataRelation, 396 fundamental concepts, 490 DataRelationCollection, 395–396 Path setting, 498–499 DataRowCollection, 393 specifying data source, 492–494 DataSet component, 378–380, 382, 386 Web Forms, 575–580 creating and using objects, 397–398 Windows 8 Style apps, 642 DataReader integration, 400 XAML, 489–499 DataRelationCollection, 395–396 data contracts, 453–455 DataTable independence, 400–401 data conversion, during binding, 494–497 DataTableCollection, 395 Data Model Update Wizard, 425–426 ExtendedProperties, 396–397 data models, 528–529 indexing, 399 data parallelism, 758 serialization, 399–400 data providers, 378 DataSource property, 577 ADO.NET components, 378, 380 DataTable, 389, 392, 395 .NET, 379, 380–395 ADO.NET, 398–401 ODBC, 380 DataReader integration, 400 OLE DB, 380, 394–395 independence, 400–401 SQL Server .NET, 380, 394 indexing, 399 Data Source Confi guration Wizard, 226–227 serialization, 399–400 data source controls, Web Forms, 580–581 DataTableCollection, 395

840

bbindex.inddindex.indd 884040 111/29/20121/29/2012 112:32:212:32:21 PPMM DataTemplateSelector – DOM

DataTemplateSelector, 539–542 deployment, 701–703 Date, 113, 124 application-private assemblies, 701 dates , 702–703 converting, 652 shared assemblies, 701–703 cultural differences, 652–654 derived class, 182 DateTime, 117, 124–125 deriving, 182 DateTime.Subtract, 129 DESCryptoServiceProvider, 744 DBNull class, 130–131 deserialization, 320–322 DBNull value, 294 Deserialize method, 320–322 DbProviderFactories, 401–402 desktop dpi, 472 deadlock, 806 Details, 615, 618 Debug object, 275–278 Developer Command Prompt for VS2012, debug properties, 21–23 680, 695, 698, 752 debugger developer license, 817 Autos window, 52 dictionaries Call Stack, 51 concurrent, 807 Immediate window, 51 ResourceDictionary, 488–489 IntelliTrace, 46–47 Dictionary, 295–296, 304 Locals window, 51 digital certifi cates, 753 Output window, 50–51 Digital Signature Algorithm (DSA), 748 Parallel Stacks, 794–797 digital signatures, 720, 740, 748–751 Parallel Tasks, 794–797 Dim, 6, 7 running applications, 45–52 DIME. See Direct Internet Message toolbar buttons, 49 Encapsulation Watch windows, 51 Direct Internet Message Encapsulation Decimal, 113, 117, 121, 123 (DIME), 435 decimal types, 121–123 DirectCast, 142, 299 default interface, 105 dispatch timer, 244 default property, 151–152 DisplayFor, 618, 622 default task scheduler, 790 DisplayNameFor, 618, 622 default versioning policy, 705 DisplayParallelLoopResult, 783 delay signing, 699–700 DLL. See dynamic link libraries Delegate statement, 174 Do Until, 290–291 delegates, 155, 172–176 Do While, 290–291 data type, 173–174 Document Object Model (DOM), 316 declaring, 173 System.Xml classes, 338 generic, 242 traversing XML, 338–340 implementing, 174–176 XML parsers, 325, 337–342 methods, 174–176 XML writing, 340–342 DeleteCommand, 390 Document Type Defi nition (DTD), 316, 324 dependency property, 490 DOM. See Document Object Model

841

bbindex.inddindex.indd 884141 111/29/20121/29/2012 112:32:212:32:21 PPMM Double – Event Viewer

Double, 113, 117, 121, 122–123, 472 endless loops, 291 DropDownList, 574 EnlistDistributedTransaction, 405 DSA. See Digital Signature Algorithm EnlistDurable, 405 DSACryptoServiceProvider, 748, 750 EnlistTransaction, 405 dsa.FromXmlString, 750 EnlistVolatile, 405 DSASign, 750 Entity Data Model Wizard, 410–415, 419 DSAVerify, 750–751 Entity Framework (EF), 407 DTD. See Document Type Defi nition ADO.NET comparison, 409–410 dynamic link libraries (DLL), 61, 63 architecture, 408–419 debugging, 50 Class View, 415 exported C functions, 65 conceptual model, 410–415 referencing, 23 Data Model Update Wizard, 425–426 dynamic loading, 713–716 database object selection, 412 dynamic XML documents, 350–351 LINQ to entities, 417–418 mapping model, 417 E mapping objects to entities, 419–426 navigation properties, 412 early binding, 136 ObjectContext, 418–419 ECDiffieHellmanCngCryptoService simple mapping, 419–421 Provider, 748 single table for multiple objects, 422–425 ECDsa algorithm, 748 storage model, 416 ECDsaCngCryptoServiceProvider, 748 updating model, 425 Edit, 615, 617, 620 Entity model inheritance, 423 EditorFor helper, 622 Entity Query Language (Entity SQL), 409 EF. See Entity Framework EntityDataSource, 581 Element, 351, 353 Enum, 187 element syntax, 470–471 EnvironmentalPermission, 723 ElementName, 492–493 Environment.Newline, 118 elevated permissions dialog, 736 EnvironmentPermissionAttribute, 723 elliptic curve algorithms, 748 equality operators, 171 Else statement, 114–115 errors, logging, 273–278 ElseIf statement, 114–115 event handlers EnableRaisingEvents property, 678 customizing, 42–43 encapsulation, 104, 106, 133, 180, 228 data template switching, 509 encodings, 739 jQuery, 630, 632–633 encryption, 739–747 lambda expressions, 244–245 AES, 758, 765 Page_Load, 571 asymmetric, 740 REST service calls, 633 key size, 739 server controls, 570 public-private key, 698 WCF service consumers, 452 secret key, 720 Event Log, 96, 273–275 symmetric, 740, 753 event type entries, 274 symmetric key, 744–747 Event Viewer, 273–274, 681 842

bbindex.inddindex.indd 884242 111/29/20121/29/2012 112:32:212:32:21 PPMM EventArgs object – ForAll

EventArgs object, 153 Expression Blend, 549 EventLog component, 679–680 eXtensible Application Markup Language. EventLog object, 274–275 See XAML events, 152 Extensible Markup Language (XML). custom, 155–156 See XML handling, 152–153 Extensible Stylesheet Language (XSL). handling multiple, 153 See XSL handling with lambdas, 244–245 inheritance, 211–213 F PrintPage, 223 raising, 154–155 F#, 3 receiving with AddHandler, 158–160 Factory, 791 receiving with WithEvents, 156–158 Fiddler, 628 ServiceBase, 672 fi elds, 62, 107–108, 145 shared, 165, 168–169 FIFO collections, 807 evidence, 728 fi le system access dialogs, 542 Exception class, 264 fi le watchers, 668, 676–682 XmlException, 337 FileDialogPermission, 723 exception object, 264 FileDialogPermissionAttribute, 724 exception properties, 269–273 FileIO permissions, 733 Exception property, 790 FileIOPermission, 724, 732 exceptions, 263. See also specifi c exceptions FileStream, 750 handling, 265–273, 336–337 FileSystemDriver, 684 inner, 271–272 FileSystemWatcher component, 677–679, message property, 269–270 681 parallel loop, 784–786 Fill, 390 tasks throwing, 801–802 Filter property, 678 XML reading, 336–337 Finalize method, 74, 75 ExecuteCommand, 684, 687 Finally, 265–267 ExecuteNonQuery, 374, 375, 376 FIPS Pub 186-2, 748 ExecuteReader, 382 fi xed width columns, 475 execution order, 760–762 FlipView, 528 Exit For, 289, 781 controls, 527–542 Exit For Each, 781 DataTemplateSelector, 539–542 Exit Try, 268–269 XAML, 539 explicit conversion, 137–143 fl oating-point values, 771 CType, 141–142 Flush, 329 DirectCast, 142 For Each commands, 133–134 methods, 139–140 For Each loops, 257, 288–290 Parse, 140–141 For loops, 288–290 TryCast, 142–143 parallelizing, 770 TryParse, 140–141 For Next, 288–290 explicit transactions, 403–404 ForAll, 813 843

bbindex.inddindex.indd 884343 111/29/20121/29/2012 112:32:212:32:21 PPMM Form – GetMembers

Form, 7 generated method, 241 Form Designer, 29 GenerateMD5Hashes, 793 formal interfaces, 217 hotspot detection, 765–767 FormView parallel speedup measurement, ASP.NET, 575 767–769 model binding, 581–582 Parallel.For, 770–775 validation, 586 GenerateXml, 341 fragile base-class problem, 199, 201–202 generations, 79 fragile superclass, 199 generic classes, 300–306 Frame, 545–546 inheritance, 305–306 FrameworkElement, 469, 473 type parameters, 304 Friend, 210–211 generic delegates, 242 Friend keyword, 145 generic methods, 294, 298–300 FromTypes, 322 creating, 307–308 Function, 6, 8 parameters, 299 Async use with, 248 generic objects, 125–126 functions, lambda expression, 242–243 generic routines, 193, 218 generic types, 294, 295–298 basic usage, 295–297 G classes, 300–306 GAC. See global assembly cache creating, 300–307 GacIdentityPermission, 724 inheritance, 297–298, GacIdentityPermissionAttribute, 724 305–306 gacutil.exe, 702–703 interfaces, 306–307 garbage collector (GC), 71–72 Structure, 306 Finalize method, 74, 75 generics, 242, 282, 292–299 generations, 79 creating, 300–313 IDisposable interface, 73, 75–77 late binding, 311–312 immutable classes, 128 nullable types, 294–295 managed heap, 77–79 using, 293–294 optimizations, 79–81 gestures, ListView, 533 traditional, 72–77 GetAssemblies, 711 GC. See garbage collector GetAssembly, 710 generalization, 182 GetAttribute, 330, 335–336 Generate Local Resource, 659 GetBaseException, 272 GenerateAESKeys, 777, 793 GetDateTime, 386 hotspot detection, 765–767 GetDouble, 386 parallel speedup measurement, 767–769 GetEnumerator, 256, 259 Parallel.For, 770–775 GetExecutingAssembly, 710 GenerateAESKeysCancel, 798, 800 GetGuid, 386 GenerateAESKeysWithCharPrefix, GetInt32, 386 802–804 GetMembers, 712 844

bbindex.inddindex.indd 884444 111/29/20121/29/2012 112:32:222:32:22 PPMM GetMethods – HTML

GetMethods, 712 H GetParameters, 712 HACK keyword, 53 GetProperties, 712 Handles keyword, 153, 154 GetType, 714 handling events, 152–153 GetTypes, 711–712 handling exceptions, 265–273 global assembly cache (GAC), 23, 64, 83, XML reading, 336–337 702–703, 724 handshake protocol, 753 global resources, 658 hardware threads, 760, 788 global scope, 133 hash algorithms, 720, 739–740, 741. See also globalizing, 652, 656 GenerateMD5Hashes; SHA gradients, XAML, 487–488 cryptographic, 741–742 Greenwich Mean Time, 124. See also hash digest, 748 Universal Coordinated Time Hashtable, 149–150, 194, 287 Grid, 469, 473–478 Helpers, 594 attached properties, 473–474 ActionLink HTML Helper, 613, 616 child element arrangement, BeginForm, 622 481–482 Database, 594 ListBox with, 504–505 DisplayFor, 618, 622 placing elements, 477 DisplayNameFor, 618, 622 sizing rows and columns, 475–477 EditorFor, 622 spanning columns and rows, LINQ XML objects, 343–347 477–478 Razor view engine, 594 StackPanel, 479 TextBox, 598 Grid App, 552–554 validation, 600–602 Grid.Column, 477–478 ValidationMessageFor, 622 Grid.ColumnSpan, 478 ValidationSummary Html Helper, 600 Grid.Row, 477–478 Web Pages, 594 Grid.RowSpan, 478 WebGrid, 594 GridView HelpLink property, 273 ASP.NET, 575 Hibernate, 408 controls, 527–542 HiddenField, 582 DataTemplateSelector, 539–542, historical debugging, 46 541–542 HMACSHA1, 741, 742 grouping, 536–538 HorizontalAlignment, 476 touch functionality, 534, 535 HorizontalContentAlignment, 513 Web Forms, 574 HostProtectionAttribute, 724 XAML, 534–535 Hotmail, 818 grouping hotspots, 764, 765–767, 769 GridView, 536–538 HTML, 316, 624–638 ListView, 536–538 displaying fi les, 356 Guid, 117 Helpers, 600, 613, 616 Guthrie, Scott, 586 Windows 8 Style apps, 638–644 845

bbindex.inddindex.indd 884545 111/29/20121/29/2012 112:32:222:32:22 PPMM HttpClient class – Int64

HttpClient class, 254 InfoSet, 433 HTTPS, 740 inheritance, 104, 179, 180–181, 234 HyperThreading, 788 chains of, 199 constructors, 206 I Entity model, 423 events, 211–213 icon editor, 25 generic classes, 305–306 ICryptoTransform, 745, 746 generic types, 297–298, 305–306 Id, 791 implementing, 183–202 IDbConnection, 401 multilevel, 199–201 identity permissions, 728 multiple, 198–199 IDisposable interface, 73, 75–77 multiple interfaces, 183 IEnlistmentNotification, 405–406 MyBase, 190–191 IEnumerable, 256, 259, 780–781 overloading, 186–189 IEnumerator (OF T), 256 Overridable, 189 IETF. See Internet Engineering Task Force Overrides, 189–190 If-Then statements, 114–115, 133–134 polymorphism, 229, 234 IIS. See Internet Information Services preventing, 215 IIS Express, 562–563, 628 RaiseEvent, 212 IL. See intermediate language single table for multiple objects, 422–425 IL Disassembler, 70–71, 694 single-level, 199 ILDASM, 207 virtual methods, 191–194 Ildasm.exe, 694–695 when to use, 181–183 Image, 470, 473 inherited properties, 492 ImageBrush, 487 Inherits keyword, 185–186 Immediate window, 51 initialization vectors (IVs), 746 immutable class, 128–130 inline functions, 238 imperative methods, 146 InnerException property, 271–272, 785 imperfect parallelism, 763–764 INotifyPropertyChanged, 555 implementation, 106–107, 145 InsertAfter, 341 Implements keyword, 216, 220–222, 307 InsertBefore, 341 implicit conversion, 119, 137–138 InsertCommand, 390 implicit styles, 512 InstallContext, 681 implicit transactions, 403–405 Installer, 673 implicit underscore, 9 InstallUtil.exe, 671, 680–681, 682 IncludeSubdirectories property, 678 instance variables, 107–108 Index, 615 instances, 6, 7, 105 indexing, 399 instantiation, 134–135 indexing service, 668 Int16, 112, 117, 119 Individual accounts, 818 Int32, 112, 117, 119 inequality operators, 171 Int64, 112, 117, 119

846

bbindex.inddindex.indd 884646 111/29/20121/29/2012 112:32:222:32:22 PPMM Integer – iterative statements

Integer, 110, 112–113, 116, 119, 120, 294, Internet Application template, 604 771 Internet Engineering Task Force (IETF), 753 integer types, 119–120 Internet Explorer, 356, 520–521 Integer.MaxValue, 295 culture settings, 651 Integer.MinValue, 295 Internet Information Services (IIS), 439, integration test environments, 22 562–563 IntelliSense, 35, 36, 93, 101 application services, 668 early binding, 136 Windows Services, 668 LINQ XML literal support, 348 Windows Services control of, 686 overloading, 164 Interop, 431 page markup editing, 567 interrogative methods, 146 WCF service support, 452 invariant cultures, 647 IntelliTrace, 46 IPrintable, 222–225 InteractiveProcess, 684 IProducerConsumer(Of T), 807 interfaces Is operator, 116 abstract, 217–225 is-a relationships, 181–182 COM, 65 IsCanceled, 791, 792, 798 default, 105 IsCancellationRequested, 800 defi ning, 106, 218 IsCancelledProperty, 800 formal, 217 IsCompleted, 791, 792 generic, 306–307 IsDBNull function, 130–131 IDisposable, 73, 75–77 IsFalse, 171 implementing, 219–221 IsFaulted, 791, 792, 802 IValueConverter, 495 IsNot operator, 116 multiple, 105, 180, 183, 216–225, isolated storage management, 737 230–231, 233–234 IsolatedStorageFilePermission, 724 native, 105, 216 IsolatedStorageFilePermission object, 216–217 Attribute, 724 object composition, 105 IsolatedStoragePermission, 724 polymorphism, 230–231, 233, 234 IsolatedStoragePermissionAttribute, primary, 105, 216 724 reusing common implementation, 221–222 IsTrue, 171 scope, 218 IsValid, 600 service, 438 ItemContainer, 512–513 shadowing, 198 ItemControls, 499–510, 528 using, 218–219 data models, 528–529 WCF, 437–439, 454 ItemSource, 527 Web services, 430 ItemsPanel, 510 Windows Services, 669–671 ItemTemplate, 503, 508, 528 interlocked operations, 806 ItemTemplateSelector, 541 internationalization, 646 iterative statements, 288–291

847

bbindex.inddindex.indd 884747 111/29/20121/29/2012 112:32:222:32:22 PPMM Iterator – layout pages

Iterator, 256, 260 L iterators, 238, 256–260 lambda expressions, 238, 239, 240–243 core concept, 256–259 Async using, 259–260 use with, 248 IValueConverter interface, 495 creating functions, 242–243 IVs. See initialization vectors creating subroutines, 241–242 IXPathNavigable, 357 event handling, 244–245 IXsltContextFunction, 360 LINQ with, 245–247 IXsltContextVariable, 360 multi-line syntax, 760, 793 using, 243–247 J Language Integrated Query (LINQ), 19, 20, 230, 238, 240 JavaScript, 624–638 concurrent queues and, 809 jQuery, 629–632 dynamic XML document querying, ready function, 630, 635 350–351 SOAP services, 625 Entity Framework models, 417–418 Windows 8 Style apps, 638–644 extension methods, 246 JIT. See just-in-time compiler helper XML objects, 343–347 jQuery, 629–632 introduction to .NET Framework, 342 handling events, 630, 632–633 with lambdas, 245–247 JSON, 605, 631, 636, 637 late binding, 137 json2.js, 637 PLINQ, 810–813 JSON.stringify, 637 queries, 245 just-in-time compiler (JIT), 15, 62, 301 reading XML documents, 351–352 SQL queries, 370, 408 K static XML document querying, 349–350 KernelDriver, 684 writing XML documents, 353–354 key pairs, 698–699, 749 XML, 316 KeyContainerPermission, 724 to XML, 342–354 KeyContainerPermissionAccessEntry, 724 XML document querying, 349–351 KeyContainerPermissionAccess XML literals, 347–349 EntryCollection, 724 language resource fi les, 660–661 KeyContainerPermissionAccess language selections, 651 EntryEnumerator, 724 late binding, 136–137 KeyContainerPermissionAttribute, generics, 311–312 724 polymorphism, 230, 231, 234 keyed hash algorithms, 741 layout aware pages, 555 keywords, 5–10 layout pages, 591

848

bbindex.inddindex.indd 884848 111/29/20121/29/2012 112:32:222:32:22 PPMM layout system – Managed Windows Services

layout system load balancing, 779 child element arrangement, 481–482 LoadData, 296 child element measurements, 480 LoadFile, 710 height allocation, 482 LoadFrom, 710, 713–714 height and width properties, 480 local resources, 658–663 minimum and maximum values, 481 .locale directive, 701 vertical positioning, 482–483 localization, 488, 645 XAML, 466, 472–483 resource fi les, 658–663 LayoutAwarePage, 555 Windows Store apps, 663–664 lazy initialization, 805 XLIFF fi les, 664 lazy loading, 408 Locals window, 51 LBound, 286 LocalService account, 670 LIFO collections, 807, 809 LocalSystem account, 670 LightSpeed, 408 lock constructors, 806 Like operator, 171 locking, 806 LinearGradientBrush, 470, 487 locks, 789 linked lists, 300–301 logging errors, 273–278 LINQ. See Language Integrated Query logical comparison, 171 LinqDataSource, 581 logical cores, 760, 763–764, 788 LinqRead, 343, 349 Long, 9, 110, 112, 113, 119, 120, 771 LinqReadDynamic, 350 long running tasks, 247, 804 LinqWrite, 353 lookless controls, 513–514 List, 293–294 loopResult, 783 ListBox, 499, 501–502 loops ASP.NET, 575 control variables, 288 data templates, 503–506 endless, 291 Grid with, 504–505 parallelizing, 770–786 ItemsPanel changing layout, 510 partitions, 777–778 ListBoxItem, 501–502 loss of precision, 121–123 ListView controls, 527–542 M data templates, 534 DataTemplateSelector, 539–542 MAC. See message authentication code gestures, 533 machine confi guration fi le, 706 grouping, 536–538 MACTripleDES, 741 touch functionality, 533, 535 main thread, 793 Windows 8 Style apps, 499, 528, 639–641 MainWindow, 29–30, 176, 685 XAML, 533–534 Makecert.exe, 737 Live Connect API, 822 managed heap, 77–79, 110–111 live tiles, 557 Managed Windows Services, 439

849

bbindex.inddindex.indd 884949 111/29/20121/29/2012 112:32:222:32:22 PPMM manifests –

manifests, 63–64, 694–701 metadata, 66–69, 693 assembly identity, 696–700 assembly hash, 702 culture, 700 attributes, 67–69 referenced assemblies, 700–701 CLR, 62, 66–69 strong names, 698–700 modules, 62 UAC settings, 735 Source Code Style attributes, 322–324, version numbers, 698 325 mapping type information, 62, 694 EF model, 417 WCF, 434 objects to entities, 419–426 method signatures, 228–229 resource, 660 method variables, 133 simple, 419–421 methods, 6, 7–8, 62, 145–146 Mapping Details pane, 419, 422 abstract, 214 MapRoute, 614 asynchronous, 247–248 Margin, 481 awaitable, 252 markup expression, 491 Begin, 247–248 master pages, Web Forms, 571–575 callback, 172, 388 MaxDegreeOfParallelism, 786 constructor, 160–161 MD5, 720, 739, 741, 743, 765 delegate, 174–176 MD5CryptoServiceProvider, 741 exception class, 264 MDAC, 394 generated, 241 Me, 6 generic, 294, 298–300, 307–308 Me keyword, 203–205 GetBaseException, 272 measurement units, XAML, 472 imperative, 146 MediaPermission, 724 interrogative, 146 MediaPermissionAttribute, 725 LINQ extension, 246 member variables, 107, 133 nonvirtual, 195–202 memory allocation overloading, 161–164, 186–189 integer types, 119 overriding, 194–202 object, 77–79 parameters, 147 real number types, 121 private, 147 memory management, 71–81 properties, 147–149 reference types, 110 public, 146 value types, 110 returning values, 146 message authentication code (MAC), 753 scope, 146–147 Message Digest, 743 shared, 165, 166–168, 213 message property, 269–270 signatures, 162–163 Message Transmission Optimization SourceExists, 274 Mechanism (MTOM), 435 virtual, 191–194 MessageBox.Show, 42–43 Metro, .NET framework, 59–60 Message-Digest algorithm 5. See MD5 Microsoft Access, 380

850

bbindex.inddindex.indd 885050 111/29/20121/29/2012 112:32:222:32:22 PPMM Microsoft account – namespaces

Microsoft account, 818 multidimensional arrays, 283, 284 Microsoft Certifi cate Services, 751 multilevel inheritance, 199–201 Microsoft intermediate language (MSIL), 15, multi-line lambda expression syntax, 760, 61, 62, 694 793 Async and Await, 251 Multilingual App Toolkit for Visual Studio Microsoft.VisualBasic, 7 1012, 663 Microsoft.Win32 namespace, 88 Multilingual Editor, 663 MIME, 739 multiple constraints, 311 model binding multiple inheritance, 198–199 code-behind for, 584 multiple interfaces, 105, 180, 183, 216–225, TextBox, 485–486 230–231, 233–234 Web Forms, 581–584 MustInherit keyword, 213–214 Model Browser, 412–413 MustOverride keyword, 214 models. See also Document Object Model; MVC, 561, 586. See also ASP.NET MVC Entity Framework Web API, 626 in ASP.NET MVC, 609 MVC controller, 615 common provider, 401–403 MVVM. See Model-View-ViewModel composition, 466, 485 My Extensions tab, 27 content, 485–486 My keyword, 93–99 data, 528–529 My namespace, 27 provider, 561 My.Application, 94–97 unifi ed programming, 371 MyBase keyword, 190–191, 202–203 ModelState, 584 MyClass keyword, 205 @ModelType, 610, 612 My.Computer, 97–98 Model-View-Controller, ASP.NET, My.Resources, 99 603–605 My.User, 99 Model-View-ViewModel (MVVM), 529 My.WebServices, 99 Module, 6, 10 modules, 62–63 N scope, 133 MoveToContent, 336 Name property, 187, 194 MoveToNextAttribute, 330 namespace, 6, 7 MSBuild, 59 namespace crowding, 88 mscorlib, 700 namespaces, 81–90 MSDN, 431 ADO.NET, 377–378 MS-DOS, 10 aliasing, 33, 86–87 MSDTC, 405 ASP.NET referencing, 89–90 .msi fi les, 815 assemblies, 83, 471 MSIL. See Microsoft intermediate language common, 86 MTOM. See Message Transmission concurrency, 776, 807 Optimization Mechanism creating, 90–93

851

bbindex.inddindex.indd 885151 111/29/20121/29/2012 112:32:222:32:22 PPMM namespaces (continued) – Ngen.exe

namespaces (continued) .NET Class Libraries, 23 defi ning, 81–83, 471 .NET data providers, 380–395 extending, 100–101 ADO.NET components, 379–380 importing, 86–89 asynchronous command execution, My, 27 387–389 references, 84–86, 471 command object, 381–385 Silverlight, 471 connection object, 380–381 System, 23, 83 DataAdapter objects, 389–394 System.Transactions, 403 DataReader object, 385–387 TPL, 758, 776 OLE DB, 380, 394–395 WCF services, 455 SQL Server .NET, 394 Windows 8, 471 .NET Framework, 4–5 WPF, 471 application isolation, 703–704 WSDL fi les, 455 asynchronous programming support, XAML referencing, 471 247–248 XML, 315 certifi cate generation tools, 752 XmlDataSource control, 365–366 client and full framework profi les, 59 narrowing conversion, 170 digital signature implementations, 749 National Institute of Standards and exception objects, 264 Technology (NIST), 748 languages and regions, 646 native code debugging, 22 LINQ, 342 (Ngen.exe), 62 Metro, 59–60 native interface, 105, 216 parallel tasks, 758 nav bar, 521, 526–527 printing support, 223 Navigation Application, 551 profi les and platforms, 58–61 navigation properties, 412 restricted APIs, 822 nesting panels, 479 security tools and functionality, 720 .NET, 3, 57–58 SecurityException properties, 738– application elements, 61–65 739 Base Class Library, 293, 297 shared assemblies, 702 compilation, 304 Silverlight, 60 compiled modules, 693 Windows Phone, 60 installation utility, 671 Windows Service classes, 671–674 multiple inheritance, 198–199 XML type casting, 336 ORMs, 408 XML-specifi c namespaces, 315–316 resources, 488 .NET Refl ector, 207 security tools, 737 NetTcpBinding, 441 targeting versions, 12 NetworkService account, 671 versions, 4–5 neutral culture defi nition, 647, 662–663 .NET 3.0, 4 New, 6, 7, 134–135 .NET 3.5 Client Profi le, 58 New Project Dialog, 11–12 .NET 4.5 Portable Class Library, 60–61 Ngen.exe. See Native Image Generator

852

bbindex.inddindex.indd 885252 111/29/20121/29/2012 112:32:222:32:22 PPMM nHibernate – operators

nHibernate, 408 EventLog, 274–275 NIST. See National Institute of Standards and events, 152 Technology exception, 264 NodeType, 332 generic, 125–126 nondeterministic fi nalization, 73 instantiation, 134–135 nonvirtual methods, 195–202 mapping to entities, 419–426 Not operator, 115 references, 135–136 Nothing, 6, 8, 294–295 Request, 595 NotifyFilter property, 678 scope, 209–211 NT Services, 668 ServiceHost, 441 NTFS, 720, 721 single table for multiple, 422–425 Nullable, 294–295 Trace, 275–278 nullable types, 294–295 working with, 134–143 numbers and currencies, cultural differences, ODBC data providers, 380 654–656 Offi ce projects, 13 OLE DB data providers, 380, 394–395 O OLE DB session pooling, 403 OleDbConnection, 380–381 obfuscator, 70–71 OnContinue, 672 Object Browser, 86 OnCustomCommand, 672, 687–688 Object class, 125–126 on-demand installation, 706 object interfaces, 216–217 one-way functions, 741 object memory allocation, 77–79 OnPause, 672 ObjectContext, 418–419 OnPowerEvent, 672 ObjectDataSource, 361, 581 OnSessionChange, 672 object-oriented languages, 104 OnShutdown, 672 object-oriented programming, 179–180 OnStart, 672, 678–679, 689 inheritance hierarchies, 199 OnStop, 672, 678–679 object-oriented terminology, OpenAccess, 408 105–109 OperationCanceledException, Object-Relational Mapping (ORM), 408 798, 801 objects Operator keyword, 169 composition, 105–108 operator overloading, 169–172 CultureInfo, 648–649 operators DataAdapter, 382, 389–394 binary, 170, 171 DataReader, 372–373, 381, 385–386, classes supporting, 169 389, 400 comparison, 115–116, 170 DataSet, 397–398 data type support, 169 DataTable, 398–401 equality, 171 Debug, 275–278 inequality, 171 declaration, 134–135 unary, 170, 171 defi ning, 105 Visual Basic, 171

853

bbindex.inddindex.indd 885353 111/29/20121/29/2012 112:32:222:32:22 PPMM Option Compare – Parallel.Invoke

Option Compare, 18–19 page events, Web Forms, 568–569 Option Explicit, 18–19 PageControls, 639 Option Infer, 18–21 Page_Load event handler, 571 option settings, 18–20 pages, Web Forms, 565–566 Option Strict, 18–21, 136, 138–140, 141, 230 Panel class, 473 Optional keyword, 132, 161–162 panels overloaded methods, 163 nesting, 479 optional parameters, 131–132 XAML, 472–479 constructor method overloading, 164 parallel code overloading, 163–164 loops, 770–786 Or conditional, 115–116 sequential code transformation to, Or operator, 171 764–769 Oracle, 369 speedup measurement, 767–769 OrAlso, 172 tasks for, 793–802 OrderedBy, 812–813 Parallel LINQ (PLINQ), 810–813 ORM. See Object-Relational Mapping parallel loops, 770–786 outlining, 41–42 exceptions, 784–786 Output window, 50–51, 80 exiting, 781–785 overloading, 186–189, 195 Parallel Stacks, 794–797 constructor methods, 164–165, 208–209 Parallel Tasks, 794–797 methods, 161–164 parallel tasks, launching, 758–764 operator, 169–172 ParallelEnumerable, 811–812 optional parameters, 163–164 Parallel.For, 759, 770–775 overriding overloaded methods, 194 refactoring sequential loop, 772–773 Overloads keyword, 187, 194 scalability measurement, 773–775 Overridable keyword, 189, 194, 195–196, Parallel.ForEach, 759, 775–781, 785 206 IEnumerable data sources, 780–781 Overrides keyword, 189–190, 194, 195– optimizing for number of cores, 778–779 197, 206 partitions in parallel loop, 777–778 overriding results, 783 nonvirtual methods, 195–202 ParallelForEachGenerateMD5Hashes, overloaded methods, 194 784 ParallelForEachGenerateMD5Hashes P Exception, 784 ParallelGenerateAESKeys, 774 Package.appmanifest, 558, 829 ParallelGenerateAESKeysMaxDegree, PadLeft method, 127–128 786–787 PadRight method, 127–128 ParallelGenerateMD5Hashes, 773, 774 Page, 467 ParallelGenerateMD5HashesMaxDegree, Page Control template, 641 786–787 Page directive, 572 Parallel.Invoke, 759–764, 793 @Page directive, 659 advantages and disadvantages, 762–763

854

bbindex.inddindex.indd 885454 111/29/20121/29/2012 112:32:222:32:22 PPMM parallelism – Private keyword

execution order, 759–762 perfect parallelism, 763–764 parallelism and concurrency, 763–764 permissions. See also specifi c permissions scheduling, 768 access, 722–723 parallelism, 763–764 code access, 727–728, 731–734 preparing code for, 805–807 elevated permissions dialog, 736 specifying degree, 786–788 FileIO, 733 understanding, 769 identity, 728 ParallelLoopResult, 776, 783 management tools, 737 ParallelLoopState, 781, 782–783 role-based, 728–731 ParallelOptions, 786–788 Windows Store applications, 722–723 ParallelPartitionGenerateAESKeys, PermissionSetAttribute, 725 775, 777, 778 PermitOnly, 733 ParallelPartitionGenerateMD5Hashes, Peverify.exe, 737 775, 777, 778 physical cores, 788 ParamArray, 132–133 pickers, 542–543 parameter array, 132–133 pipelining, 758 ParameterInfo, 712 PKCS. See Public Key Cryptographic System parameterized constructors, 160–161 Point, 111 parameterized properties, 149–150 polymorphism, 104, 180, 193, 228–234 parameters implementing, 229–233 constructors, 207–208 inheritance, 229, 234 generic methods, 299 late binding, 230, 231, 234 method, 147 method signatures, 228–229 optional, 131–132, 163–164 multiple interfaces, 230–231, 233, 234 overloading, 163–164 refl ection, 231–233, 234 passing, 131–134 PopUp, Windows 8, 546–547 type, 300, 304, 310 Portable Class Library, 60–61 parent class, 182 postback, 570 parent tasks, 804 precision, 121–123 Parse, 140–141 PrependChild, 341 parsers Preserve keyword, 286 DOM-style, 325, 337–342 primary interface, 105, 216 stream-based, 324–337 primitive types, 112–114 Partitioner.Create, 777 primitives, 118 partitioning data, 775 PrincipalPermission, 723, 725, 729 optimizing for number of cores, 778–779 PrincipalPermissionAttribute, 725 in parallel loop, 777–778 principals, 729–730 Path property, 678 Print, 222–225 Path setting, 498–499 PrintPage event, 223 pattern comparison, 171 PrintPreview, 222–225 Paused, 684 private key, 740 PausePending, 684 Private keyword, 145, 147

855

bbindex.inddindex.indd 885555 111/29/20121/29/2012 112:32:222:32:22 PPMM private methods – public key infrastructure

private methods, 147, 209–211 DataSource, 577 privatePath, 709 debug, 21–23 procedural languages, base functionality, default, 151–152 57–58 dependency, 490 ProgressBar, 543–544 EnableRaisingEvents, 678 ProgressRing, 543–544 exception, 269–273, 790 project exception class, 264 Reporting, 13 Filter, 678 Visual Basic Unit Test, 13 HelpLink, 273 project properties, 15–16 IncludeSubdirectories, 678 assembly attributes, 16–17 inherited, 492 compiler settings, 18–21 InnerException, 271–272 debugging, 21–23 message, 269–270 other tabs, 27–28 methods, 147–149 references, 23–24 Name, 187, 194 resources, 24–25 navigation, 412 settings, 26–27 NotifyFilter, 678 project templates, 11–14 parameterized, 149–150 Projection property values, 549 read-only, 150–151 projects RelativeSource, 493–494 Business Data Catalog, 13 Resources, 488–489 Class Library, 11 SecurityException, 738–739 Cloud Services, 13 SecurityMode, 441–442 creating from templates, 11–14 shared, 168 MVC, 604 Source, 270–271, 493–494 New Project Dialog, 11–12 StackTrace, 270–271 Offi ce, 13 Transform, 549 SharePoint, 13 write-only, 151 Test, 13 proportional width columns, 475 WCF, 13 Protected Friend, 210 Web, 13 Protected Friend keyword, 145 Web Part, 13 Protected keyword, 145 Windows 8 Style apps, 638 Protected methods, 209–211 Windows Console, 76 prototypes, 228 Windows Store, 13 provider model, 561 properties, 62, 147–149. See also project ProviderFactory, 401 properties Pseudo Language fi les, 663 attached, 473–474 public key, 740 AutoLog, 673, 679 Public Key Cryptographic System (PKCS), change notifi cation, 494 747–752 common vs. advanced categories, public key cryptography, 720, 740 548–549 public key infrastructure, 721

856

bbindex.inddindex.indd 885656 111/29/20121/29/2012 112:32:222:32:22 PPMM Public keyword – Remoting

Public keyword, 145 RDBMS. See Relational Database public methods, 146, 209–211 Management System .publickeytoken directive, 700 RDO. See Remote Data Objects public-private key encryption, 698 ReadContentAs, 330 Publish tab, 27 ReadElementContentAs, 330, 336 PublisherIdentityPermission, 725 ReadElementString, 336 PublisherIdentityPermission ReadEndElement, 335 Attribute, 725 ReadOnly permissions, 733 punctuation, 9 read-only properties, 150–151 pure virtual function, 214 ReadStartElement, 334–336 Push, 809–810 ready function, 630, 635 real-time operating system (RTOS), 764 Q RecognizerDriver, 684 ReDim statement, 285–286 QFE. See Quick Fix Engineering Reenskaug, Trygve, 603 Quantity to Brush converter, 495–496 Reference Manager, 84 query.Count, 349 reference types, 109–112, 125–131, 291 queue, 282 references, 23–24 concurrent, 807–809 circular, 72 Queue, 287 namespaces, 84–86, 471 Quick Fix Engineering (QFE), 64, 704 object, 135–136 reviewing service, 447–449 R service, 445–449, 456–457 race conditions, 806–807 shallow copy operation, 131 RACE Integrity Primitives Evaluation. See System.ServiceModel, 441 RIPEMD-160 refl ection, 229, 231–233, 234, 694, 709–713 RadialGradientBrush, 487 Refl ection API, 69–70 RadioButton, 470 Reflection.Assembly, 232 RaiseEvent keyword, 155, 156, 157, 212 ReflectionPermission, 725 raising events, 154–155 ReflectionPermissionAttribute, 725 custom, 155–156 Refresh, 684 Razor view engine, 561, 586–602 regions, 646–652 database access, 591–593 RegistryPermission, 725 forms, 596–599 RegistryPermissionAttribute, 725 Helpers, 594 RegularExpressions, 82 layout pages, 591 Relational Database Management System passing information between pages, (RDBMS), 380 595–596 relative values, 787 user input, 599–600 RelativeSource property, 493–494, 506 validation, 600–602 Remote Data Objects (RDO), 407 writing markup, 588–590 Remote Debugging, 22 RC2CryptoServiceProvider, 744 Remoting, 431

857

bbindex.inddindex.indd 885757 111/29/20121/29/2012 112:32:222:32:22 PPMM RemoveChild – Secure Hash Algorithm. See SHA

RemoveChild, 341 ASP.NET MVC, 614 RemoveHandler, 156 Web API, 626 RenderPage, 222–225 RowDefinitions, 474 RenderTransform, 549 RSA, 743, 751 Reporting project, 13 RSA algorithms, 748 Request for Comments 1766, 646 RSACryptoServiceProvider, 748 Request object, 595 RSS aggregators, 363 requestedExecutionLevel, 735 RSS feeds, 350, 365 requestedPrivileges node, 735 RTOS. See real-time operating system resource managers, 405–406 Run as Administrator, 736 resource selector, 547–548 Running, 684 ResourceDictionary, 488–489 runtime environments, 5 ResourcePermissionBase, 725 runtime settings, 707–709 ResourcePermissionBaseEntry, 725 resources, 24–25 S adding language fi les, 660–661 global, 658 salt, 742 local, 658–663 SByte, 117 .NET, 488 scaffolding project properties, 24–25 ASP.NET MVC, 614–623 scope, 489 controllers, 615 XAML, 488–489 views, 616 Resources property, 488–489 schemas REST calls, 255 serialization, 320 REST services WCF services, 459–461 handling events, 633 XML, 316, 324 testing, 628 scope Web API, 625–628 class, 133 restricted APIs, 822 fi elds, 145 Return, 6, 8 global, 133 reusable code, 119 interfaces, 218 reviewing code, 43–44 method, 146–147 RIA Services, 551 module, 133 RichEditBlock, 545 object, 209–211 RichTextBlock, 545 options, 209–210 RijndaelManaged, 744 styles, 511 RIPEMD-160, 741, 743–744 variable, 133–134, 209–211 RIPEMD160Managed, 741 ScrollViewer, 470, 485 Rivest, Ronald, 743 search path, 708–709 role-based permissions, 728–731 secret key encryption, 720 routing Secure Hash Algorithm. See SHA

858

bbindex.inddindex.indd 885858 111/29/20121/29/2012 112:32:232:32:23 PPMM Secure Sockets Layer – SharePoint projects

Secure Sockets Layer (SSL), 720, 751, 752– service references, 445–447, 456–457 754 confi guration fi le changes, 449–450 security reviewing, 447–449 application UAC settings, 735–739 ServiceBase, 671, 672–673, 684 concepts and defi nitions, 720–721 ServiceController, 674 .NET Framework, 720 class, 683–685 .NET tools, 737 custom commands, 686–688 types of, 721 integrating, 685–686 Windows Store projects, 722–723 ServiceHost object, 441–443 Security Event Log, 96, 273 serviceHost.Open, 443 Security Identifi er (SID), 728–729 ServiceInstaller, 673 Security tab, 27 ServiceName, 684 SecurityAttribute, 725 service-oriented architecture (SOA), 432–436 SecurityException, 738–739 ServiceProcessInstaller, 673, 681 SecurityMode property, 441–442 ServiceType, 684 SecurityPermission, 725 settings SecurityPermissionAttribute, 725 Authorized Users, 732 Select Case statement, 117 in project properties, 26–27 SelectCommand, 389–390 setValue, 353 selectors, 630 SGML. See Standard Generalized Markup self-describing components, 704 Language senders, 48 SHA, 720, 739, 742–743 sequential code, transformation to parallel, SHA1CryptoServiceProvider, 741 764–769 SHA256Managed, 741 serialization SHA384Managed, 741 DataSet, 399–400 SHA512Managed, 741 DataTable, 399–400 shadowing, 187, 195–202 XML, 316, 318–322 arbitrary elements, 198 server controls fragile base-class problem, 201–202 control events, 569–571 multilevel inheritance, 199–201 Web Forms, 567–568 multiple inheritance, 198–199 Server Explorer, 53–54, 675, 683 Shadows keyword, 195–197 ServerControls.aspx, 565–569 shallow copy operations, 131 server-side culture declarations, 649–650 shared assemblies, 697, 701–703, 707 server-side development, 563 shared events, 165, 168–169 server-side SSL, 753 Shared keyword, 165, 168 Service Contracts, 434, 453–455 shared methods, 165, 166–168, 213 Service Control Manager, 669–671, 672, shared properties, 168 675, 681, 683, 687 Shared property, 20 service interface defi nition, 438 shared variables, 165–166 Service Library, 456–457 SharePoint projects, 13

859

bbindex.inddindex.indd 885959 111/29/20121/29/2012 112:32:232:32:23 PPMM Short – SqlCommand

Short, 113, 119, 120 SolidColorBrush, 486–487 ShowXmlNode, 331–332 Solution Explorer, 14–15, 28, 414 SID. See Security Identifi er adding service references, 445–447, side-by-side execution, 704 456–457 side-by-side versioning, 64 MVC projects, 604 side-loading, 817, 828–830 Web Forms, 565–566 signaling, 806 Windows 8 Style apps, 639, 641 signatures, 162–163 WSDL fi les, 459 SignCode.exe, 721 SortedList, 287 signing applications, 736–737, 829 sorting, cultural differences, 656–658 signing assemblies, 698–700 Source Code Style attributes, 322–326 Signing tab, 27 source listing, 9 Silverlight, 13, 60, 465, 466 Source property, 270–271, 493–494 application templates, 551 SourceExists method, 274 binding expressions, 492 Spaanjaars, Imar, 586 ItemContainer style, 513 spaghetti code, 199 ListBox, 499, 504 SPC. See Software Publisher Certifi cate measurement units, 472 specifi c culture defi nition, 647, 662 namespaces, 471 Split App, 552 simple data binding, 575–580 Split method, 128 Simple Object Access Protocol. See SOAP SQL, 370 Single, 113, 117, 121–122 bigint value, 120 single-level inheritance, 199 inserting data, 373–374 SingleLinkedList, 300–303 Integer value, 120 SiteMapDataSource, 581 smallint value, 120 Slider, 470 stored procedures, 372 smallint, 120 SQL command string Smalltalk, 199 deleting data, 375–376 snapped application windows, 479 inserting data, 374 snapped views, 522–523 updating data, 375 sn.exe, 698 SQL Server, 22, 53, 315, 369, 370, 373 Sn.exe, 737 asynchronous calls, 387–388 SOA. See service-oriented architecture .NET data providers, 380, 394 SOAP, 316, 324, 430, 444 query compilation, 382 WCF, 433–434 Service Manager, 683 SOAP Contract Language, 324 stored procedures, 382 SOAP Discovery, 324 Windows Services, 668 SOAP services, 625 SQL Server Enterprise Manager, 383 SOAP Toolkit, 431 SQL Server Express, 591 software publisher, 727 SQL Server Management Studio, 383 Software Publisher Certifi cate (SPC), 737 SqlCommand, 373, 386, 391–392 software threads, 788 asynchronous call options, 387

860

bbindex.inddindex.indd 886060 111/29/20121/29/2012 112:32:232:32:23 PPMM SqlConnection – SubString method

SqlConnection, 373, 380, 381, 401 writing XML, 326–329 calling stored procedure, 384 stream-style parsers, 324–337 SqlDataAdapter, 390 StreamWriter, 276–277 SqlDataReader, 384, 386, 389 String, 112, 113, 337 SqlDataSource, 361, 581 String(), 126–127 SqlParameter, 392 String class, 125, 126–130 square tiles, 557 string comparison, 19 SSL. See Secure Sockets Layer string constants, 130 stack, 110–111, 282 StringBuilder, 23, 81, 88, 111, 292 concurrent, 807–809 editable strings, 129–130 Stack, 287 strings StackPanel, 468, 469, 473, 479, 483, 510 connection, 380–381 StackTrace property, 270–271 converting, 170 Standard Generalized Markup Language editing, 129–130 (SGML), 316 immutable class, 128–130 StandardStyles.xaml, 555–556 manipulating, 128 Start, 684 passing to services, 688–689 StartPending, 684 String.Split method, 128 startup settings, 707 strong names, 698–700, 701, 726, 728, 737 Static keyword, 10 StrongNameIdentityPermission, 726 static values, 787 StrongNameIdentityPermission static variables, 165 Attribute, 726 static XML documents, 349–350 StrongNamePublicKeyBlob, 726 Status, 684, 791 Structure, 306 Step-In, 48–49 structure constraints, 310 Step-Out, 48–49 styles Step-Over, 48–49 BasedOn, 512 Stop, 684, 782 defi ning, 510–511 Stopped, 684 implicit, 512 StopPending, 684 ItemContainer, 512–513 Storeadm.exe, 737 scope, 511 stored procedures, 372 XAML, 466, 510–513 calling, 384–385 Sub, 6, 8 Command object, 382–385 Async use with, 248 creating, 383–384 subclass, 184–186 in DataAdapter objects, 391–392 subclassing, 104, 182 StorePermission, 725 subroutines StorePermissionAttribute, 725 lamda expressions, 241–242 Stream, 320, 337, 357 reading XML streams, 331 streams SubSonic, 408 reading XML, 329–337 SubString method, 127

861

bbindex.inddindex.indd 886161 111/29/20121/29/2012 112:32:232:32:23 PPMM superclass – System.Xml

superclass, 182 System.Environment.ProcessorCount, SymEnc, 747 778 SymKey, 747 System.Exception, 264–265 symmetric encryption, 740, 753 System.IO, 731 symmetric key encryption, 744–747 System.Linq.ParallelEnumerable, SymmetricAlgorithm, 744–747 811–812 synchronization primitives, 806 System.Net.Http, 254 synchronization problems, 806–807 System.Object, 8, 108–109, 193, 203 syntax, 5–10 System.Reflection, 231–232 syntax checking, 136 System.Security.Cryptography, 751 system activity loggers, 668 System.Security.Cryptography. System Event Log, 96, 273 AesManaged, 765 System namespace, 83 System.Security.Cryptography.MD5, references, 23 765 System.AggregateException, 784 System.Security.Cryptography.Xml, 751 System.Array, 282 System.Security.Permissions, 720, System.Collections, 286–287 723–731, 729 System.Collections library, 83, 87–88, System.Security.Principal, 729 657 System.ServiceModel, 441 System.Collections.Concurrent, 776, System.ServiceProcess, 683 807 System.ServiceProcess.ServiceBase, System.Collections.Concurrent. 671 Partitioner, 775 System.ServiceProcess. System.Collections.Generic, 657 ServiceInstaller, 671 System.ComponentModel.BindingList, System.ServiceProcess. 297 ServiceProcessInstaller, 671 System.Configuration.Install. System.Text, 23, 82 Installer, 671 System.Threading.CancellationToken, System.Convert, 140 798 System.Data, 377 System.Threading.Tasks, 758 System.Data.Common, 377 System.Threading.Tasks.Parallel, System.Data.EntityClient, 377 758–759 System.Data.Linq, 377 System.Threading.Tasks.Task, 790–791 System.Data.Odbc, 377 System.Transactions, 403 System.Data.OleDb, 377 System.Windows.MessageBox, 42 System.Data.Services, 377 System.Xml, 316, 325 System.Data.SqlClient, 377 document support, 324–342 System.Data.SqlTypes, 377 DOM-based documents, 325 System.Diagnostics, 274 DOM-specifi c classes, 338 System.DirectoryServices, 83 stream-based documents, 324 System.Drawing, 111 XmlReader, 326

862

bbindex.inddindex.indd 886262 111/29/20121/29/2012 112:32:232:32:23 PPMM System.Xml.Linq – TextBox

XmlWriter, 326–329 TaskCreationOptions.PreferFairness, System.Xml.Linq, 316, 342, 343 804 SystemXml.Query.XsltCommand, 354 TaskFactory, 791 System.Xml.Schema, 316 TaskFactory.StartNew, 803 System.Xml.Serialization, 316, tasks 318–319, 323 canceling, 798–801 System.Xml.XmlException, 337 chaining with continuations, 805 System.Xml.XPath, 316 creating and managing, 788–813 System.Xml.Xsl, 316, 326 exception handling, 801–802 classes and interfaces, 360–361 initial states, 791 System.Xml.Xsl. life cycle, 791–792 XslCompiledTransform, 356–357 long running, 804 System.ServiceProcess. parallelizing code with, 793–802 ServiceController, 674 parent, 804 returning values, 802–805 T starting, 793–794 threads and, 788–790 TabNavigation, 539 waiting for fi nish, 797–798 Tabular Data Stream (TDS), 394 TaskScheduler, 788 Target CPU, 18 TaskStatus, 791 Task, 790 TaskStatus.Canceled, 792, 798 Task List, 52–53 TaskStatus.Created, 791 Task Parallel Library (TPL), 758 TaskStatus.Faulted, 792 concurrent collections, 807 TaskStatus.RanToCompletion, 792 data structures, 805 TaskStatus.WaitingForActivation, debugging, 764 791 execution order, 762 TaskStatus. load-balancing, 779 WaitingForChildrenToComplete, synchronization, 805–807 792 System.Collections.Concurrent TaskStatus.WaitingToRun, 791 namespace, 776 Task.WaitAll, 797–798 task parallelism, 758 TDS. See Tabular Data Stream task schedulers, 790, 795, 804 Team Foundation Server, 53 TaskCanceledException, 800 tear-away tabs, 29 TaskCreationOptions, 790, 804–805 Templates, 639 TaskCreationOptions. Terminal Session services, 672 AttachedToParent, 804 Test projects, 13 TaskCreationOptions.LongRunning, text editor, customizing, 30–31 804 TextBlock, 470, 497 TaskCreationOptions.None, 804 TextBox, 188 TextBox, 185, 470, 473, 492–493, 495–496

863

bbindex.inddindex.indd 886363 111/29/20121/29/2012 112:32:232:32:23 PPMM TextBox Helper – types

ASP.NET, 575 Trace listeners, 275–278 model binding, 485–486 Trace object, 275–278 TextBox Helper, 598 transactions, 403–406 TextReader, 320 creating, 403–405 TextWriter, 276, 320, 337, 357 explicit, 403–404 TextWriterTraceListener, 276–277 implicit, 403–405 then, 640 resource managers, 405–406 thousands separators, 654–655 TransactionScope, 404–405 thread pool engine, 790 Transform properties, 549 threads TransformFile, 365 cultures, 647–649 translucent elements, 487 main, 793 Transport Layer Security (TLS), 753 tasks and, 788–790 TripleDESCryptoServiceProvider, 744 TPL, 788 Try, 265–267 thread-safe collections, 807 TryCast, 142–143 Thread.Sleep, 291 Try-Catch statements, 140 Throw, 265, 267–268 TryDequeue, 809 ThrowIfCancellationRequested, 798, TryParse, 139, 140–141 800 TryPop, 809–810 Tick event, 244 TryUpdateModel, 584 TileBrush, 487 T-SQL, 22 TileTemplateImage, 557 Type class, 710, 711–713 TimeOutException, 784 type constraints, 308–310 Timespan, 129 type conversion, 19, 171 TimeSpan, 118 explicit, 137–143 TLS. See Transport Layer Security implicit, 119, 137–138 Today, 124 methods, 139–140 TODO keyword, 53, 77 type inference, 19 ToggleSwitch, 544 type metadata, 62, 694 tokens, task canceling, 798–801 type methods, 66 ToolTips, 35 TypeDescriptorPermission, 726 debug, 47 TypeDescriptorPermissionAttribute, localization, 660 726 ToString, 205 TypeLoadException, 706 ToString method, 125, 203 types, 61–62 touch conventions, 520 Byte, 123–124 touch functionality casting, 336 GridView, 534, 535 Char, 123–124 ListView, 533, 535 DateTime, 124–125 touch input, 822 decimal, 121–123 TPL. See Task Parallel Library fi nding in assembly, 711–712

864

bbindex.inddindex.indd 886464 111/29/20121/29/2012 112:32:232:32:23 PPMM UAC – version policies

fi nding members, 712–713 updating pipeline, 828 generic, 294, 295–298, 300–307 UrlIdentityPermission, 726 integer, 119–120 UrlIdentityPermissionAttribute, lazy initialization, 805 726 nullable, 294–295 User Access Control (UAC), 721, 730, 734 Object class as basis, 125 application settings, 735–739 parameters, 300, 304, 310 User account, 670 primitive, 112–114 UserControl, 467–468, 474 reference, 109–112, 125–131, 291 Using, 327 System.Object, 193 UtcNow, 124 value, 109–112, 117–125 working with, 109–114 V XML, 336 validation client-side web development, 638 U helpers, 600–602 Web Forms, 585–586 UAC. See User Access Control ValidationMessageFor helper, 622 UBound, 285–286 ValidationSummary Html Helper, 600 UI conventions, Windows 8, 520–521 value converter, 494–497, 555 uiAccess setting, 736 value types, 109–112, 117–125 uiCulture attribute, 649, 659 values and behaviors, translating, 652–658 UIElement, 469, 484 ValueType, 300–301 UInt16, 119, 120 variable scope, 133–134, 209–211 UInt32, 119, 120 variables UInt64, 119, 121 declaration, 19 UIPermission, 726 global, 133 UIPermissionAttribute, 726 initializing, 208–209 UI/UX guidelines instance, 107–108 early Windows versions, 821 loop control, 288 Windows 8, 522–524, 821 member, 107, 133 UML. See Unifi ed Modeling Language method, 133 unary operators, 170, 171 shared, 165–166 UNDONE keyword, 53 static, 165 Unicode, 123 System.Object, 193 Unifi ed Modeling Language (UML), 181 types, 19 unifi ed programming model, 371 vbCRLF, 118 Universal Coordinated Time, 124 .ver directive, 700–701 unmanaged code, 22 VeriSign, 751 unmanaged heap, 78 version numbers, 64–65, 698 UpdateCommand, 390 version policies, 704–706

865

bbindex.inddindex.indd 886565 111/29/20121/29/2012 112:32:232:32:23 PPMM versioning – Web API

versioning, 64, 703–709 features, 52–56 application isolation, 703–704 Mapping Details pane, 419, 422 confi guration fi les, 706–709 Model Browser, 412–413 runtime settings, 707–709 Multilingual App Toolkit, 663 self-describing components, 704 property categories, 548–549 side-by-side execution, 704 running as Administrator, 736 startup settings, 707 settings fi le, 52 version policies, 704–706 side-loading, 828–830 VerticalAlignment, 482–483 Start Screen, 11 VerticalAlignment, 476 Store menu, 824–825 VideoBrush, 487 Transform properties, 549 View Designer, 28 Ultimate, 46–47 ViewData, 610 versions, 5, 46–47 views visual designer changes, 547–551 ASP.NET MVC, 609–613 WCF Service support, 446, 450 scaffolding, 616 Windows Store, 823–828 strongly typed, 610–612, 615, 618 XML literal support, 348 ViewState, 571, 739 Visual Studio host, 23 virtual class, 215 Visual Studio .NET, 4–5 virtual methods, 191–194 stored procedure creation, 383 VirtualizingStackPanel, 510 Visual Studio Team Suite, 13 Visual Basic, 3–4 Visual Studio Toolbox, 31–33 compiler versions, 4 Visual Studio Tools for Offi ce component-based concepts, 105 (VSTO), 13 creating Windows Service in, 675–676 visualizers, 48 keywords and syntax, 5–10 VisualStateManager, 515 multiple inheritance, 198–199 object-oriented concepts, 104 W operators, 171 parallel code, 764–769 W3C Extensible Markup Language (XML) transaction support, 403–406 1.0 specifi cation, 326 Visual Basic Unit Test project, 13 WAS. See Windows Activation Service; Visual Studio 2012, 3, 4–5 Windows Process Activation Service animation support, 549–551 Watch windows, 51 app deployment to Windows Store, WCF. See Windows Communication 827–828 Foundation app package creation, 825–826 WCF projects, 13 application templates, 551–556 WCF services, 431–432 ASP.NET support, 562–563 Web API, 561, 625–628 checking app requirements, 826–827 controllers, 626–627 Class Designer, 181 MVC architecture, 626 customizations, 30–31 REST services, 625–628

866

bbindex.inddindex.indd 886666 111/29/20121/29/2012 112:32:232:32:23 PPMM web development – Windows 2000 Component Services

web development, client-side, 624–638 Win32OwnProcess, 684 Web Forms, 93, 563–586 Win32ShareProcess, 684 control events, 569–571 winControl, 640 creating project, 563–564 win-data-bind attribute, 639 data source controls, 580–581 Window, 467 event-driven model, 569 Windows 7, 730, 734, 736 master and content pages, 571–575 Windows 8, 13, 59, 465, 466 model binding, 581–584 app certifi cation requirements, 821–823 page events, 568–569 app interaction with OS, 522 pages, 565–566 application deployment options, server controls, 567–568 815–817 simple data binding, 575–580 application templates for, 551–556 validation, 585–586 binding expressions, 492 ViewState, 571 DataTemplateSelector, 539–542 Web Pages, 561, 586–602 elements with new usage, 545–547 database access, 591–593 FlipView, 528 forms, 596–599 Frame, 545–546 Helpers, 594 gestures, 533 layout pages, 591 GridView, 528 passing information between pages, HTML and JavaScript apps, 638–644 595–596 ItemContainer style, 513 Razor view engine markup, 588–590 ListBox, 504 user input, 599–600 ListView, 499, 528, 639–641 validation, 600–602 live tiles, 557 Web Part projects, 13 namespaces, 471 Web projects, 13 new visual elements, 524–547 Web services, 430–432, 625 pickers, 542 cryptography, 720 PopUp, 546–547 jQuery calls, 630 root visual element, 520 Web Services Description Language (WSDL), sizing and layout guidelines, 523–524 430 snapped application windows, 479 WebBrowserPermission, 726 start menu, 557 WebBrowserPermissionAttribute, typeface and font guidelines, 523 726 UI conventions, 520–521 WebClient class, 252 UI/UX guidelines, 522–524 WebGrid helper, 594 Windows Services, 669 WebMatrix, 586 XAML differences, 518–520 WebView, 545 Windows 8 ARM Edition, 830 Where method, 246 Windows 8 Enterprise Edition, 830 While, 290–291 Windows 8 Style apps, 642–644 wide tiles, 557 Windows Store requirements, 821–823 widening conversion, 170 Windows 2000 Component Services, 394

867

bbindex.inddindex.indd 886767 111/29/20121/29/2012 112:32:232:32:23 PPMM Windows Activation Service – Windows Services

Windows Activation Service (WAS), 439 Windows Live ID, 818 Windows API, 65 Windows .NET applications, 12 Windows App Certifi cation Kit, 826–827, Windows NT, 668 829 Windows Phone, 60 Windows Communication Foundation Windows Presentation Foundation (WPF), 4, (WCF), 4, 13, 59, 429–430 12, 238, 439, 465, 466 adding service references, 445–447, application templates, 551 456–457 binding expressions, 492 ASP.NET Web Service messages, 434 design surface, 31–32 bindings for, 441 ItemContainer style, 513 building consumers, 445–453, 456–458 ListBox, 499 building services, 436–444, 456 measurement units, 472 capabilities, 433–434 namespaces, 471 confi guration fi les, 449–450 ServiceController integration, 685 consumption code, 451–453 Windows Process Activation Service (WAS), contracts, 434 668 creating interface, 437–438 Windows RT, 13, 465, 735 data contracts, 453–455 application deployment, 701, 816–817 hosting services in console application, assembly types, 701 439–443, 456 event logs, 274 interface defi nitions, 454 refl ection, 694 metadata, 434 side-loading apps, 817 new project templates, 436–437 Windows SDK, 694 utilizing interface, 438–439 Windows Services, 667, 668 Windows Services, 668 accounts, 670–671 WS-* protocols, 434–436 characteristics, 669 Windows Component Services, 403 communicating with, 683–686 Windows Console projects, 76 creating, 671–675 Windows Event Logs, 273–274 creating in Visual Basic, 675–676 Windows Explorer, 702 creating solution, 677 Windows File Explorer, 669 custom commands, 686–688 , 14, 32, 39, 184, 226, 227, debugging, 689–691 439, 563 IIS control, 686 Canvas, 478 indexing, 668 events, 569 installing, 680–681 layouts, 472 interfacing with, 669–671 list boxes, 504 multiple services per executable, 674 My keyword, 93 .NET components, 677–680 reusing, 52 .NET Framework classes, 671–674 Windows Library for JavaScript (WinJS), 638 other types, 674–675 Windows Live, 818 passing strings, 688–689

868

bbindex.inddindex.indd 886868 111/29/20121/29/2012 112:32:232:32:23 PPMM Windows Store – XAML

starting, 681 WPF Application, 14 uninstalling, 682 project template, 14 Windows 8, 669 WriteAttributeString, 328 Windows Store WriteBinHex, 329 account registration, 818–819 WriteCData, 329 account types, 818 WriteComment, 327 app deployment, 827–828 WriteElementString, 328 app package creation for, 825–826 WriteEndElement, 328 app requirements, 821–823, 826–827 WriteLine, 276 confi guring account type, 819 write-only properties, 151 demographic information, 820 WriteRaw, 329 developer agreement, 820 WriteStartElement, 328 developer license, 817 WriteString, 329 getting account, 817–821 WriteWhiteSpace, 329 publisher name, 820 WS-* protocols, 434–436 registration codes and fees, 820–821 WS-AtomicTransaction, 435 screenshot capture for, 825 WS-Coordination, 435–436 Visual Studio 2012, 823–828 WSDL. See Web Services Description WinRT app deployment, 816–817 Language working with, 817 WSDL fi les Windows Store applications, 12, 638 data contracts, 453 access permissions, 722–723 namespaces, 455 deployment, 701 reviewing, 443–444, 459–461 localization, 663–664 WCF service hosting, 441–442 security, 722–723 WS-ReliableMessaging, 435 UAC settings, 735–739 WS-SecureConversation, 435 Windows Store Dev Center, 824 WS-Security, 435–436 Windows Store projects, 13 Windows Vista, 730, 734 X Windows Workfl ow Foundation, 4, 467 Windows Workfl ow Foundation (WF), 13 X.509, 725, 737, 751–752 WindowsPrincipal, 730 XAML, 31–33, 465 WinJS. See Windows Library for JavaScript additional namespace referencing, 471 WinJS controls, 639 AppBar, 524–527 WinJS.Binding.List, 640 attached properties, 473–474 With keyword, 186 attribute syntax vs. element syntax, WithEvents keyword, 154, 156–158 470–471 work scheduling, 789–790 binding failures, 497 work stealing, 795 brushes, 486–488 work-stealing queues, 789 Canvas, 478–479 WPF. See Windows Presentation Foundation child element arrangement, 481–482

869

bbindex.inddindex.indd 886969 111/29/20121/29/2012 112:32:232:32:23 PPMM XAML (continued) – XML

XAML (continued) translucent elements, 487 child element measurements, 480 vertical positioning, 482–483 code-behind, 468–469 Windows 8 differences, 518–520 collapsing unneeded elements, 496–497 XAML Window, 15 colors, 486–487 XAttribute, 343, 346–347 common elements, 469–470 XComment, 343 complex binding paths, 498 xcopy, 815 composition model, 466, 485 XDocument, 343, 349, 351 content controls, 484 XDR. See XML Data Reduced content model, 485–486 XElement, 343–344, 353 control templates, 466, 513–515 xhr, 640 controls and content, 484–488 XLIFF localization interchange fi les, 664 data binding, 489–499 XML, 315 data templates, 466 ADO.NET data sets, 370 DataContext, 492 ASP.NET, 361–367 element naming, 468–469 attributes, 322–326, 346–347 element sizing and layout, 479–483 deserialization, 320–322 FlipView, 539 DOM traversing, 338–340 gradients, 487–488 DOM-style parsers, 325, 337–342 Grid, 469, 473–478 dynamic documents, 350–351 height allocation, 482 encoding, 739 height and width properties, 480 IntelliSense support, 348 layout system, 466, 472–483 introduction, 316–318 ListBox, 501–502 LINQ helper objects, 343–347 ListView, GridView, and FlipView LINQ literals, 347–349 controls, 527–542 LINQ querying documents, 349–351 margins, 481 LINQ reading, 351–352 markup expression, 491 LINQ to, 342–354 markup language, 466–471 LINQ writing, 353–354 measurement units, 472 namespaces, 324 minimum and maximum values, 481 reading stream, 329–337 nav bar, 526–527 schemas, 324 panels, 472–479 serialization, 318–322 pickers, 542–543 Source Code Style attributes, 322–326 platforms, 466 static documents, 349–350 property change notifi cation, 494 stream-style parsers, 324–337 RelativeSource property, 493–494 traversing with XmlReader, 334–336 resources, 488–489 types, 336 Source property, 493–494 UAC settings, 735 styles, 466, 510–513 Web service interfaces, 430 terminology, 469 writing stream, 326–329

870

bbindex.inddindex.indd 887070 111/29/20121/29/2012 112:32:232:32:23 PPMM XML comments – ZoneIdentityPermissionAttribute

writing with DOM, 340–342 XPathNavigator, 357 XSLT transform between standards, XQuery, 324 357–360 XSD, 369, 395, 453, 459 XML comments, 34 XSL, 316 XML Data Reduced (XDR), 316 XSL Transformations. See XSLT XML literals, 347–349 XslCompiledTransform, 356–357 XML Path language. See XPath XSLT, 316, 324, 354–361 Xml server control, 366–367 attributes, 359 XML Transformation (XSLT). See XSLT elements, 354, 358, 359 XmlAttribute, 338 for-each, 359 XmlDataSource, 581 loading, 357 namespace problem, 365–366 methods, 356–357 server control, 361–365 transforming XML standards, XmlDocument, 337, 338, 340–341 357–360 XmlElement, 338 XmlDataSource namespace problem, XmlException, 337 365–366 XmlNameTable, 326 XsltArgumentList, 357, 360 XmlNode, 338–340 XsltCommand, 354 XmlNodeList, 339 XsltCompileException, 361 XmlNodeType.WhiteSpace, 332 XsltContext, 360 xmlns, 471 XsltException, 361 XmlReader, 255, 320, 326, 329–337, 357 XslTransform, 326, 360 traversing XML, 334–336 XmlReaderSettings, 330, 333–334 Y XmlResolver, 326, 356–357 XmlSerializer, 318–320, 322 Yield, 256, 257 XmlSerializerNamespaces, 320 XmlTextReader, 329 Z XmlWriter, 320, 326–329, 337, 357 XmlWriterSettings, 327, 329 zero-impact deployment, 704 XNamespace, 343, 344–346 ZoneIdentityPermission, 726 Xor operator, 171 ZoneIdentityPermissionAttribute, XPath, 316, 363, 365 726

871

bbindex.inddindex.indd 887171 111/29/20121/29/2012 112:32:232:32:23 PPMM