An overview of .NET Attributes and Reflection. Pro's, Con's, and when to use them along with a practical demo of .NET reflection in use.
Video demos can be found here:
http://dandouglas.wordpress.com/talks-webcasts/
.NET assemblies are self-describing, i.e. information about an assembly is stored in the assembly itself. This information is called Metadata. .NET also allows you to put additional information in the metadata via Attributes. Attributes are used in many places within the .NET framework.
For more information on .net visit : http://crbtech.in/Dot-Net-Training/
Attributes allow flexibility in C# by extending metadata. Common built-in attributes include Obsolete, DllImport, and Conditional. Custom attributes can be created by defining attribute classes. .NET components are executable code known as assemblies. Reflection allows reading metadata from assemblies, including attribute information.
An assembly is the basic building block of .NET applications and contains compiled code, metadata, and resources. It has an assembly manifest that stores information about the assembly including its name, version, and referenced assemblies. There are two types of assemblies: private assemblies used by a single application and public/shared assemblies that can be used by multiple applications by installing in the global assembly cache (GAC). Metadata describes types and members in an assembly and is stored in binary format to enable sharing across platforms.
This document summarizes a presentation on .NET assemblies. It discusses what assemblies are, the probing process for finding assemblies, private and shared assemblies, deploying assemblies to the global assembly cache (GAC), client redirection to updated assemblies in the GAC, assembly execution and just-in-time compilation, and using the Native Image Generator tool to improve performance. Demo examples are provided to illustrate probing, accessing private assemblies via configuration files, deploying to and accessing assemblies from the GAC, client redirection, assembly execution, and using the Native Image Generator.
An assembly in .NET contains compiled code and metadata. It can be an EXE or DLL file. When code is compiled, it is translated to IL code and metadata is generated. The IL and metadata are bundled into the assembly file. Assemblies can be private, used by a single app, or shared, used by multiple apps. Shared assemblies are stored in the global assembly cache so they only need to be deployed once. The ILDASM tool allows examining the contents of an assembly.
C# classes allow for modularity, data encapsulation, inheritance, and polymorphism. They act as blueprints for generating object instances. The document discusses key object-oriented programming concepts in C# like encapsulation, inheritance, polymorphism, casting, exception handling, garbage collection, interfaces, collections, comparables, and delegates. It provides examples to illustrate concepts like shallow cloning using ICloneable, implementing IComparable, overloading operators, and using XML documentation comments.
.NET Core, ASP.NET Core Course, Session 3aminmesbahi
Session 3,
Introducing to Compiler
What is the LLVM?
LLILC
RyuJIT
AOT Compilation
Preprocessors and Conditional Compilation
An Overview on Dependency Injection
Advantages of .NET over the other languages, overview of .NET binaries, Intermediate Language, metadata, .NET Namespaces, Common Language runtime, common type system, common Language Specification.
C# fundamentals – C# class, object, string formatting, Types, scope, constants, C# iteration, control flow, operators, array, string, Enumerations, structures, custom Namespaces
.NET assemblies are self-describing, i.e. information about an assembly is stored in the assembly itself. This information is called Metadata. .NET also allows you to put additional information in the metadata via Attributes. Attributes are used in many places within the .NET framework.
For more information on .net visit : http://crbtech.in/Dot-Net-Training/
Attributes allow flexibility in C# by extending metadata. Common built-in attributes include Obsolete, DllImport, and Conditional. Custom attributes can be created by defining attribute classes. .NET components are executable code known as assemblies. Reflection allows reading metadata from assemblies, including attribute information.
An assembly is the basic building block of .NET applications and contains compiled code, metadata, and resources. It has an assembly manifest that stores information about the assembly including its name, version, and referenced assemblies. There are two types of assemblies: private assemblies used by a single application and public/shared assemblies that can be used by multiple applications by installing in the global assembly cache (GAC). Metadata describes types and members in an assembly and is stored in binary format to enable sharing across platforms.
This document summarizes a presentation on .NET assemblies. It discusses what assemblies are, the probing process for finding assemblies, private and shared assemblies, deploying assemblies to the global assembly cache (GAC), client redirection to updated assemblies in the GAC, assembly execution and just-in-time compilation, and using the Native Image Generator tool to improve performance. Demo examples are provided to illustrate probing, accessing private assemblies via configuration files, deploying to and accessing assemblies from the GAC, client redirection, assembly execution, and using the Native Image Generator.
An assembly in .NET contains compiled code and metadata. It can be an EXE or DLL file. When code is compiled, it is translated to IL code and metadata is generated. The IL and metadata are bundled into the assembly file. Assemblies can be private, used by a single app, or shared, used by multiple apps. Shared assemblies are stored in the global assembly cache so they only need to be deployed once. The ILDASM tool allows examining the contents of an assembly.
C# classes allow for modularity, data encapsulation, inheritance, and polymorphism. They act as blueprints for generating object instances. The document discusses key object-oriented programming concepts in C# like encapsulation, inheritance, polymorphism, casting, exception handling, garbage collection, interfaces, collections, comparables, and delegates. It provides examples to illustrate concepts like shallow cloning using ICloneable, implementing IComparable, overloading operators, and using XML documentation comments.
.NET Core, ASP.NET Core Course, Session 3aminmesbahi
Session 3,
Introducing to Compiler
What is the LLVM?
LLILC
RyuJIT
AOT Compilation
Preprocessors and Conditional Compilation
An Overview on Dependency Injection
Advantages of .NET over the other languages, overview of .NET binaries, Intermediate Language, metadata, .NET Namespaces, Common Language runtime, common type system, common Language Specification.
C# fundamentals – C# class, object, string formatting, Types, scope, constants, C# iteration, control flow, operators, array, string, Enumerations, structures, custom Namespaces
Web applications and web servers, HTML form Development, GET and POST, ASP.NET application, ASP.NET namespaces, creating sample C# web Applications, architecture, Debugging and Tracing of ASP.NET, Introduction to web Form controls. Building Web Services- web service namespaces, building simple web
This document discusses object-oriented programming concepts. It defines an object as anything that can be represented by data and manipulated by a program. An object has properties that hold its data values and methods that manipulate the properties. A class is a blueprint that defines the properties and methods for instances of objects. The document provides examples of physical and non-physical objects and how they are represented by properties and methods in object-oriented programming.
.NET Core, ASP.NET Core Course, Session 9aminmesbahi
This document provides an overview of controllers and filters in ASP.NET Core MVC. It defines controllers as classes that handle browser requests, retrieve model data, and specify view templates. Actions are public methods on controllers that handle requests. Filters allow running code before and after stages of the execution pipeline and can be used to handle concerns like authorization, caching, and exception handling. The document discusses implementing different filter types, configuring filters through attributes and dependency injection, and controlling filter order.
.NET Core, ASP.NET Core Course, Session 17aminmesbahi
This document provides an overview of Entity Framework Core services and dependency injection. It discusses how EF Core uses services, the different categories of services, and service lifetimes. It also covers how the AddDbContext method works, how EF Core constructs its internal service provider, and some key EF Core package manager console commands like Add-Migration and Scaffold-DbContext.
Microsoft Entity Framework is an object-relational mapper that bridges the gap between object-oriented programming languages and relational databases. The presentation introduced Entity Framework, discussed its architecture including the conceptual data model and entity data model, and demonstrated CRUD operations and other core functionality. It also provided an overview of Entity Framework's history and versions.
Remote Method Invocation, Distributed Programming in java, Java Distributed Programming, Network Programming in JAVA, Core Java, Introduction to RMI, Getting Started with RMI, Getting Started with Remote Method Invocation, Distributed Programming, Java, J2SE
Software objects contain state and behavior. An object's state is stored in fields and its behavior is exposed through methods. Hiding internal data and only allowing access through methods is known as encapsulation. Common behavior can be defined in a superclass and inherited into subclasses using the extends keyword. A collection of related classes organized into a namespace is called a package.
Building maintainable web apps with Angular MS TechDays 2017Erik van Appeldoorn
The document discusses several best practices for writing clean and maintainable Angular code. It recommends having a single responsibility for components and services with limited lines of code. It also suggests using consistent naming conventions across the application, extracting templates and styles, and applying dependency injection. The document provides examples of component interaction using input and output bindings as well as an example of a pipe for filtering data. It emphasizes principles like loose coupling, inheritance and reuse to build a well-structured application.
Entity Framework: Code First and Magic UnicornsRichie Rump
Entity Framework is an object-relational mapping framework that allows developers to work with relational data using domain-specific objects. It includes features like code first modeling, migrations, data annotations, and the DbContext API. Newer versions have added additional functionality like support for enums, performance improvements, and spatial data types. Resources for learning more include blogs by Julie Lerman and Rowan Miller as well as StackOverflow and PluralSight videos.
.NET Core, ASP.NET Core Course, Session 5aminmesbahi
This document summarizes content from a .NET Core training course session on garbage collection. It discusses the GC class and its properties and methods for controlling garbage collection. It also covers destructors in C#, how they implicitly call the base class finalizer, and how finalization occurs recursively down the inheritance chain. The document concludes by introducing the PerfView performance analysis tool for capturing heap snapshots and comparing them to identify objects still in memory that cannot be collected.
Java annotations allow metadata to be added to Java code elements like classes, methods, and fields. This metadata can be read by tools and libraries to affect how the code is processed. Common built-in annotations include @Deprecated, @Override, and @SuppressWarnings. Annotations can also be applied to other annotations to specify how they function, such as their retention policy or valid targets. As an example, the document describes how to build a simple annotation-based test framework using the @Test annotation to mark test methods.
The document discusses namespaces in .NET. Namespaces help organize classes and interfaces logically and avoid naming conflicts. Namespaces use dot notation and can be defined using the namespace keyword. Assemblies contain namespaces and provide execution context and versioning. Private assemblies are used within one application while public assemblies in the global assembly cache can be used across applications. The compiler compiles to CIL and produces metadata. The runtime loads assemblies and the JIT compiler converts CIL to native code for the CPU.
The document discusses the .NET platform and framework. It provides an overview of the key components of .NET including the Common Language Runtime (CLR) environment that executes programs, the Framework Class Library (FCL) base classes and libraries, and support for multiple programming languages. It also describes concepts like application domains, marshaling objects across boundaries, and how programs are compiled to Microsoft Intermediate Language (MSIL) and executed.
The document discusses Front End Design Tool (FEDT) using VB.NET. It provides an introduction to VB.NET presented by Ankit Verma. The topics covered include which book to follow for VB.NET, languages, system hierarchy, what is FEDT, introduction to .NET framework, versions of .NET framework, supported applications, client-server model, .NET architecture including CLR, CTS and FCL, execution process, memory management and assemblies.
Annotations provide metadata that can be applied to Java code elements. They do not directly affect program semantics but can be read and used by tools and libraries. The key points are:
1. Annotations were introduced in Java 5 to allow programmers to add metadata directly in code.
2. Common uses of annotations include providing compiler instructions, documentation, code generation, and runtime processing.
3. Annotation types define the structure of annotations and can be further configured using meta-annotations like @Target and @Retention.
Learn Entity Framework in a day with Code First, Model First and Database FirstJibran Rasheed Khan
Learn Entity Framework in a day with Code First, Model First and Database First
•Introduction to Entity Framework (EF)
•Architecture
•What’s new!
•Different approaches to work with (Code first, Database first and model first)
•Choosing right work model
•Pictorial Tour to each model
•Features & Advantages
•Question & Answer
for any help and understanding feel free to contact
thank you
This document provides an overview of ADO.NET Entity Framework (EF), which is an object-relational mapping (ORM) framework that allows .NET developers to work with relational data using domain-specific objects. It discusses key EF concepts like the entity data model, architecture, features, and lifecycle. The document explains that EF maps database tables and relationships to .NET classes and allows LINQ queries over object collections to retrieve and manipulate data, hiding SQL complexity. It also covers the ObjectContext class that manages database connections and entities.
This document contains answers to 10 interview questions for Dynamics 365 CE/CRM developers. It discusses OOP concepts in .NET like classes, objects, abstraction, encapsulation, inheritance and polymorphism. It also defines sealed classes, access specifiers, design patterns, namespaces, assemblies, WEB APIs, boxing and unboxing, DLLs and EXEs, signing assemblies, abstract classes and interfaces. Key differences between abstract classes and interfaces are provided. The document is for training purposes to help prepare for Dynamics 365 CE/CRM developer interviews.
This lecture covered C# fundamentals including memory management, static vs non-static, properties, inheritance, and modifiers. It also discussed namespaces, assemblies, generics, collections, enumeration, abstract classes, interfaces, and polymorphism. The key topics were memory allocation on the stack vs heap, value types vs reference types, boxing and unboxing, inheritance and polymorphism, abstract classes vs interfaces, generics and collections, and enumerators. The assignment is to finish a database design and stored procedures based on a UML diagram.
The document provides an agenda for a .NET and C# training session. It will cover the .NET platform and Visual Studio IDE, the .NET framework, an introduction to the C# programming language, object-oriented principles in C#, assemblies and modules, and sample applications. It then discusses key concepts about the .NET platform, Visual Studio, C# language syntax and components, data types in C#, arrays, and assemblies.
The document discusses reflection in .NET and provides information on:
1. How reflection allows accessing metadata for any .NET type including methods, properties, fields and attributes.
2. The types involved in reflection like MemberInfo, MethodInfo, and how they can be used to explore types.
3. How reflection emits IL and can be used to dynamically generate types and assemblies at runtime.
4. Some common uses of reflection like attributes, dynamic invocation, and assembly loading.
Web applications and web servers, HTML form Development, GET and POST, ASP.NET application, ASP.NET namespaces, creating sample C# web Applications, architecture, Debugging and Tracing of ASP.NET, Introduction to web Form controls. Building Web Services- web service namespaces, building simple web
This document discusses object-oriented programming concepts. It defines an object as anything that can be represented by data and manipulated by a program. An object has properties that hold its data values and methods that manipulate the properties. A class is a blueprint that defines the properties and methods for instances of objects. The document provides examples of physical and non-physical objects and how they are represented by properties and methods in object-oriented programming.
.NET Core, ASP.NET Core Course, Session 9aminmesbahi
This document provides an overview of controllers and filters in ASP.NET Core MVC. It defines controllers as classes that handle browser requests, retrieve model data, and specify view templates. Actions are public methods on controllers that handle requests. Filters allow running code before and after stages of the execution pipeline and can be used to handle concerns like authorization, caching, and exception handling. The document discusses implementing different filter types, configuring filters through attributes and dependency injection, and controlling filter order.
.NET Core, ASP.NET Core Course, Session 17aminmesbahi
This document provides an overview of Entity Framework Core services and dependency injection. It discusses how EF Core uses services, the different categories of services, and service lifetimes. It also covers how the AddDbContext method works, how EF Core constructs its internal service provider, and some key EF Core package manager console commands like Add-Migration and Scaffold-DbContext.
Microsoft Entity Framework is an object-relational mapper that bridges the gap between object-oriented programming languages and relational databases. The presentation introduced Entity Framework, discussed its architecture including the conceptual data model and entity data model, and demonstrated CRUD operations and other core functionality. It also provided an overview of Entity Framework's history and versions.
Remote Method Invocation, Distributed Programming in java, Java Distributed Programming, Network Programming in JAVA, Core Java, Introduction to RMI, Getting Started with RMI, Getting Started with Remote Method Invocation, Distributed Programming, Java, J2SE
Software objects contain state and behavior. An object's state is stored in fields and its behavior is exposed through methods. Hiding internal data and only allowing access through methods is known as encapsulation. Common behavior can be defined in a superclass and inherited into subclasses using the extends keyword. A collection of related classes organized into a namespace is called a package.
Building maintainable web apps with Angular MS TechDays 2017Erik van Appeldoorn
The document discusses several best practices for writing clean and maintainable Angular code. It recommends having a single responsibility for components and services with limited lines of code. It also suggests using consistent naming conventions across the application, extracting templates and styles, and applying dependency injection. The document provides examples of component interaction using input and output bindings as well as an example of a pipe for filtering data. It emphasizes principles like loose coupling, inheritance and reuse to build a well-structured application.
Entity Framework: Code First and Magic UnicornsRichie Rump
Entity Framework is an object-relational mapping framework that allows developers to work with relational data using domain-specific objects. It includes features like code first modeling, migrations, data annotations, and the DbContext API. Newer versions have added additional functionality like support for enums, performance improvements, and spatial data types. Resources for learning more include blogs by Julie Lerman and Rowan Miller as well as StackOverflow and PluralSight videos.
.NET Core, ASP.NET Core Course, Session 5aminmesbahi
This document summarizes content from a .NET Core training course session on garbage collection. It discusses the GC class and its properties and methods for controlling garbage collection. It also covers destructors in C#, how they implicitly call the base class finalizer, and how finalization occurs recursively down the inheritance chain. The document concludes by introducing the PerfView performance analysis tool for capturing heap snapshots and comparing them to identify objects still in memory that cannot be collected.
Java annotations allow metadata to be added to Java code elements like classes, methods, and fields. This metadata can be read by tools and libraries to affect how the code is processed. Common built-in annotations include @Deprecated, @Override, and @SuppressWarnings. Annotations can also be applied to other annotations to specify how they function, such as their retention policy or valid targets. As an example, the document describes how to build a simple annotation-based test framework using the @Test annotation to mark test methods.
The document discusses namespaces in .NET. Namespaces help organize classes and interfaces logically and avoid naming conflicts. Namespaces use dot notation and can be defined using the namespace keyword. Assemblies contain namespaces and provide execution context and versioning. Private assemblies are used within one application while public assemblies in the global assembly cache can be used across applications. The compiler compiles to CIL and produces metadata. The runtime loads assemblies and the JIT compiler converts CIL to native code for the CPU.
The document discusses the .NET platform and framework. It provides an overview of the key components of .NET including the Common Language Runtime (CLR) environment that executes programs, the Framework Class Library (FCL) base classes and libraries, and support for multiple programming languages. It also describes concepts like application domains, marshaling objects across boundaries, and how programs are compiled to Microsoft Intermediate Language (MSIL) and executed.
The document discusses Front End Design Tool (FEDT) using VB.NET. It provides an introduction to VB.NET presented by Ankit Verma. The topics covered include which book to follow for VB.NET, languages, system hierarchy, what is FEDT, introduction to .NET framework, versions of .NET framework, supported applications, client-server model, .NET architecture including CLR, CTS and FCL, execution process, memory management and assemblies.
Annotations provide metadata that can be applied to Java code elements. They do not directly affect program semantics but can be read and used by tools and libraries. The key points are:
1. Annotations were introduced in Java 5 to allow programmers to add metadata directly in code.
2. Common uses of annotations include providing compiler instructions, documentation, code generation, and runtime processing.
3. Annotation types define the structure of annotations and can be further configured using meta-annotations like @Target and @Retention.
Learn Entity Framework in a day with Code First, Model First and Database FirstJibran Rasheed Khan
Learn Entity Framework in a day with Code First, Model First and Database First
•Introduction to Entity Framework (EF)
•Architecture
•What’s new!
•Different approaches to work with (Code first, Database first and model first)
•Choosing right work model
•Pictorial Tour to each model
•Features & Advantages
•Question & Answer
for any help and understanding feel free to contact
thank you
This document provides an overview of ADO.NET Entity Framework (EF), which is an object-relational mapping (ORM) framework that allows .NET developers to work with relational data using domain-specific objects. It discusses key EF concepts like the entity data model, architecture, features, and lifecycle. The document explains that EF maps database tables and relationships to .NET classes and allows LINQ queries over object collections to retrieve and manipulate data, hiding SQL complexity. It also covers the ObjectContext class that manages database connections and entities.
This document contains answers to 10 interview questions for Dynamics 365 CE/CRM developers. It discusses OOP concepts in .NET like classes, objects, abstraction, encapsulation, inheritance and polymorphism. It also defines sealed classes, access specifiers, design patterns, namespaces, assemblies, WEB APIs, boxing and unboxing, DLLs and EXEs, signing assemblies, abstract classes and interfaces. Key differences between abstract classes and interfaces are provided. The document is for training purposes to help prepare for Dynamics 365 CE/CRM developer interviews.
This lecture covered C# fundamentals including memory management, static vs non-static, properties, inheritance, and modifiers. It also discussed namespaces, assemblies, generics, collections, enumeration, abstract classes, interfaces, and polymorphism. The key topics were memory allocation on the stack vs heap, value types vs reference types, boxing and unboxing, inheritance and polymorphism, abstract classes vs interfaces, generics and collections, and enumerators. The assignment is to finish a database design and stored procedures based on a UML diagram.
The document provides an agenda for a .NET and C# training session. It will cover the .NET platform and Visual Studio IDE, the .NET framework, an introduction to the C# programming language, object-oriented principles in C#, assemblies and modules, and sample applications. It then discusses key concepts about the .NET platform, Visual Studio, C# language syntax and components, data types in C#, arrays, and assemblies.
The document discusses reflection in .NET and provides information on:
1. How reflection allows accessing metadata for any .NET type including methods, properties, fields and attributes.
2. The types involved in reflection like MemberInfo, MethodInfo, and how they can be used to explore types.
3. How reflection emits IL and can be used to dynamically generate types and assemblies at runtime.
4. Some common uses of reflection like attributes, dynamic invocation, and assembly loading.
Assemblies are the building blocks of .NET Framework ; they form the basic unit of deployment, reuse, version control, reuse, activation scoping and security permissions. An assembly is a collection of types and resources that are created to work together and form a functional and logical unit.
Attributes, reflection, and dynamic programmingLearnNowOnline
This document discusses attributes, reflection, and dynamic programming in .NET. It covers how to create and apply attributes in code. It also discusses how reflection allows examining code at runtime to discover types, members and invoke methods dynamically. The document shows how to derive from DynamicObject to implement dynamic behavior at runtime.
Reflection power pointpresentation ppt. this help you learn and present reflection in c# . net. there are sample codes included for better understanding.
Reflection is the process of runtime type discovery. Reflection is a generic term that describes the ability to inspect and manipulate program elements at runtime. Using reflection services, we are able to programmatically obtain the same metadata information displayed by ildasm.exe.
3. REFLECTION ALLOWS YOU TO: Enumerate the members of a type Instantiate a new object Execute the members of an object Find out information about a type Find out information about an assembly Inspect the custom attributes applied to a type Create and compile a new assembly
We've all seen the big "macro" features in .NET, this presentation is to give praise to the "Little Wonders" of .NET -- those little items in the framework that make life as a developer that much easier!
.Net Remoting allows .NET applications to communicate across application domains and machines by making objects on remote machines appear as local objects, utilizing communication channels like TCP and HTTP to serialize and deserialize objects, and server-activated objects on the remote machine that are instantiated based on client requests.
The document discusses creating and using custom attributes in C#. It explains how to define a custom attribute class, apply the AttributeUsage attribute, name and construct the attribute, and apply it to a target element. It also covers retrieving metadata about custom attributes at runtime using reflection and the main uses of reflection like viewing metadata, type discovery, and late binding.
This document discusses attributes and reflection in C#. It begins by explaining what attributes are and how they can be used to associate declarative metadata with code entities. It then provides examples of using predefined attributes like Obsolete. It discusses user-defined attributes and the AttributeUsage attribute. It covers conditional methods and the Conditional attribute. The document explains reflection and how the Type class is central to it. It provides examples of using reflection to identify types that implement an interface or are subclasses of a given type. It concludes with a test case that gets the constructors of the String class using reflection.
Slides to understand and present Advanced .net topics with c# language. Topics like delegates, Indexer, Reflection API, Attributes, Collections in c#, File and I/O manipulation etc. are described with examples too.
This document discusses .NET Remoting and provides examples of building simple remoting clients and servers. It covers the following key points:
1. .NET Remoting allows objects to interact across application domains, whether on the same system or over a network, saving developers time and effort.
2. The .NET Remoting architecture uses proxies, formatters, and channels to enable communication between remote objects.
3. Examples are provided to demonstrate building simple remoting clients and servers using different channels like HTTP.
Windows Communication Foundation (WCF) es una plataforma de mensajería de .NET que permite el desarrollo rápido de sistemas distribuidos y aplicaciones basadas en servicios. WCF se basa en .NET 2.0 y se incluye en Windows Vista. Los desarrolladores pueden crear aplicaciones con WCF en Visual Studio 2005 para Windows XP, Windows Vista y Windows Server 2003.
Reflection in C# allows examining and modifying program code, objects, and types at runtime without knowing their internal representations, enabling discovery of class information and accessing metadata. Key aspects of reflection include Type objects that represent types, MemberInfo classes that provide metadata about members, attributes that mark elements of code, and the System.Reflect namespace that contains classes for core reflection functionality. Reflection can be used for tasks like late binding, inspecting types, activating objects, and generating code on the fly.
Building & Designing Windows 10 Universal Windows Apps using XAML and C#Fons Sonnemans
Met het Universal Windows Platform wordt het voor jou als developer gemakkelijker om apps op maat te maken voor verschillende devices. Dankzij recente ontwikkelingen wordt het creëren van Universal Windows Apps eenvoudiger dan ooit!
XAML UI heeft met haar nieuwe controls en features een flinke stap gemaakt in het vereenvoudigen van het ontwikkelen van apps voor verschillende devices. Daarnaast is de performance geoptimaliseerd met nieuwe en verbeterde features zoals nieuwe diagnostics tools, een nieuwe Blend tool, Compiled data binding en meer!
Tijdens het seminar geeft Fons Sonnemans (trainer, developer, spreker op TechDays NL en tweemaal beloond met een Microsoft MVP award) inzicht in deze nieuwe features en tools – daar wil jij natuurlijk graag bij zijn!
This document discusses advanced C# features including delegates, events, anonymous methods, lambda expressions, anonymous types, dynamic types, and extension methods. Delegates allow type-safe callbacks and are used to handle events. Anonymous methods and lambda expressions provide concise ways to handle events without standalone methods. Anonymous types define encapsulated data without associated methods, and are typically used with LINQ. Dynamic types have members that are resolved at runtime rather than compile time, without static type checking.
Blog Post: http://WakeUpAndCode.com/aspnetcore-overview-nvcc2016
Recently known as ASP.NET 5, the all-new ASP.NET Core 1.0 is Microsoft's cross-platform lightweight approach to building robust applications for the modern Web. Get a high-level overview of what you need to know about ASP.NET Core from Shahed Chowdhuri, Sr. Technical Evangelist @ Microsoft.
This document provides an introduction and overview of C# programming and SQL. It discusses key aspects of C#, its uses in Windows, web, and web service applications. It also covers SQL fundamentals like retrieving, inserting, updating, and deleting records. The document includes examples of SQL statements like INSERT, UPDATE, DELETE, and SELECT and highlights best practices like enclosing string values in single quotes and ending statements with semicolons.
C# is an object-oriented programming language developed by Microsoft that allows developers to create programs for various platforms. It is designed to work with the .NET framework and uses a common language infrastructure. C# has many features that make it useful for professional development, such as being easy to learn, producing efficient programs, and supporting multithreading. A basic C# program includes elements like namespaces, classes, methods, and data types.
This is a presentation I did for the Cedar Rapids .NET User Group (CRineta.org). It was intended to present object oriented concepts and their application in .NET and C#.
Object design is the process of refining requirements analysis models and making implementation decisions to optimize execution time, memory usage, and other performance measures. It involves four main activities: service specification to define class interfaces; component selection and reuse of existing solutions; restructuring models to improve code reuse; and optimization to meet performance requirements. During object design, interfaces are fully specified with visibility, type signatures, and contracts to clearly define class responsibilities.
This document provides a summary of Michael Cummings' design portfolio, which includes several .NET projects he developed as a C# software developer. It begins with an introduction and contact information. It then summarizes his technical skills and experience developing multi-tier applications using Microsoft .NET technologies. The rest of the document describes four specific projects in his portfolio: 1) Developing business tier components for a retail services company. 2) Developing a Windows Forms library management application. 3) Developing the data access and entity layers for the library application using ADO.NET and LINQ. 4) Developing an ASP.NET web application for the library. For each project, it provides an overview, knowledge components, design
The document discusses encapsulation in C++ and object-oriented design principles. It covers:
1) Encapsulation requires that classes have clearly defined external interfaces and hide implementation details. This reduces coupling between classes.
2) Functions and classes should minimize side effects by passing parameters as constants and returning values rather than references when possible.
3) References are generally preferable to pointers as they only provide access to an object's interface rather than its memory.
4) Constructors and destructors help classes encapsulate their own resource management by allocating resources during initialization and freeing them during destruction.
This document provides an introduction to design patterns, including their motivation, history, definition, categories, and examples. Some key points:
- Design patterns solve common programming problems by describing reusable solutions that can be adapted for different situations.
- Common categories include creational, structural, and behavioral patterns. Example patterns discussed are Singleton, Decorator, Abstract Factory.
- Design patterns speed up development, promote code reuse, and make software more robust, maintainable and extensible. Resources for further information on design patterns are provided.
Patterns (contd)Software Development ProcessDesign patte.docxdanhaley45372
Patterns (contd)
Software Development Process
Design patterns used to handle change
More time extending and changing code than developing it.
The Strategy design pattern handle change by selecting from a family of external algorithms rather than rewrite.
Design point: Make code closed for modification of code, but open for extension
Problem
Computer object created
Description Method returns
Getting a Computer
Problem
Program has to change every time
Customer changes options
Decorator Pattern
Wrapper code used to extend your core code
Extend a class dynamically at runtime
Decorator uses wrapper code to extend core functionality - decorating the code
Decorator Pattern
description() returns “You are getting a computer”
Wrapper description() returns
“You are getting a computer and a disk”
Wrapper description() returns
“You are getting a computer and a disk and a monitor”
Decorator Pattern
Core component: Computer
Variables holding computer objects should also be able to hold objects that wrap computer objects.
Extend the wrapper classes from the Computer class.
Abstract class cannot be instantiated
Ensures all wrappers are consistent
Developers have to provide their own description
Decorator Pattern
Method calls the core computer object’s
description method and adds “and a disk”
Decorator Pattern
Method calls the core computer object’s
description method and adds “and a disk”
Extend the core object by wrapping it in decorator wrappers. Avoids modification of the core code.
Each successive wrapper called the description method of the object it wrapped and added something to it.
Factory Pattern
Based on type, call the
Connection method
Factory Pattern
Create a method that returns the
correct connection type
Factory Pattern
New operator used to create OracleConnection objects.
New operator used to create SqlServerConnection objects, and MySqlConnection objects.
New operator to instantiate many different concrete classes
Code becomes larger and needs to be replicated in many places
Factor that code out into a method.
Code keeps changing
Encapsulate code into a factory object
Goal: Separate out the changeable code and leave the core code closed for modification
Building the Factory
Creating the Factory
FirstFactory class encapsulates the connection object creation
Pass to it the type of connection (“Oracle”, “SQL Server”,)
Use the factory object to create connection objects with a factory method named createConnection
Building the Factory
Create the FirstFactory class.
Save the type of the database, passed to the FirstFactory class’s constructor.
Object-creation code changes
Check which type of object to be created
(OracleConnection, SqlServerConnection,
and then create it.
Factory Class
Create the Abstract Connection Class
Core code should not be modified or has to be modified
as little as possible.
Using the connection object returned by the
new factory object
Use t.
Reflection Is the ability to of instpecting an assemblies metadata at run time. It is used to find all types in an assembly and/or dynamically invoke methods in an assembly
Share was originally built as a collaboration application on top of the Alfresco Platform. Because Share is a more modern interface than Alfresco Explorer, many customers have adopted customizing Share as their strategy for building solutions on Alfresco. To be successful, such solutions need to understand that Share is a complete collaboration application with a specific Information Architecture. This session will explore leveraging the Share UI while creating your own Information Architecture, including for non-collaborative use cases. Topics covered include: • Create your Information Architecture (folder structure, content model etc…) • Create the necessary screens • Using the underlying framework to wire in the functionality needed to complete the application
The document summarizes several design patterns including creational, structural, and behavioral patterns. Creational patterns like abstract factory, builder, and factory method deal with object instantiation. Structural patterns like adapter, bridge, composite deal with class and object composition. Behavioral patterns like chain of responsibility, command, and observer deal with object communication and can be used to implement things like menus, toolbars, and event handling. Many of these patterns are used throughout the .NET framework in various class libraries.
As presented to the Milwaukee Alt.Net group on November 21st, 2011.
UPDATE April 19, 2012: added some domain logic organization slides using Fowler's 4 basic patterns.
The document discusses a workshop on object-oriented programming. It begins with introducing the speaker and providing his credentials and contact information. It then covers key topics in object-oriented programming including classes, objects, namespaces, functions, methods, constructors, destructors, and the four pillars of OOP - encapsulation, inheritance, polymorphism, and abstraction. For each topic, it provides definitions and examples to explain the concepts. It emphasizes that OOP is a programming paradigm based on objects that can contain data and code.
The document provides an overview of ActionScript 3.0 fundamentals including the ActionScript Virtual Machine, data types, classes, inheritance, interfaces, and object-oriented programming concepts in ActionScript. It discusses topics such as variables, functions, conditional statements, loops, scope, packages, namespaces, and more. The document is intended as educational material for learning the basics of the ActionScript 3.0 programming language.
The document provides an overview of object-oriented programming (OOP) concepts using PHP including classes, objects, properties, methods, encapsulation, inheritance, polymorphism, and magic methods. It defines key OOP terms like class, object, constructor, destructor, and visibility scopes. The document also discusses benefits of OOP like code reuse and data hiding.
VRE Cancer Imaging BL RIC Workshop 22032011djmichael156
The document discusses the Virtual Research Environment for Cancer Imaging (VRE-CI) project which aims to provide a framework for researchers and clinicians to share cancer imaging information, images, and algorithms. It describes using Business Connectivity Services and managed metadata to organize and search image metadata, and building a reusable SharePoint site definition to manage DICOM files and extract metadata for search. Key aspects covered include mapping folders, issues with document library names, including external code, and adapting the DICOM field model.
This document discusses the history and evolution of the C# programming language. It outlines the major versions of C# since its introduction in 2002, along with the .NET Framework versions and Visual Studio releases they correspond to. Each version introduced important new features that expanded the capabilities of the language. The document provides a high-level overview of the progression of C# from its initial release to the current version.
Design patterns are commonly used to address problems relating to application architecture and design. The concept originated from Christopher Alexander's work noting common building design problems and solutions. Design patterns ensure problems are addressed through well-known solutions, and most problems have likely been solved before. Common patterns include observer/subject to separate user interface from business logic, singleton to control object construction, strategy to allow multiple algorithms, and template method to define an algorithm's structure. The facade pattern provides different views of subsystems to users by hiding implementation details. The command pattern encapsulates requests as objects with a known interface to decouple senders and receivers.
This document discusses various design patterns in Python and how they compare to their implementations in other languages like C++. It provides examples of how common patterns from the Gang of Four book like Singleton, Observer, Strategy, and Decorator are simplified or invisible in Python due to features like first-class functions and duck typing. The document aims to illustrate Pythonic ways to implement these patterns without unnecessary complexity.
The document discusses a .NET project that creates reusable assemblies for managing customer information. The first assembly, called "foundation", contains interfaces for managing customer data. The second assembly, "AppTypes", contains classes that implement OOP practices like inheritance and custom exceptions. It also includes XML comments and code samples demonstrating classes from the "AppTypes" library.
Older (2008) presentation I gave internally to SunGard to educate developers on C# and LINQ. LINQ still rocks, and the concepts I cover are important language features while C# developers should be asked in interviews event today.
AppSec PNW: Android and iOS Application Security with MobSFAjin Abraham
Mobile Security Framework - MobSF is a free and open source automated mobile application security testing environment designed to help security engineers, researchers, developers, and penetration testers to identify security vulnerabilities, malicious behaviours and privacy concerns in mobile applications using static and dynamic analysis. It supports all the popular mobile application binaries and source code formats built for Android and iOS devices. In addition to automated security assessment, it also offers an interactive testing environment to build and execute scenario based test/fuzz cases against the application.
This talk covers:
Using MobSF for static analysis of mobile applications.
Interactive dynamic security assessment of Android and iOS applications.
Solving Mobile app CTF challenges.
Reverse engineering and runtime analysis of Mobile malware.
How to shift left and integrate MobSF/mobsfscan SAST and DAST in your build pipeline.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Conversational agents, or chatbots, are increasingly used to access all sorts of services using natural language. While open-domain chatbots - like ChatGPT - can converse on any topic, task-oriented chatbots - the focus of this paper - are designed for specific tasks, like booking a flight, obtaining customer support, or setting an appointment. Like any other software, task-oriented chatbots need to be properly tested, usually by defining and executing test scenarios (i.e., sequences of user-chatbot interactions). However, there is currently a lack of methods to quantify the completeness and strength of such test scenarios, which can lead to low-quality tests, and hence to buggy chatbots.
To fill this gap, we propose adapting mutation testing (MuT) for task-oriented chatbots. To this end, we introduce a set of mutation operators that emulate faults in chatbot designs, an architecture that enables MuT on chatbots built using heterogeneous technologies, and a practical realisation as an Eclipse plugin. Moreover, we evaluate the applicability, effectiveness and efficiency of our approach on open-source chatbots, with promising results.
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsDianaGray10
Join us to learn how UiPath Apps can directly and easily interact with prebuilt connectors via Integration Service--including Salesforce, ServiceNow, Open GenAI, and more.
The best part is you can achieve this without building a custom workflow! Say goodbye to the hassle of using separate automations to call APIs. By seamlessly integrating within App Studio, you can now easily streamline your workflow, while gaining direct access to our Connector Catalog of popular applications.
We’ll discuss and demo the benefits of UiPath Apps and connectors including:
Creating a compelling user experience for any software, without the limitations of APIs.
Accelerating the app creation process, saving time and effort
Enjoying high-performance CRUD (create, read, update, delete) operations, for
seamless data management.
Speakers:
Russell Alfeche, Technology Leader, RPA at qBotic and UiPath MVP
Charlie Greenberg, host
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
How information systems are built or acquired puts information, which is what they should be about, in a secondary place. Our language adapted accordingly, and we no longer talk about information systems but applications. Applications evolved in a way to break data into diverse fragments, tightly coupled with applications and expensive to integrate. The result is technical debt, which is re-paid by taking even bigger "loans", resulting in an ever-increasing technical debt. Software engineering and procurement practices work in sync with market forces to maintain this trend. This talk demonstrates how natural this situation is. The question is: can something be done to reverse the trend?
Dandelion Hashtable: beyond billion requests per second on a commodity serverAntonios Katsarakis
This slide deck presents DLHT, a concurrent in-memory hashtable. Despite efforts to optimize hashtables, that go as far as sacrificing core functionality, state-of-the-art designs still incur multiple memory accesses per request and block request processing in three cases. First, most hashtables block while waiting for data to be retrieved from memory. Second, open-addressing designs, which represent the current state-of-the-art, either cannot free index slots on deletes or must block all requests to do so. Third, index resizes block every request until all objects are copied to the new index. Defying folklore wisdom, DLHT forgoes open-addressing and adopts a fully-featured and memory-aware closed-addressing design based on bounded cache-line-chaining. This design offers lock-free index operations and deletes that free slots instantly, (2) completes most requests with a single memory access, (3) utilizes software prefetching to hide memory latencies, and (4) employs a novel non-blocking and parallel resizing. In a commodity server and a memory-resident workload, DLHT surpasses 1.6B requests per second and provides 3.5x (12x) the throughput of the state-of-the-art closed-addressing (open-addressing) resizable hashtable on Gets (Deletes).
"Choosing proper type of scaling", Olena SyrotaFwdays
Imagine an IoT processing system that is already quite mature and production-ready and for which client coverage is growing and scaling and performance aspects are life and death questions. The system has Redis, MongoDB, and stream processing based on ksqldb. In this talk, firstly, we will analyze scaling approaches and then select the proper ones for our system.
What is an RPA CoE? Session 1 – CoE VisionDianaGray10
In the first session, we will review the organization's vision and how this has an impact on the COE Structure.
Topics covered:
• The role of a steering committee
• How do the organization’s priorities determine CoE Structure?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
.NET Attributes and Reflection - What a Developer Needs to Know...
1. .NET Attributes and Reflection “What a developer needs to know……” Presented By Dan Douglas Blog: http://dandouglas.wordpress.com Twitter: @Dan_Douglas E-mail: dan.douglas@gmail.com
2. What are Attributes? A .NET Object Represents data you want to associate with a target within the assembly Many possible targets, including, Assembly, Class, Member, Constructor, Enum, Interface, and Event Intrinsic Attributes (part of the CLR) Custom Attributes (developed)
3. …..Attributes Create a custom attribute by creating a class that inherits from System.Attribute Attributes are accessed by the application using reflection to get attribute information Useful to easily provide additional data to a target without having to write a lot of additional code
4. …..Attributes Multiple attributes can be assigned to a single target Many attributes in the System.ComponentModel namespace used by UI controls Provides information like Visibility, and Display Name
5.
6.
7. Reflection Usage In .NET View metadata within an assembly Type Discovery Look at types within an assembly and also be able to instantiate them and use them Late Binding Dynamically instantiate types Invoke properties and methods dynamically from dynamically instantiated classes Create your own types and IL at runtime using Reflection.Emit (advanced)
8. From a Technical Perspective… Reflection objects are available in the System.Reflection namespace Some of the classes available in the reflection namespace: Assembly ConstructorInfo MethodInfo
9. From a Technical Perspective… Some of the classes available in the reflection namespace: EventInfo PropertyInfo ParameterInfo CustomAttributeData
10. From a Technical Perspective… System.Reflection.Emit Namespace Advanced Level of Reflection Used in Very Specialized Scenarios Dynamically build assemblies and types Allows you to generate and execute.NET (IL-Intermediate Language) code on demand at runtime
11. Red Gate .NET Reflector Useful utility that uses reflection to get information about .NET assemblies Allows you to view, navigate, and search through the class hierarchies of .NET assemblies Look at the code behind the objects in .NET Framework classes or any .NET compiled components to see how they work Because reflection allows access to private members, these members are visible within .NET reflector (Demo - .NET Reflector)
12. Many Practical Uses….. Pluggable Application Architectures At runtime, load modules such as UI components into the application Business Objects Revertancel changes to a business object by cycling through its properties using reflection Quick and Dirty User Interfaces Get properties of a business object and add appropriate labels/text boxes to a form at runtime using property names
13. Reflection Performance Reflection is faster in .NET 2.0 and higher than it was in .NET 1.1 When using reflection on a server (ex: ASP.NET) special concern should be taken to ensure that performance won’t be impacted with much higher workloads In situations where you do not know the object at design time, use a standard interface when possible You can avoid further reflection calls once you have a reference to the object by calling the methods of the interface Don’t avoid reflection due to performance concerns – rather use it where it makes sense
14. Demo….. Use reflection to dynamically load an assembly located outside of the project and access and invoke one its methods
15. Resources Hanselminutes Podcast #37 – Reflectionhttp://www.hanselminutes.com/default.aspx?showID=37 O’Reilly – Programming C# Chapter 18 (Attributes And Reflection)http://oreilly.com/catalog/progcsharp/chapter/ch18.html Dodge Common Performance Pitfalls to Craft Speedy Applicationshttp://msdn.microsoft.com/en-us/magazine/cc163759.aspx Real-world Reflection in .NEThttp://www.devx.com/dotnet/Article/31578/1954 My Blog (Dan Douglas) http://dandouglas.wordpress.com
16. Questions? Dan Douglas Blog: http://dandouglas.wordpress.com Twitter: @Dan_Douglas E-mail: dan.douglas@gmail.com Consulting Inquiries? (519) 777-2258
Editor's Notes
Custom Attributes are created by the developer to be used for his or her own purpose or requirements
Reflection – we will talk about that in the upcoming slidesUseful to easily provide additional data to a target without having to write a lot of additional code-Example: An attribute that specifies what a Display or Friendly Name should be for a field or a Tooltip – this functionality can be added to the property of the class simply by using a custom attribute
Metadata - - info about the data about the types, code, assembly
-The PropertyGrid uses the information to group Properties by Category and also use a friendly display name-3rd Part Grid controls typically use Display Name to display a friendly column name
Metadata - - info about the data about the types, code, assembly
Metadata - - info about the data about the types, code, assembly
Assembly Load assemblies at runtime Locate the types used within the assemblyConstructorInfo Discover attributes of a class constructor Access to constructor metadata Invoke a ConstructorMethodInfoDiscover attributes of a method Access to method metadata Invoke a method (late binding)
CustomAttributeData – used for getting access to custom attribute information from Classes, Properties, Methods, etc
Microsoft Intermediate LanguageSome primary uses include Script Engines and CompilersThis can have a speed increase in certain scenarios – for example when doing a lot of looping within a calculation could have a speed increase if you generate IL code of the entire calculation and then just do the calculation.. No looping. Only recommended in very advanced and specialized scenarios.
|Quick and Dirty User Interfaces – could be expanded by using custom attributes that specify size, read-only, color, label name, etc
Think about how you use reflection because there is a performance hitASP.NET – There may not be a performance impact using reflection with just a few users, but it may have a largely magnified impact with higher workloads…Example: If you know the interface of the type of object you are instantiating using reflection (because you don’t know the name of the object until runtime) you can eliminate further reflection calls by casting the new instance of the Interface to an object declared of that interface type. Method calls to interface methods will not require a reflection call because you know the methods of the Interface.Don’t avoid reflection due to performance concerns – rather use it where it makes sense Even the .NET Framework uses Reflection internally in the framework.