[go: up one dir, main page]

0% found this document useful (0 votes)
37 views1 page

Delegates Are Especially Used For Implementing Events: Role Based Security Code Access Security

A delegate is a reference type variable that holds a reference to a method. Delegates allow methods to be passed as arguments to other methods and returned as the value of functions. C# provides four access modifiers: private, public, protected, internal, and two combinations protected-internal and private-protected, with public being the default. Dependency injection is a technique for achieving loose coupling between application components by supplying dependencies externally rather than hardcoding them internally.

Uploaded by

naveensigned
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

Delegates Are Especially Used For Implementing Events: Role Based Security Code Access Security

A delegate is a reference type variable that holds a reference to a method. Delegates allow methods to be passed as arguments to other methods and returned as the value of functions. C# provides four access modifiers: private, public, protected, internal, and two combinations protected-internal and private-protected, with public being the default. Dependency injection is a technique for achieving loose coupling between application components by supplying dependencies externally rather than hardcoding them internally.

Uploaded by

naveensigned
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

A delegate is a reference type variable that holds the REST Service SOAP Service

reference to a method
CRUD operations Any operations
Delegates are especially used for implementing events • Operates on Entities • Not limited to Entities
and the call-back methods. All delegates are implicitly
• JSON/XML/HTML/Markdown/… • XML
derived from the System. Delegate class
• Low overhead • High overhead
C# provides four types of access modifiers: private,
• Request/Response • Request/Response, Fire & Forget,
public, protected, internal, and two combinations:
protected-internal and private-protected. • No discovery & routing Bi-Directional Calls

• Incomplete standard • Standard discovery & routing

What To Cache Where To Cache?


• UI Pages/UI components • Local memory
• Service output • State server
• Business Entities • File system
• Business State • Database
• Data query results
• Configuration data
How To Manage The Cache? How To Fill The Cache
Expiration strategy: • Proactive Loading
• Time-based • Static data
Default access modifier in C# is Public • Event-based • Known update frequency
• Flush strategy: • Known size
Ref type: Object that stores references to the actual data
• Manual • Reactive Loading
Eg. Classes, interface, delegates, object, string
• Automatic: • Volatile data
Value type: Objects that actually holds value • Least Recently Used • Unknown lifetime
e.g, enum, bool, int, numeric, struct • Least Frequently Used • Large data volume
• Priority • Fast caching medium
Boxing: converts value type to the type object
eg, int i = 123; object o = i;

Unboxing: Extracts the value type object from object


eg, o = 456; i = (int) o;

Dependency Injection: Ability to supply external dependency


in some component

 Object creation on the fly


 Constructor, property, method dependency
 3rd party DIs: Spring.Net, castle Windsor, Ninject

Filters in MVC:

 Authentication
 Authorization
 Action
 Result
 Exception

Request Response pipeline in MVC:

Authentical filter  authorisation filter  model binding


 Action filter  Action method  Action filters (on
action executed)  Result filters  Exception filters

Code Access Security: .NET has two kinds of security:

1. Role Based Security


2. Code Access Security

You might also like