示例#1
0
        public static IConfigurationBuilder UseUnity(this IConfigurationBuilder configurationBuilder, Action<IUnityBuilder> configure)
        {
            var options = new UnityOptions();
            var starter = new UnityStarter(options);

            if (configure != null)
            {
                var builder = new UnityBuilder(options);
                configure(builder);
            }

            configurationBuilder.ExcludeName("Microsoft.Practices");
            configurationBuilder.Use(starter);

            return configurationBuilder;
        }
示例#2
0
 public UnityStarter(UnityOptions options)
 {
     _options = options;
 }
示例#3
0
 public UnityBuilder(UnityOptions options)
 {
     _options = options;
 }
示例#4
0
 public UnityStarter(UnityOptions options)
 {
     _options = options;
 }
示例#5
0
 public UnityBuilder(UnityOptions options)
 {
     _options = options;
 }