public override void Register(IServiceRegister register)
 {
     //Register the protobufnet serializers
     register.Register <ProtobufnetSerializerStrategy>(this.getFlags(), typeof(ISerializerStrategy));
     register.Register <ProtobufnetDeserializerStrategy>(this.getFlags(), typeof(IDeserializerStrategy));
     register.Register <ProtobufnetRegistry>(this.getFlags(), typeof(ISerializerRegistry));
 }
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new System.ArgumentNullException(nameof(serviceRegister));
            }

            serviceRegister.Register(typeof(IUserSession), typeof(UserSession), ServiceLifetime.Scoped);
            serviceRegister.Register(typeof(UserSession), typeof(UserSession), ServiceLifetime.Scoped);
        }
예제 #3
0
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new System.ArgumentNullException(nameof(serviceRegister));
            }

            serviceRegister.Register(typeof(ISendTemplates), typeof(EmailTemplateRepository), ServiceLifetime.Scoped);
            serviceRegister.Register(typeof(IQueueAndSendMail), typeof(EmailService), ServiceLifetime.Scoped);
            serviceRegister.Register(typeof(IQueueAndSendMail), typeof(EmailService), ServiceLifetime.Scoped);
            serviceRegister.Register(typeof(ISendMail), typeof(EmailService), ServiceLifetime.Scoped);
            serviceRegister.Register(typeof(EmailRenderer), typeof(EmailRenderer), ServiceLifetime.Scoped);
        }
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new ArgumentNullException(nameof(serviceRegister));
            }

            serviceRegister.Register(typeof(MessageBus), typeof(MessageBus), ServiceLifetime.Transient);

            foreach (Type t in TypeFactory.GetAllImplementations(typeof(IMessageHandler <>)))
            {
                serviceRegister.Register(t, t, ServiceLifetime.Scoped);
            }
        }
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new ArgumentNullException(nameof(serviceRegister));
            }

            foreach (Type t in TypeFactory.GetDerivedTypes(typeof(Entity)))
            {
                Type genericProviderType = typeof(ISecurityProvider <>).MakeGenericType(t);

                serviceRegister.Register(genericProviderType, typeof(PermissionableEntitySecurityProvider), ServiceLifetime.Scoped);
            }

            serviceRegister.Register(typeof(ISecurityProvider <Entity>), typeof(PermissionableEntitySecurityProvider), ServiceLifetime.Scoped);
        }
예제 #6
0
        public override void Register(IServiceRegister register)
        {
            //Just create a new collection and register it
            NetworkEntityCollection entityCollection = new NetworkEntityCollection();

            register.Register(entityCollection, this.getFlags());
        }
예제 #7
0
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new ArgumentNullException(nameof(serviceRegister));
            }

            serviceRegister.Register((IServiceProvider ServiceProvider) =>
            {
                CookieOptions option = new CookieOptions
                {
                    Expires = DateTime.Now.AddDays(-10)
                };

                HttpContext context = ServiceProvider.GetService <HttpContext>();

                ISession session = context.Session;

                TeaEncryptor tea = new TeaEncryptor(session.Get(SecurityService.SECURITY_TOKEN_PASSWORD_NAME));

                string fingerPrintJson = tea.Decrypt(context.Request.Cookies["X-Session"]);

                SecurityToken securityToken = JsonConvert.DeserializeObject <SecurityToken>(fingerPrintJson);

                context.Response.Cookies.Append("X-Session", "", option);

                return(securityToken);
            }, ServiceLifetime.Singleton);
        }
예제 #8
0
 /// <summary>
 ///     Enables support of using multiple channels for clients operations
 /// </summary>
 /// <param name="serviceRegister">The register</param>
 /// <param name="channelsCount">Max count of channels</param>
 public static IServiceRegister EnableMultiChannelClientCommandDispatcher(
     this IServiceRegister serviceRegister, int channelsCount
     )
 {
     return(serviceRegister.Register <IClientCommandDispatcher>(
                x => new MultiChannelClientCommandDispatcher(channelsCount, x.Resolve <IPersistentChannelFactory>())
                ));
 }
