Mar 9, 2015 at 12:21 PM

1)IStudyService studyService3 = ServiceLocator.Current.GetInstance<IStudyService>();
What would be the StructureMap.IContext.RequestedName in the above call , when we go with empty key?
Will it be null or wmpty?

Key Note:
IStudyService studyService2 = ServiceLocator.Current.GetInstance<IStudyService>"localhost");
In the above condition StructureMap.IContext.RequestedName will be "localhost" which was given as key.

But in the first condition what would be the RequestedName?

The question is raised due to this below situation

If(context =>
        return (String.IsNullOrEmpty(context.RequestedName) ||
          context.RequestedName.Equals("localhost", StringComparison.OrdinalIgnoreCase) ||
when we are checking the context.RequestedName with null or empty the above check fails as i mentioned earlier.

Thanks in advance