![]() CATEGORIES: BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism |
API for .NET FrameworkAPI for .NET Framework, 583 APIs, WinRT, calling, 650 AppDomain type, instance methods, 595 AppDomainManager class, 576 AppDomainMonitorDelta class, 573 AppDomains, 17 aborting threads, 578 accessing objects across boundaries, 559 application output, 562 ASP.NET applications and, 575 assemblies in, 557 assemblies in, discovering, 602 assemblies using multiple, 558 callback methods, 573 confirming thread transitions between, 565 CreateDomain method overloads, 563 creating, 563 default, 556 definition of, 556 demonstrations of, 563 executable applications and, 574 features of, 556 first-chance exception notifications, 573 foreground/background threads and, 688 friendly names, 563 garbage collection, 571 garbage collection handle tables, 545 graceful aborts, 577 instance fields and, 566, 567 isolation provided by, 557, 558, 564, 566 loading assemblies for specific, 585 loading assemblies into, 564 loading assemblies into multiple times, 586 managed code and, 576 marshaling objects by value, 568 marshaling objects by references, 564 memory usage, monitoring, 524 method calls across boundaries, 566 Microsoft Silverlight applications and, 574 monitoring, 571 passing objects across boundaries, 569 permission set inheritance, 563 proxy types, defining, 564 purpose of, 553 read-only properties in, 572 robust host applications, 577 singleton types and, 634 SQL Server and, 575 static members and, 567 thread pools. See thread pools threads and, 562 unloading, 477, 494, 566, 570 unloading, as garbage collection trigger, 519 XML web services applications and, 575 AppDomainSetup object, 563 Append method, 338 AppendChar method, 358 AppendFormat method, 338, 345, 346, 347 AppendLine method, 338 application developers, exception handling guidelines, 478, 485 application models, threading models for, 748 application state, serialization/deserialization of, 616 application types, 36 ApplicationException type, 466 applications add-in support, 596 administrative control, 62 AppDomains and, 574 architecting for events, 250 compiling, 35 configuration files, 62 configuring for assembly download, 45 dynamically extensible, 583, 588 installation complexity, 34 optimizing, 19 single instance, 781 ApplyPolicy method, 587 .appx files, 60 architecting applications for events, 250 ArgumentNullException exception, 647 arguments commas in, 212 order of evaluation, 210, 211 passing variable number of, 220 arity, 273 overloading based on, 286 Array class, 373 array covariance, 379 array initializers, 376 Array type, 380 Assemblies ArrayEnumerator objects, 278 arrays, 373. See also vectors accessing, 386 accessing elements of, 383 accessing with unsafe code, 386 allocating, 373, 374 allocating on thread stack, 388 casting, 378 casting between types, 379 collection implementation, 381 compiler inferences of, 376 converting, 378 copying, 378, 382 copying elements, 380 covariance, 379 creating, 596 of Decimal values, 383 derivation of, 373, 380 dynamically creating, 383 embedding in structures, 390 implicitly typed, 239, 376, 377 indexes into, 375 initializing elements, 376 inline, 390 internals, 384 jagged, 375 in managed heap, 374 multi-dimensional, 385, 386 non-zero lower bounds, 383 overhead information, 374 passing and returning, 382 of polygons, 375 of reference types, 373 referencing, 376 single-dimensional, 375 static methods for, 380 of tasks, 710 type names, 385 types of, 384 unsafe access, 388 WinRT, 648, 660 zero-based, 374 zero-length, 382 as operator, 96 AsBuffer method, 658 ASCII encoding, 351 ASCIIEncoding object, 353 AsOrdered method, 718 ASP.NET asynchronous objects, 751 threading model, 748 ASP.NET applications AppDomains and, 575 processes run by, 687 assemblies 32-bit and 64-bit, 8 administrative control, 62 Assembly Linker and, 52 benefits of, 7 characteristics of, 45 combining modules into, 45 compressing, 74 configuration files, 84 configuring download of, 45 creating from managed modules, 7 culture, 59 data files in, 46 default path to, 38 defined, 6, 45 delayed signing, 76 deploying and packaging, 60 different types in, 46 directories for, 63 discovering types in, 590 double copies of, 75 downloading from web, 586 executing code, 11 files required for, 50 friend, 154 global assembly cache, 72 globally deployed, 67 loading into AppDomains, 564 locating, 63, 83 manifest tables, 47 multifile, 46, 48 namespaces and, 101 platform, specifying, 8 preventing execution of, 587 private deployment of, 67 privately deployed, 61 publisher policy controls, 86 referencing, 37, 51, 70, 74, 98
Assembly Linker assemblies (continued) registering, 74 resource files, adding, 53 satellite, 59 self-describing nature of, 7 serialization and, 616 signing files, 70 statistics, viewing, 44 strongly named, 66, 67, 68, 72 uninstalling from GAC, 73 unloading, 587 used by multiple AppDomains, 558 verification, 76 verification, skipping, 77 version numbers, 58 version resource attributes, 56 version resources in, 54 versioning issues, 597 versioning policies, 587 Visual Studio IDE and, 51 weakly named, 66, 68 Win32 resources, embedding, 54 Windows installer and, 73 Assembly Linker, 52, 53 assembly loading, 584 callback methods, 587, 588 embedding dependent DLLs, 588 Load method, 585 for metadata analysis, 586 multiple times into AppDomain, 586 for specific AppDomain, 585 for specific architecture, 585 with specific path name, 586 AssemblyDef table, 47 AssemblyRef table, 39 AssemblyResolve event, 588 assembly type, 25, 592 AsSequential method, 718 Assert method, 502, 503 associating data, 550 AsStream method, 658 buffering, 656 Assume method, 502, 503 AsTask method, 653, 654 async, 651 AsyncCoordinator class, 770, 771 asynchronous compute-bound operations, 693. See compute-bound asynchronous operations calling, 693 initiating, 700 Windows scheduler and, 694 asynchronous exceptions, 495 asynchronous flag, 729 asynchronous functions, 732 await operator and, 746 awaiters and, 738 compiler warnings, turning off, 746 debugging, 745 event handlers and, 741 examples of, 735 exception handling and, 744 extensibility of, 738 in Framework Class Library, 742 identifying, 733 initiating from non-caller thread, 745 restrictions on, 734 as state machines, 734 stepping into and out of, 745 Task object and, 733 thread synchronization and, 757 unhandled exceptions and, 745 WebClient and, 744 asynchronous I/O operations, 729 asynchronous functions and, 732 canceling, 751 concurrent function of, 746 debuggers and, 731 event handlers and, 742 FileStream objects and, 753 garbage collection and, 731 GUI responsiveness and, 732 ignoring SynchronizationContext object, 750 incomplete, showing, 738 performance benefits, 731 Task type for, 738 thread priorities, 754 asynchronous lambda expressions, 746 asynchronous operations, 650, 691 asynchronous server implementation, 751 asynchronous thread synchronization, 814 asynchonous WinRT APIs, 649 C# compiler AsyncOneManyLock class, 816 Attribute class, 424 attributes. See also custom attributes setting, 368 AttributeUsage attribute, 428 automatically implemented properties, 231 auto-reset events, 782, 784 AutoResetEvent method, 786 await, 651 await operator, 652 awaiters, 738, 740
B background threads vs. foreground, 688 backing fields, 230 Backus-Naur Form grammar for type names, 592 Barrier class, 805 base-64 encoding and decoding, 356 Base class, 296, 312 in WinRT, 645 base types, vs. interfaces, 312 BeginBackgroundProcessing method, 755 BeginWaitForConnection method, 743 BinaryFormatter object, 614 binary namespace, 614 binary operators, 192 nullable types and, 444 BinaryReader type, 350 BinaryWriter type, 350 binding early vs. late, 589 handles for, 608 BindToName method, 641 BindToType method, 641 Bing maps, 659 bit flags, 367 converting numeric values into, 370 enumerated types for, 368 numeric equivalents, 369 setting, 368 bitmaps, garbage collection of, 538 BlockCopy method, 380 blocking collections, 820 blocking threads avoiding, 705, 805 countdown for, 804 reasons for, 806 BlockingCollection class, 820 blocks catch, 455, 457, 480, 482 finally, 455, 456, 478, 497, 535 try, 454, 497 bool type, 112 boxing, nullable types, 447 boxing value methods, 135 boxing value types, 124 changing fields, 136 efficiency of, 130 example code, 128 Break method (Parallel class), 716 breakpoints, AIPs and, 232 buffering AsStream methods and, 656 WinRT, 658 buffering LINQ query results, 720 byte array method, garbage collection and, 548 byte arrays, 656 byte order mark (BOM), 353 byte type, 112
C C# asynchronous functions, 732 is operator, 95 optimizing code, 14 question marks in, 443 using directive, 98 WinRT component definitions in, 658 C# compiler event implementation, 256 language translation done by, 763 output of, 9 platform command-line switch, 8, 10 primitive types and, 114 referencing types, 35 response files, 36 unsafe code, 17
C++ compiler, managed/unmanaged code and C++ compiler, managed/unmanaged code and, 6 caching threads, 673 weak references and, 550 callback functions, 391. See also delegates unmanaged, 391 uses for, 391 callback methods, 249. See also lambda method for AppDomains, 573 assembly loading and, 587, 588 calling, 393 disposing of, 699 exceptions thrown by, 698 invoking, 399 lambda expressions, 410 referencing local parameters, 413 registering after cancellation, 698 returning values with, 408 syntax for, 409 calling back static methods, 394 calling methods, 163 across AppDomain boundaries, 566 calling type constructors, 188 callvirt instruction, 163 CAN-DO relationships, 312 Cancel method, 760 canceling operations, 696 after set time, 700 cooperatively, 696 invoking methods after, 698 preventing, 698 canceling tasks, 704 canceling WinRT APIs, 653 CancellationToken objects associating with tasks, 705 passing as closure variables, 705 CancellationTokenSource objects, 696 creating, 699 CancellationTokenSource type, 704 CancellationToken value type, 697 CannotUnloadAppDomainException exception, 571 carriage returns, 322 casting arrays, 378 casting, Char type to numeric value, 319 casting types between objects, 93 dynamic, 145 implicit vs. explicit, 114 with is/as operators, 95 primitive, 114 catch blocks, 455, 457, 482. See also finally blocks; try blocks constrained execution regions and, 475 exceptions thrown by, 457 overuse of, 480 redundant, warning for, 459 stack trace, obtaining, 461 catch types, 455 variable names after, 456 CCCheck.exe (Code Contract Checker), 503 CCDocGen.exe (Code Contract Document Generator), 504 CCRefGen.exe (Code Contract Reference Assembly Generator), 504 CCWs (COM Callable Wrappers), 644 CERs. See constrained execution regions (CERs chaining delegates, 400, 404 C# support for, 404 ChainSelector method, 639 char type, 112, 317 casting to numeric value, 319 converting numeric types to, 319 instance methods, 318 static methods, 318 character arrays, 337 methods for, 338 characters, 317. See also text elements converting to bytes, 353 examining in strings, 333 expanding, 327 lowercase/uppercase, changing, 318 numeric equivalent, returning, 318 checked operators, 116 child tasks, 707 circuit boards, 727 class constraint, 287 class constructors. See type constructors class inheritance. See inheritance class libraries, thread synchronization and, 759 Date: 2016-03-03; view: 717
|