예제 #9
0
    public override void Register(IServiceRegister register)
    {
        //Let's supply an instance of some made-up Resource management class that is a singleton.
        //get flags is a protected method that supplies the flag enum setup in the inspector for registering.
        register.Register(ResourceLoader.instance, this.getFlags());         //This is all that is needed.

        //The below is an example of another way to register a depedency. It is not another line that is required when the above exists.

        //Optionally you may want to register it like this, indicating specifically the Type to register the service as.
        register.Register(ResourceLoader.instance, this.getFlags(), typeof(ICharacterModelService));

        //The below is an example of another way to register a depedency. It is not another line that is required when the above exists.

        //Alternatively you can register a Type, without an instance, as a depedency. This will be created by the container on-demand.
        //If you set a flag to indicate one per dependency or only a single instance it will adhere to those flags.
        register.Register <SkyBoxController>(this.getFlags(), typeof(IWeatherService));        //This type parameter is optional as well. Without a type or a proper flag it will assume you want to register AsSelf.
    }
예제 #10
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.Configure <CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded    = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            ////???需要注入的服务在 InjectionService.AdmServiceRegister.Register方法内注入即可
            /// //services.AddScoped<IParaReferRepository(接口), ParaReferRepository(实现类)>();

            services.Configure <CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded    = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            //数据库连接
            var conStr = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build()["ConnectionStrings:SqlServerConnectiion"];

            services.AddDbContext <DccyDbContext>(options => options.UseSqlServer(conStr), ServiceLifetime.Scoped);

            //注入配置类
            services.AddOptions();
            services.Configure <AppSetting>(Configuration.GetSection("AppSetting"));

            #region 批量注入
            //外部注入
            string strValue = Configuration.GetSection("Appsetings").GetSection("key").Value;
            foreach (var item in GetClassName(strValue))
            {
                foreach (var typeArray in item.Value)
                {
                    services.AddScoped(typeArray, item.Key);
                }
            }

            //内部注入
            IEnumerable <Type> serviceList = AppDomain.CurrentDomain.GetAssemblies()
                                             .SelectMany(m => m.GetTypes()).Select(m => m.GetTypeInfo())
                                             .Where(m => !m.IsAbstract &&
                                                    !m.IsInterface &&
                                                    typeof(IServiceRegister).GetTypeInfo().IsAssignableFrom(m));

            foreach (Type type in serviceList)
            {
                IServiceRegister register = Activator.CreateInstance(type, true) as IServiceRegister;
                register.Register(services);
            }
            #endregion

            services.AddDistributedMemoryCache();
            services.AddSession();

            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
        }
예제 #11
0
        /// <summary>
        /// Registers dependencies for this assembly
        /// </summary>
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new System.ArgumentNullException(nameof(serviceRegister));
            }

            serviceRegister.Register <IViewRenderService, ViewRenderService>(ServiceLifetime.Scoped);
        }
예제 #12
0
 public static IServiceRegister EnableDeadLetterExchangeAndMessageTtlScheduler(this IServiceRegister serviceRegister)
 {
     return(serviceRegister.Register <IScheduler>(
                x => new DeadLetterExchangeAndMessageTtlScheduler(
                    x.Resolve <IAdvancedBus>(),
                    x.Resolve <IConventions>(),
                    x.Resolve <IMessageDeliveryModeStrategy>()
                    )
                ));
 }
