Пример #1
0
        /// <summary>
        /// Add a StreamHost
        /// </summary>
        /// <param name="jid"></param>
        /// <param name="host"></param>
        /// <param name="port"></param>
        /// <param name="zeroconf"></param>
        /// <returns></returns>
        public StreamHost AddStreamHost(Jid jid, string host, int port, string zeroconf)
        {
            StreamHost sh = new StreamHost(jid, host, port, zeroconf);

            AddChild(sh);
            return(sh);
        }
Пример #2
0
        /// <summary>
        /// Add a StreamHost
        /// </summary>
        /// <returns></returns>
        public StreamHost AddStreamHost()
        {
            StreamHost sh = new StreamHost();

            AddChild(sh);
            return(sh);
        }
Пример #3
0
 static async Task Main(string[] args)
 {
     var host = StreamHost
                .CreateDefaultBuilder <CatsAndDogs>(args)
                .Build();
     await host.StartAsync();
 }
Пример #4
0
 static async Task Main(string[] args)
 {
     var host = StreamHost
                .CreateDefaultBuilder <PartitionedConsumer>(args)
                .Build();
     await host.StartAsync();
 }
Пример #5
0
        /// <summary>
        /// Add a StreamHost
        /// </summary>
        /// <param name="jid"></param>
        /// <param name="host"></param>
        /// <returns></returns>
        public StreamHost AddStreamHost(Jid jid, string host)
        {
            StreamHost sh = new StreamHost(jid, host);

            AddChild(sh);
            return(sh);
        }
Пример #6
0
 static async Task Main(string[] args)
 {
     var host = StreamHost
                .CreateDefaultBuilder <Program>(args)
                .ConfigureServices(svc => svc.AddHostedService <Worker>())
                .Build();
     await host.StartAsync();
 }
Пример #7
0
        public void AddStreamHost(string host, JID jid, int port)
        {
            StreamHost streamHost = CreateChildElement <StreamHost>();

            streamHost.JID  = jid;
            streamHost.Host = host;
            streamHost.Port = port;
        }
Пример #8
0
 static async Task Main(string[] args)
 {
     var host = StreamHost
                .CreateDefaultBuilder <VoteHandler>(args)
                .ConfigureServices(svc => svc.AddSingleton <IVotingService, DefaultVotingService>())
                .Build();
     await host.StartAsync();
 }
Пример #9
0
        private void SendStreamHostUsedResponse(StreamHost sh, IQ iq)
        {
            ByteStreamIq bsIQ = new ByteStreamIq(IqType.result, m_From);

            bsIQ.Id = iq.Id;

            bsIQ.Query.StreamHostUsed = new StreamHostUsed(sh.Jid);
            m_XmppCon.Send(bsIQ);
        }
Пример #10
0
 static async Task Main(string[] args)
 {
     await StreamHost.CreateDefaultBuilder <UsageProcessor>(args)
     .ConfigureWebHostDefaults(webhostBuilder => webhostBuilder.UseStartup <Startup>())
     .AddCloudFoundryConfiguration()
     .UseCloudHosting()
     .AddPlaceholderResolver()
     .AddAllActuators()
     .RunConsoleAsync();
 }
Пример #11
0
        static async Task Main(string[] args)
        {
            var host = StreamHost.CreateDefaultBuilder <Program>(args).Build();

            binderAwareChannelResolver =
                host.Services.GetService <IDestinationResolver <IMessageChannel> >() as BinderAwareChannelResolver;

            logger = host.Services.GetService <ILogger <Program> >();

            await host.StartAsync();
        }
Пример #12
0
 static async Task Main(string[] args)
 {
     await StreamHost.CreateDefaultBuilder <Program>(args)
     .ConfigureServices((context, services) =>
     {
         services.AddLogging(builder =>
         {
             builder.AddDebug();
             builder.AddConsole();
         });
     }).RunConsoleAsync();
 }
 static async Task Main(string[] args)
 {
     await StreamHost.CreateDefaultBuilder <LoggingConsumerApplication>(args)
     .ConfigureServices((context, services) =>
     {
         services.AddLogging(builder =>
         {
             builder.AddDebug();
             builder.AddConsole();
         });
     }).StartAsync();
 }
Пример #14
0
 static async Task Main(string[] args)
 {
     await StreamHost
     .CreateDefaultBuilder <UsageGenerator>(args)
     .ConfigureWebHostDefaults(webhostBuilder => webhostBuilder.UseStartup <Startup>())
     .AddCloudFoundryConfiguration()
     .UseCloudHosting()
     .AddPlaceholderResolver()
     .AddAllActuators()
     .ConfigureServices(svc => svc.AddHostedService <UsageGenerator>())
     .Build()
     .RunAsync();
 }
Пример #15
0
        /// <summary>
        /// Get the list of streamhosts
        /// </summary>
        /// <returns></returns>
        public StreamHost[] GetStreamHosts()
        {
            ElementList nl = SelectElements(typeof(StreamHost));

            StreamHost[] hosts = new StreamHost[nl.Count];
            int          i     = 0;

            foreach (Element e in nl)
            {
                hosts[i] = (StreamHost)e;
                i++;
            }
            return(hosts);
        }
