GetDefaultInstance() public method

Determine the default instance if it can. May return null.
public GetDefaultInstance ( ) : StructureMap.Pipeline.Instance
return StructureMap.Pipeline.Instance
示例#1
0
    public static InstanceFactory CreateFactoryForFamily(PluginFamily family, ProfileManager profileManager)
    {
        family.Seal();

            var factory = new InstanceFactory(family);

            Instance instance = family.GetDefaultInstance();
            if(instance != null) {
                profileManager.SetDefault(family.PluginType, instance);
            }

            return factory;
    }