예제 #13
0
        public override void Register(IServiceRegister register)
        {
            //Chain handling semantics are preferable on the client.
            //No reason multiple handlers should be consuming the same packets, complications things
            //Put it infront of the handling process if you want that functionality
            ChainMessageHandlerStrategy <InstanceClientSession, IRequestMessage> chainHandler = new ChainMessageHandlerStrategy <InstanceClientSession, IRequestMessage>(FindHandlersInScene());

            //generics are semi-limited in .Net when trying to construct an instance of the type so we put the requirement for inheritors to create the instance.
            register.Register <RequestMessageHandlerService <InstanceClientSession> >(new RequestMessageHandlerService <InstanceClientSession>(chainHandler), getFlags(), typeof(IRequestMessageHandlerService <InstanceClientSession>));
        }
		public override void Register(IServiceRegister register)
		{
			//Chain handling semantics are preferable on the client.
			//No reason multiple handlers should be consuming the same packets, complications things
			//Put it infront of the handling process if you want that functionality
			ChainMessageHandlerStrategy<TPeerType, TNetworkMessageType> chainHandler = new ChainMessageHandlerStrategy<TPeerType, TNetworkMessageType>(FindHandlersInScene());

			//generics are semi-limited in .Net when trying to construct an instance of the type so we put the requirement for inheritors to create the instance.
			register.Register<THandlerServiceTypeConcrete>(CreateConcreteService(chainHandler), ComputeFlags(), typeof(THandlerServiceTypeServiceInterface));
		}
        private static void RecursiveRegisterRepository(IServiceRegister serviceRegister, Type RepositoryType)
        {
            serviceRegister.Register(RepositoryType, RepositoryType, ServiceLifetime.Transient);

            RegisterInterfaces(serviceRegister, RepositoryType);

            Type baseType = RepositoryType.BaseType;

            while (baseType != null)
            {
                if (!baseType.IsGenericTypeDefinition)
                {
                    StaticLogger.Log($"PPDI: Registering repository for {baseType} => {RepositoryType}", StaticLogger.LoggingLevel.Call);

                    serviceRegister.Register(baseType, RepositoryType, ServiceLifetime.Transient);
                }

                baseType = baseType.BaseType;
            }
        }
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new ArgumentNullException(nameof(serviceRegister));
            }

            foreach (Type workerType in TypeFactory.GetAllImplementations <IWorker>())
            {
                serviceRegister.Register(workerType, workerType, ServiceLifetime.Scoped);
            }
        }
        public void RegisterDependencies(IServiceRegister serviceRegister)
        {
            if (serviceRegister is null)
            {
                throw new ArgumentNullException(nameof(serviceRegister));
            }

            foreach (Type controllerType in TypeFactory.GetDerivedTypes(typeof(Controller)))
            {
                serviceRegister.Register(controllerType, controllerType, ServiceLifetime.Scoped);
            }
        }
        private static void RegisterInterfaces(IServiceRegister serviceRegister, Type RepositoryType)
        {
            foreach (Type i in RepositoryType.GetInterfaces())
            {
                if (i.IsGenericType && i.IsAssignableFrom(RepositoryType))
                {
                    StaticLogger.Log($"PPDI: Registering repository for {i} => {RepositoryType}", StaticLogger.LoggingLevel.Call);

                    serviceRegister.Register(i, RepositoryType, ServiceLifetime.Transient);
                }
            }
        }
예제 #19
0
        //We should try to locate this object in the scene
        public override void Register(IServiceRegister register)
        {
            //It should be in the scene hopefully
            LoginDetailsSceneData loginDetails = MonoBehaviour.FindObjectOfType <LoginDetailsSceneData>();

            if (loginDetails == null)
            {
                throw new Exception($"{nameof(loginDetails)} of type {nameof(LoginDetailsSceneData)} could not be found in the scene.");
            }

            register.Register(loginDetails, getFlags(), typeof(ILoginDetails));
        }
