Skip to content

Instantly share code, notes, and snippets.

@developerdame
Created August 31, 2010 21:48
Show Gist options
  • Save developerdame/559814 to your computer and use it in GitHub Desktop.
Save developerdame/559814 to your computer and use it in GitHub Desktop.
public class WebserviceWrapper : IWebserviceWrapper
{
public static Dictionary<string, string> States;
public readonly object _locker = new object();
public string GetStateName(string statecode)
{
lock(_locker)
{
if(States.HasKey(statecode))
return state.value;
else
States[statecode] = LookupStateName(statecode);
}
}
Public string LookupStateName(string statecode)
{
var service = new StateLookupWebService();
return service.LookupStateName(statecode);
}
}
public interface IWrapWebservice
{
string GetStateName(string statecode)
string LookupStateName(string statecode)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment