예제 #1
0
        public XBakesConnector(IConfigSource config, IHttpServer server, string configName) :
                base(config, server, configName)
        {
            if (configName != String.Empty)
                m_ConfigName = configName;

            IConfig serverConfig = config.Configs[m_ConfigName];
            if (serverConfig == null)
                throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));

            string assetService = serverConfig.GetString("LocalServiceModule",
                    String.Empty);

            if (assetService == String.Empty)
                throw new Exception("No BakedTextureService in config file");

            Object[] args = new Object[] { config };
            m_BakesService =
                    ServerUtils.LoadPlugin<IBakedTextureService>(assetService, args);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);
            
            server.AddStreamHandler(new BakesServerGetHandler(m_BakesService, auth));
            server.AddStreamHandler(new BakesServerPostHandler(m_BakesService, auth));
        }
예제 #2
0
        public XBakesConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            if (configName != String.Empty)
            {
                m_ConfigName = configName;
            }

            IConfig serverConfig = config.Configs[m_ConfigName];

            if (serverConfig == null)
            {
                throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
            }

            string assetService = serverConfig.GetString("LocalServiceModule",
                                                         String.Empty);

            if (assetService == String.Empty)
            {
                throw new Exception("No BakedTextureService in config file");
            }

            Object[] args = new Object[] { config };
            m_BakesService =
                ServerUtils.LoadPlugin <IBakedTextureService>(assetService, args);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);

            server.AddStreamHandler(new BakesServerGetHandler(m_BakesService, auth));
            server.AddStreamHandler(new BakesServerPostHandler(m_BakesService, auth));
        }
예제 #3
0
        public XBakesConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            if (configName != string.Empty)
            {
                m_ConfigName = configName;
            }

            IConfig serverConfig = config.Configs[m_ConfigName];

            if (serverConfig == null)
            {
                throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
            }

            string bakesServiceName = serverConfig.GetString("LocalServiceModule", string.Empty);

            if (string.IsNullOrWhiteSpace(bakesServiceName))
            {
                throw new Exception("No BakedTextureService in config file");
            }

            object[]             args         = new object[] { config };
            IBakedTextureService bakesService = ServerUtils.LoadPlugin <IBakedTextureService>(bakesServiceName, args);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);

            server.AddSimpleStreamHandler(new BakesServerHandler(bakesService, auth), true);
        }
 public BakesServerPostHandler(IBakedTextureService service) :
         base("POST", "/bakes")
 {
     m_BakesService = service;
 }
예제 #5
0
 public BakesServerPostHandler(IBakedTextureService service, IServiceAuth auth) :
     base("POST", "/bakes", auth)
 {
     m_BakesService = service;
 }
예제 #6
0
 public BakesServerPostHandler(IBakedTextureService service, IServiceAuth auth) :
         base("POST", "/bakes", auth)
 {
     m_BakesService = service;
 }
예제 #7
0
 public BakesServerPostHandler(IBakedTextureService service) :
     base("POST", "/bakes")
 {
     m_BakesService = service;
 }
 public BakesServerGetHandler(IBakedTextureService service) :
         base("GET", "/bakes")
 {
     m_BakesService = service;
 }
 public BakesServerGetHandler(IBakedTextureService service) :
     base("GET", "/bakes")
 {
     m_BakesService = service;
 }