예제 #20
0
        /// <summary>
        ///     Registers the default EasyNetQ components
        /// </summary>
        /// <param name="serviceRegister">The register</param>
        public static void RegisterDefaultServices(this IServiceRegister serviceRegister)
        {
            Preconditions.CheckNotNull(serviceRegister, "container");

            // Note: IConnectionConfiguration gets registered when RabbitHutch.CreateBus(..) is run.
            // default service registration
            serviceRegister
            .Register <IConnectionStringParser, ConnectionStringParser>()
            .Register <ISerializer>(_ => new JsonSerializer())
            .Register <IConventions, Conventions>()
            .Register <IEventBus, EventBus>()
            .Register <ITypeNameSerializer, DefaultTypeNameSerializer>()
            .Register <ICorrelationIdGenerationStrategy, DefaultCorrelationIdGenerationStrategy>()
            .Register <IMessageSerializationStrategy, DefaultMessageSerializationStrategy>()
            .Register <IMessageDeliveryModeStrategy, MessageDeliveryModeStrategy>()
            .Register(new AdvancedBusEventHandlers())
            .Register <IProduceConsumeInterceptor, DefaultInterceptor>()
            .Register <IConsumerDispatcherFactory, ConsumerDispatcherFactory>()
            .Register <IExchangeDeclareStrategy, DefaultExchangeDeclareStrategy>()
            .Register <IConsumerErrorStrategy, DefaultConsumerErrorStrategy>()
            .Register <IErrorMessageSerializer, DefaultErrorMessageSerializer>()
            .Register <IHandlerRunner, HandlerRunner>()
            .Register <IInternalConsumerFactory, InternalConsumerFactory>()
            .Register <IConsumerFactory, ConsumerFactory>()
            .Register(c =>
            {
                var connectionConfiguration = c.Resolve <ConnectionConfiguration>();
                return(ConnectionFactoryFactory.CreateConnectionFactory(connectionConfiguration));
            })
            .Register <IClientCommandDispatcher, SingleChannelClientCommandDispatcher>()
            .Register <IPersistentConnection, PersistentConnection>()
            .Register <IPersistentChannelFactory, PersistentChannelFactory>()
            .Register <IPublishConfirmationListener, PublishConfirmationListener>()
            .Register <IHandlerCollectionFactory, HandlerCollectionFactory>()
            .Register <IPullingConsumerFactory, PullingConsumerFactory>()
            .Register <IAdvancedBus, RabbitAdvancedBus>()
            .Register <IPubSub, DefaultPubSub>()
            .Register <IRpc, DefaultRpc>()
            .Register <ISendReceive, DefaultSendReceive>()
            .Register <IScheduler>(
                x => new DeadLetterExchangeAndMessageTtlScheduler(
                    x.Resolve <ConnectionConfiguration>(),
                    x.Resolve <IAdvancedBus>(),
                    x.Resolve <IConventions>(),
                    x.Resolve <IMessageDeliveryModeStrategy>(),
                    x.Resolve <IExchangeDeclareStrategy>()
                    )
                )
            .Register <IBus, RabbitBus>();
        }
        public static IServiceRegister UseMessageHandlerPolicy(this IServiceRegister registrar, Policy policy)
        {
            if (registrar == null)
            {
                throw new ArgumentNullException(nameof(registrar));
            }

            if (policy == null)
            {
                throw new ArgumentNullException(nameof(policy));
            }

            registrar.Register <IHandlerRunner>(services => new PollyHandlerRunner(services.Resolve <IConsumerErrorStrategy>(), policy));

            return(registrar);
        }
        public override void Register(IServiceRegister register)
        {
#if DEBUG || DEBUGBUILD
            Debug.Log(ptcLoginUrlDetails.ToString());
#endif
            //create the details map
            Dictionary <AuthType, LoginUrlDetails> authDetailsMap = new Dictionary <AuthType, LoginUrlDetails>()
            {
                { AuthType.PTC, ptcLoginUrlDetails },
                { AuthType.Google, googleLoginUrlDetails }
            };

            UserAuthServiceFactory factory = new UserAuthServiceFactory(authDetailsMap);

            register.Register(factory, getFlags(), typeof(IUserAuthServiceFactory));
        }
예제 #23
0
        public static IServiceRegister EnableMessageMetaDataBinding(this IServiceRegister registrar)
        {
            if (registrar == null)
            {
                throw new ArgumentNullException("registrar");
            }

            registrar.Register <IMessageSerializationStrategy>(services =>
                                                               new MetaDataMessageSerializationStrategy(
                                                                   services.Resolve <ITypeNameSerializer>(),
                                                                   services.Resolve <ISerializer>(),
                                                                   services.Resolve <ICorrelationIdGenerationStrategy>()
                                                                   )
                                                               );

            return(registrar);
        }
