Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8918265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:42:29+00:00 2026-06-15T05:42:29+00:00

I am following this link: http://codebetter.com/jpboodhoo/2007/10/15/the-static-gateway-pattern/ to understand the Gateway pattern. The author shares

  • 0

I am following this link:
http://codebetter.com/jpboodhoo/2007/10/15/the-static-gateway-pattern/
to understand the Gateway pattern.

The author shares a sample of the “gateway” logger class and related interfaces:

public class Log
{
    private static ILogFactory logFactory;

    public static void InitializeLogFactory(ILogFactory logFactory)
    {
        Log.logFactory = logFactory;
    }

    public void InformationalMessage(string informationalMessage)
    {
        logFactory.Create().InformationalMessage(informationalMessage);
    }
}

public interface ILogFactory
{
    ILog Create();
}

public interface ILog
{
    void InformationalMessage(string message);
}

This is the calling API

public class Calculator
{                
public int Add(int number1,int number2)
{
Log.InformationalMessage("About to add two numbers");            
return number1 + number2;
}
}

I am unable to understand where the initialization of the concrete logging class happens here. What is the entry point of the gateway?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:42:30+00:00Added an answer on June 15, 2026 at 5:42 am

    With regards to concrete implementation of the Interfaces, there are examples at the bottom of the article which show how it can be implemented.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want a URL pattern for the following where this link - http://www.test.com/xyz/31052012/xyz_number.jpg will
Refer to this link http://support.google.com/webmasters/bin/answer.py?hl=en&answer=76329 I don't understand the following Paragraph. Can you illustarte
I am trying to model this relationship following this link http://www.javaworld.com/javaworld/jw-01-2008/images/datamodel.gif Its the usual
I have tried to do this refering to following link. http://skypher.com/index.php/2008/07/28/function-list-for-php/ But no success.
The following quote is from this link: http://apidocs.meego.com/1.2-preview/qtmobility/qgeopositioninfosource.html#createDefaultSource Creates and returns a position source
I am trying to enable SQL Debugging following this link http://msdn.microsoft.com/en-us/library/ms165038%28VS.80%29.aspx but i can't
I am following this link to do a ViewPager http://blog.stylingandroid.com/archives/537 I managed to get
following this link http://www.codeproject.com/KB/cs/MDITabBrowsing.aspx I made MDI and things are working well. But I
I've been following this link http://msdn.microsoft.com/en-us/library/ms731049.aspx for using WCF and ASP.NET MEmbership provider. However
I've been trying to actionbarsherlock with google maps. Following this youtube link(http://www.youtube.com/watch?v=avcp6eD_X2k), I've managed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.