Preview

Service Container C#

Good Essays
Open Document
Open Document
432 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Service Container C#
Service Container
Presented by: Anton Cherkasov
Service Providers
§ Services are the basic building blocks of the .NET design-time architecture. They help to expose access to specific features from external objects.

§ Designers and components can obtain other services through the use of service providers. A.NET service provider is represented by the System.IServiceProvider interface. The interface provides a mechanism for retrieving a specific service object, given the type of object to retrieve. Here is the only member of this interface:

object GetService(Type serviceType)

This method, when overridden, will return an object that represents the specified service type. If the service provider cannot return an object of the specified type, then callers should expect the return value to be null.

IServiceContainer Interface
§ A service container allows for services to be added and removed to it. Therefore, external objects can have more control over what a service provider exposes. A service container is actually a service provider. The interface that represents a service container is System.IServiceContainer, which is derived from IServiceProvider, as shown:

public interface IServiceContainer : IServiceProvider
IServiceContainer Interface Methods
§ Here are the two methods of this interface:

AddService: This method adds the specified service to the service container. This method has four overloads. void AddService(Type serviceType, object service); void AddService(Type serviceType, ServiceCreatorCallback callback); void AddService(Type serviceType, object service, bool promote); void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote);

RemoveService: This method removes the specified service from the service container. This method has two overloads. void RemoveService(Type serviceType); void RemoveService(Type serviceType, bool promote);
ServiceContainer Class
§ The .NET Framework comes with a class that is

You May Also Find These Documents Helpful

  • Good Essays

    SP – service provider designs and implements services and policies based on customer requirements. It manages the network operations and network design. It can use…

    • 782 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    The different types of services described in the Figure 1.2, description of each service in the cloud computing described in next section.…

    • 475 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Ittnt2670 Lesson 1

    • 489 Words
    • 2 Pages

    To create a searchable catalog of Web services on your network, you would install the __________ role.…

    • 489 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Nt1310 Unit 1 Module 2

    • 5116 Words
    • 21 Pages

    2) Requester who request and consume the service .Web services are characterized by their great interoperability and extensibility as per World Wide Web Consortium (W3C). One of the modernized uses of web service is e-learning.…

    • 5116 Words
    • 21 Pages
    Satisfactory Essays
  • Better Essays

    The second service is attestation services and an example of this is internal controls. A company may request attestation services on certain area of the company if they have concerns regarding different divisions' internal controls in certain areas, such as the accounting for inventory. The final service is assurance services and an example of this service is customer satisfaction surveys. According Wikipedia (2011), “unlike audit and attestation services that are often highly structured, assurance services tend to be customized and implemented when performed for a smaller group of decision makers within the firm” (Assurance Services. Para. 2). A customer…

    • 1066 Words
    • 5 Pages
    Better Essays
  • Good Essays

    Once you’ve known the preferred method of the service user, you have to make sure that you use it. This will help you to understand them and for them to understand…

    • 3827 Words
    • 16 Pages
    Good Essays
  • Satisfactory Essays

    Asking the service user about his needs and desired outcomes, the way he wants to be supported and the service he wants to receive. And for service provider we must to bear in mind service user background and unique characteristics to be able to bring the best support in order to meet his needs and personal goals.…

    • 397 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Services are defined as a form of business providing various types of labor services in a wide variety of business sectors and typically produce intangible products such as education, delivery services, and entertainment. Examples include a house cleaner service that provides housekeeping services, a nursing home that provides 24-hour care for geriatric patients. Furthermore, services are usually produced and consumed at the same time…

    • 1721 Words
    • 7 Pages
    Powerful Essays
  • Best Essays

    Content 1.0 Executive Summary 2.0 Introduction 3.0 The service package 4.0 Service people and the service encounter 5.0 Service Processes 6.0 Capacity management 7.0 Conclusion 8.0 Visitations 9.0 References and bibliography 10.0 Appendices…

    • 3532 Words
    • 15 Pages
    Best Essays
  • Powerful Essays

    Scott

    • 1777 Words
    • 8 Pages

    Demonstrate the use of the Services console, including starting and stopping services and configuring their Startup Types.…

    • 1777 Words
    • 8 Pages
    Powerful Essays
  • Best Essays

    JOHNSTON, R., 1999. Service Operations Management: return to roots. International Journal of Operations & Production Management, 19(2), pp. 104-124…

    • 3932 Words
    • 12 Pages
    Best Essays
  • Satisfactory Essays

    Service Blueprinting

    • 651 Words
    • 3 Pages

    The Service Blueprints overview Compiled by Marc Fonteijn - marc@31v.nl - May 2010 http://31v.nl/weblog/2010/05/the-service-blueprints-overview before you continue I don’t take any credit for the blueprints your are about to see. All the rights belong to respectfull owners. Everything you will see in the coming slides is or has been publicly available on the internet. I’ve done my best to included a refrence to the source of the example where I could.…

    • 651 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Restaurant Service Basics

    • 848 Words
    • 4 Pages

    Serving means to be useful. The working life is full of market segments, products and service providers. Service providers are people who every day make use of their ability to relate to people, proper handling of vocabulary and perseverance.…

    • 848 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Scripts

    • 1613 Words
    • 7 Pages

    To write a script, start a text editor (such as Notepad) or a script editor…

    • 1613 Words
    • 7 Pages
    Good Essays
  • Powerful Essays

    Service Outside Jurisdiction

    • 3453 Words
    • 14 Pages

    Service of a claim is the procedure used to give legal notice to a defendant of a court's exercise of its jurisdiction over the defendant, enabling them to respond to the proceedings before the court.…

    • 3453 Words
    • 14 Pages
    Powerful Essays

Related Topics