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

  • 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
  • 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

    Everyone knows about Pearl Harbor. But we never look at the Japanese point of view. Japan had many reasons to attack America. In the 1920’s Japan’s population boomed. They had so many babies, the limited resources of food and oil in Japan couldn’t meet everyone’s needs.…

    • 1032 Words
    • 5 Pages
    Powerful 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
  • 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
  • Better Essays

    Wwi Essay

    • 867 Words
    • 4 Pages

    "The War to End All Wars!" was a common name for World War One. But when you actually take a look back at our history; did it really end all wars? No, this is quite false, as many wars have followed. Yet, many aspects of warfare were changed during this time. WWI was one of the bloodiest wars that the world has ever seen. Events taking place over a long period of time, such as imperialism, militarism, alliances and nationalism, as well as more immediate effects such as the assassination of Ferdinand, new countries involvements due to alliances, led to tension, and soon the outbreak of WWI.…

    • 867 Words
    • 4 Pages
    Better Essays
  • Better Essays

    Health Care Environments

    • 1007 Words
    • 5 Pages

    Gapenski, L.C. (2006). Accounting fundamentals for health care management. Jones and Bartlett Publishers Inc. Retrieved from University of Phoenix.…

    • 1007 Words
    • 5 Pages
    Better 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
  • 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
  • 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
  • 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
  • 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
  • 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

    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

Related Topics