예제 #24
0
        /// <summary>
        /// Registers components of a <see cref="RabbitBus"/>.
        /// </summary>
        /// <param name="serviceRegister"/>
        /// <param name="connectionConfigurationFactory">
        /// A factory of <see cref="ConnectionConfiguration"/> instance.
        /// </param>
        /// <param name="registerServices">
        /// Override default services. For example, to override the default <see cref="ISerializer"/>:
        /// RabbitHutch.CreateBus("host=localhost", x => x.Register{ISerializer}(mySerializer));
        /// </param>
        /// <returns>
        /// A new <see cref="RabbitBus"/> instance.
        /// </returns>
        public static void RegisterBus(IServiceRegister serviceRegister,
                                       Func <IServiceResolver, ConnectionConfiguration> connectionConfigurationFactory,
                                       Action <IServiceRegister> registerServices)
        {
            Preconditions.CheckNotNull(serviceRegister, "serviceRegister");
            Preconditions.CheckNotNull(connectionConfigurationFactory, "connectionConfiguration");
            Preconditions.CheckNotNull(registerServices, "registerServices");

            serviceRegister.Register(c =>
            {
                var connectionConfiguration = connectionConfigurationFactory.Invoke(c);
                connectionConfiguration.Validate();
                return(connectionConfiguration);
            });

            serviceRegister.RegisterDefaultServices();
            registerServices(serviceRegister);
        }
        public static IServiceRegister EnableElasticApmTracing(this IServiceRegister serviceRegister)
        {
            if (serviceRegister == null)
            {
                throw new ArgumentNullException(nameof(serviceRegister));
            }

            serviceRegister.Register <IAdvancedBus>(c =>
                                                    new ElasticApmAdvancedBus(c.Resolve <IConnectionFactory>(), c.Resolve <IConsumerFactory>(),
                                                                              c.Resolve <IClientCommandDispatcherFactory>(), c.Resolve <IPublishConfirmationListener>(),
                                                                              c.Resolve <IEventBus>(), c.Resolve <IHandlerCollectionFactory>(),
                                                                              c.Resolve <IServiceResolver>(), c.Resolve <ConnectionConfiguration>(),
                                                                              c.Resolve <IProduceConsumeInterceptor>(), c.Resolve <IMessageSerializationStrategy>(),
                                                                              c.Resolve <IConventions>(), c.Resolve <AdvancedBusEventHandlers>(),
                                                                              c.Resolve <IPersistentConnectionFactory>(), c.Resolve <ILogProvider>()));

            return(serviceRegister);
        }
        public static void RegisterDefaultServices(this IServiceRegister container)
        {
            Preconditions.CheckNotNull(container, "container");

            // Note: IConnectionConfiguration gets registered when RabbitHutch.CreateBus(..) is run.

            // default service registration
            container
            .Register <IConnectionStringParser, ConnectionStringParser>()
            .Register <ISerializer>(_ => new JsonSerializer())
            .Register <IConventions, Conventions>()
            .Register <IEventBus, EventBus>()
            .Register <ITypeNameSerializer, DefaultTypeNameSerializer>()
            .Register <ICorrelationIdGenerationStrategy, DefaultCorrelationIdGenerationStrategy>()
            .Register <IMessageSerializationStrategy, DefaultMessageSerializationStrategy>()
            .Register <IMessageDeliveryModeStrategy, MessageDeliveryModeStrategy>()
            .Register <ITimeoutStrategy, TimeoutStrategy>()
            .Register <IClusterHostSelectionStrategy <ConnectionFactoryInfo>, RandomClusterHostSelectionStrategy <ConnectionFactoryInfo> >()
            .Register(AdvancedBusEventHandlers.Default)
            .Register <IProduceConsumeInterceptor, DefaultInterceptor>()
            .Register <IConsumerDispatcherFactory, ConsumerDispatcherFactory>()
            .Register <IExchangeDeclareStrategy, DefaultExchangeDeclareStrategy>()
            .Register <IConsumerErrorStrategy, DefaultConsumerErrorStrategy>()
            .Register <IErrorMessageSerializer, DefaultErrorMessageSerializer>()
            .Register <IHandlerRunner, HandlerRunner>()
            .Register <IInternalConsumerFactory, InternalConsumerFactory>()
            .Register <IConsumerFactory, ConsumerFactory>()
            .Register <IConnectionFactory, ConnectionFactoryWrapper>()
            .Register <IPersistentChannelFactory, PersistentChannelFactory>()
            .Register <IPersistentConnectionFactory, PersistentConnectionFactory>()
            .Register <IClientCommandDispatcherFactory, ClientCommandDispatcherFactory>()
            .Register <IPublishConfirmationListener, PublishConfirmationListener>()
            .Register <IHandlerCollectionFactory, HandlerCollectionFactory>()
            .Register <IAdvancedBus, RabbitAdvancedBus>()
            .Register <IRpc, Rpc>()
            .Register <ISendReceive, SendReceive>()
            .Register <IScheduler>(
                x => new DeadLetterExchangeAndMessageTtlScheduler(
                    x.Resolve <IAdvancedBus>(), x.Resolve <IConventions>(), x.Resolve <IMessageDeliveryModeStrategy>()
                    )
                )
            .Register <IBus, RabbitBus>();
        }
