Beispiel #1
0
 public void RegisterPlugin(InputConfiguration configuration, IDependencyBuilder builder)
 {
     builder.Register <IAttributeDefinitionProvider <Attribute, Type>, AttributeDefinitionProvider>();
     builder.Register <IAttributeParameterDefinitionProvider <Tuple <PropertyInfo, object>, Type>, AttributeParameterDefinitionProvider>();
     builder.Register <IClassDefinitionProvider <Type, Type>, ClassDefinitionProvider>();
     builder.Register <IEnumDefinitionProvider <Type, Type>, EnumDefinitionProvider>();
     builder.Register <IEnumValueDefinitionProvider <object, Type>, EnumValueDefinitionProvider>();
     builder.Register <IMethodDefinitionProvider <MethodInfo, Type>, MethodDefinitionProvider>();
     builder.Register <IParameterDefinitionProvider <ParameterInfo, Type>, ParameterDefinitionProvider>();
     builder.Register <IPropertyDefinitionProvider <PropertyInfo, Type>, PropertyDefinitionProvider>();
     builder.Register <IStructDefinitionProvider <Type, Type>, StructDefinitionProvider>();
     builder.Register <IObjectDefinitions <Type>, ObjectDefinitions>();
     builder.RegisterScoped <IInputService, InputService>();
 }
Beispiel #2
0
 public void RegisterPlugin(InputConfiguration configuration, IDependencyBuilder builder)
 {
     builder.Register <IAttributeProvider, AttributeProvider>();
     builder.Register <IAttributeParameterProvider, AttributeParameterProvider>();
     builder.Register <IClassProvider, ClassProvider>();
     builder.Register <IEnumProvider, EnumProvider>();
     builder.Register <IEnumValueProvider, EnumValueProvider>();
     builder.Register <IMethodProvider, MethodProvider>();
     builder.Register <IParameterProvider, ParameterProvider>();
     builder.Register <IPropertyProvider, PropertyProvider>();
     builder.Register <IStructProvider, StructProvider>();
     builder.RegisterScoped <IInputService, InputService>();
 }
        private void RegisterDependencies(IDependencyBuilder b)
        {
            //Indices
            b.Register <UserPeerIndex>().As <IUserPeerIndex>().SingleInstance();
            b.Register <PeerUserIndex>().As <IPeerUserIndex>().SingleInstance();
            b.Register <UserToGroupIndex>().SingleInstance();
            b.Register <GroupsIndex>().SingleInstance();
            b.Register <SingleNodeActionStore>().As <IActionStore>().SingleInstance();
            b.Register <SceneAuthorizationController>();
            b.Register <UserManagementConfig>(_config);

            b.Register <UserService>().As <IUserService>();
            b.Register <UserSessions>().As <IUserSessions>();
        }
Beispiel #4
0
        private void RegisterDependencies(IDependencyBuilder b)
        {
            //Indices

            //b.Register<UserToGroupIndex>().SingleInstance();
            //b.Register<GroupsIndex>().SingleInstance();
            //b.Register<SingleNodeActionStore>().As<IActionStore>().SingleInstance();
            b.Register <SceneAuthorizationController>();
            b.Register <UserSessionController>();
            b.Register <AuthenticationController>().InstancePerRequest();
            b.Register <AuthenticationService>().As <IAuthenticationService>().InstancePerRequest();

            b.Register <UserService>().As <IUserService>();

            b.Register <UserManagementConfig>().SingleInstance();
            b.Register <UsersAdminController>();
            b.Register <AdminWebApiConfig>().As <IAdminWebApiConfig>();

            b.Register <UserSessionCache>().AsSelf().InstancePerScene();
            b.Register <PlatformSpecificServices>().As <IPlatformSpecificServices>();
        }
Beispiel #5
0
        private void SceneDependenciesRegistration(IDependencyBuilder builder, ISceneHost scene)
        {
            string kind;

            if (scene.Metadata.TryGetValue(METADATA_KEY, out kind))
            {
                MatchmakingConfig config;
                if (Configs.TryGetValue(kind, out config))
                {
                    config.RegisterDependencies(builder);
                }
            }
            builder.Register <MatchmakingService>().As <IMatchmakingService>().InstancePerScene();
        }
Beispiel #6
0
 private void RegisterSceneDependencies(IDependencyBuilder b, ISceneHost scene)
 {
     if (scene.Template == SCENE_TEMPLATE)
     {
         b.Register <UserSessions>().As <IUserSessions>();
         b.Register <UserPeerIndex>().As <IUserPeerIndex>().SingleInstance();
         b.Register <PeerUserIndex>().As <IPeerUserIndex>().SingleInstance();
         b.Register <DeviceIdentifierAuthenticationProvider>().As <IAuthenticationProvider>();
         b.Register <AdminImpersonationAuthenticationProvider>().As <IAuthenticationProvider>();
         b.Register <CredentialsRenewer>().AsSelf().As <IAuthenticationEventHandler>().SingleInstance();
     }
     else
     {
         b.Register <UserSessionsProxy>(dr => new UserSessionsProxy(
                                            dr.Resolve <ISceneHost>(),
                                            dr.Resolve <ISerializer>(),
                                            dr.Resolve <IEnvironment>(),
                                            dr.Resolve <IServiceLocator>(),
                                            dr.Resolve <UserSessionCache>()))
         .As <IUserSessions>().InstancePerRequest();
     }
 }
Beispiel #7
0
 public void RegisterPlugin(OutputConfiguration configuration, IDependencyBuilder builder)
 {
     builder.Register <ITemplateService, TemplateService>();
     builder.Register <ITemplate, Template>();
     builder.Register <IOutputService, OutputService>();
 }
 private static void RegisterHost(IDependencyBuilder builder)
 {
     builder.Register <ConfigurationService>().SingleInstance();
     builder.Register <EnvironmentConfiguration>().As <IConfiguration>();
 }
 private void RegisterDependencies(IDependencyBuilder builder)
 {
     builder.Register <SteamService>().As <ISteamService>().InstancePerScene();
 }