Пример #16
0
        static async Task Main(string[] args)
        {
            var host = StreamHost
                       .CreateDefaultBuilder <ReRouteDlq>(args)
                       .ConfigureServices((ctx, services) =>
            {
                services.AddRabbitServices();
                services.AddRabbitTemplate();

                services.AddRabbitListeners <ReRouteDlq>();
            })
                       .Build();

            await host.StartAsync();
        }
Пример #17
0
 static async Task Main(string[] args)
 {
     var host = await StreamHost.CreateDefaultBuilder <Program>(args)
                .StartAsync();
 }
Пример #18
0
 /// <summary>
 /// Add a StreamHost
 /// </summary>
 /// <param name="sh"></param>
 /// <returns></returns>
 public StreamHost AddStreamHost(StreamHost sh)
 {
     AddChild(sh);
     return(sh);
 }
Пример #19
0
 public static IHostBuilder CreateHostBuilder(string[] args) =>
 StreamHost.CreateDefaultBuilder <BindableChannels>(args);
Пример #20
0
 /// <summary>
 /// Initializes all ScriptCore classes that data to the App Domain
 /// and initialize any other static members in Sims3.SimIFace classes.
 /// </summary>
 public static void Initialize()
 {
     if (!sInitialized)
     {
         if (gAnimation == null)
         {
             gAnimation = new Animation();
         }
         if (gAudio == null)
         {
             gAudio = new Audio();
         }
         if (gAutomationUtils == null)
         {
             gAutomationUtils = new AutomationUtils();
         }
         if (gCacheManager == null)
         {
             gCacheManager = new CacheManager();
         }
         if (gCameraController == null)
         {
             gCameraController = new CameraController();
         }
         if (gCASUtils == null)
         {
             gCASUtils = new CASUtils();
         }
         if (gCommandSystem == null)
         {
             gCommandSystem = new CommandSystem();
         }
         if (gCTProductModularObject == null)
         {
             gCTProductModularObject = new CTProductModularObject();
         }
         if (gDataFactory == null)
         {
             gDataFactory = new DataFactory();
         }
         if (gDebugDraw == null)
         {
             gDebugDraw = new DebugDraw();
         }
         if (gDeviceConfig == null)
         {
             gDeviceConfig = new DeviceConfig();
         }
         if (gDownloadContent == null)
         {
             gDownloadContent = new DownloadContent();
         }
         if (gEAText == null)
         {
             gEAText = new EAText();
         }
         if (gEATrace == null)
         {
             gEATrace = new EATrace();
         }
         if (gEventQueueInitializer == null)
         {
             gEventQueueInitializer = new EventQueueInitializer();
         }
         if (gGameUtils == null)
         {
             gGameUtils = new GameUtils();
         }
         if (gLoadSaveManager == null)
         {
             gLoadSaveManager = new LoadSaveManager();
         }
         if (gLocalizedStringService == null)
         {
             gLocalizedStringService = new LocalizedStringService();
         }
         if (gLookAtMgr == null)
         {
             gLookAtMgr = new LookAtMgr();
         }
         if (gNameGuidMapService == null)
         {
             gNameGuidMapService = new NameGuidMapService();
         }
         if (gObjects == null)
         {
             gObjects = new Objects();
         }
         if (gOnlineFeatures == null)
         {
             gOnlineFeatures = new OnlineFeatures();
         }
         //if (gProfilerUtils == null) gProfilerUtils = new ProfilerUtils();
         if (gQueries == null)
         {
             gQueries = new Queries();
         }
         if (gRandom == null)
         {
             gRandom = new ScriptCore.Random();
         }
         if (gReflection == null)
         {
             gReflection = new ScriptCore.Reflection();
         }
         if (gRouteManager == null)
         {
             gRouteManager = new RouteManager();
         }
         if (gSACS == null)
         {
             gSACS = new SACS();
         }
         if (gSimulator == null)
         {
             gSimulator = new Simulator();
         }
         if (gSlots == null)
         {
             gSlots = new Slots();
         }
         if (gSocialFeatures == null)
         {
             gSocialFeatures = new SocialFeatures();
         }
         if (gStopWatch == null)
         {
             gStopWatch = new StopWatch();
         }
         if (gStreamHost == null)
         {
             gStreamHost = new StreamHost();
         }
         if (gSwarm == null)
         {
             gSwarm = new Swarm();
         }
         if (gThumbnailManager == null)
         {
             gThumbnailManager = new ThumbnailManager();
         }
         if (gUIManager == null)
         {
             gUIManager = new UIManager();
         }
         if (gUserToolUtils == null)
         {
             gUserToolUtils = new UserToolUtils();
         }
         if (gVideoRecorder == null)
         {
             gVideoRecorder = new VideoRecorder();
         }
         if (gWorld == null)
         {
             gWorld = new World();
         }
         // Will this still be reached if any of the constructors throw an Exception? Hopefully not
         sInitialized = true;
     }
 }