예제 #27
0
        /// <summary>
        /// Enable reporting message consumer errors to Exceptionless.
        /// </summary>
        /// <param name="serviceRegister">Extension instance.</param>
        /// <param name="client">Optional Exceptionless client. Defaults to ExceptionlessClient.Default.</param>
        /// <param name="intercept">Optional interceptor hook, allowing you to customize the exceptionless event.</param>
        /// <returns>Extension instance.</returns>
        /// <exception cref="ArgumentNullException">
        /// Thrown if the value passed to the <paramref name="serviceRegister"/> parameter is <c>null</c>.
        /// </exception>
        public static IServiceRegister EnableExceptionless(this IServiceRegister serviceRegister, ExceptionlessClient client = null, Action <EventBuilder, ConsumerExecutionContext> intercept = null)
        {
            if (serviceRegister == null)
            {
                throw new ArgumentNullException(nameof(serviceRegister));
            }

            serviceRegister.Register <IConsumerErrorStrategy>(services => new ExceptionlessConsumerErrorStrategy(
                                                                  services.Resolve <IConnectionFactory>(),
                                                                  services.Resolve <ISerializer>(),
                                                                  services.Resolve <IEasyNetQLogger>(),
                                                                  services.Resolve <IConventions>(),
                                                                  services.Resolve <ITypeNameSerializer>(),
                                                                  services.Resolve <IErrorMessageSerializer>(),
                                                                  client,
                                                                  intercept
                                                                  ));

            return(serviceRegister);
        }
        public override void Register(IServiceRegister register)
        {
            //Just create a new collection and register it
            NetworkEntityCollection             entityCollection = new NetworkEntityCollection();
            IncrementalNetworkGuidFactory       guidFactory      = new IncrementalNetworkGuidFactory();
            NetPeerCollection                   peerCollection   = new NetPeerCollection();
            ConnectionToPlayerGuidLookupService lookupService    = new ConnectionToPlayerGuidLookupService();

            register.Register(entityCollection, RegistrationType.SingleInstance, null);
            register.Register(guidFactory, RegistrationType.SingleInstance, typeof(INetworkGuidFactory));
            register.Register(peerCollection, RegistrationType.SingleInstance, typeof(IReadonlyPeerCollection));
            register.Register(peerCollection, RegistrationType.SingleInstance, typeof(IPeerCollection));
            register.Register(lookupService, RegistrationType.SingleInstance, typeof(IConnectionToGuidLookupService));
            register.Register(lookupService, RegistrationType.SingleInstance, typeof(IConnectionToGuidRegistry));
        }
예제 #29
0
 public static IServiceRegister EnableExternalScheduler(this IServiceRegister serviceRegister)
 {
     return(serviceRegister.Register <IScheduler, ExternalScheduler.ExternalScheduler>());
 }
예제 #30
0
 public static void Transient <TService>(this IServiceRegister register)
 {
     register.Register(typeof(TService), typeof(TService), ServiceLifetime.Transient);
 }