// Copyright (c) ZeroC, Inc. All rights reserved. using System.Collections.Generic; using System.Threading.Tasks; using Test; namespace ZeroC.Ice.Test.Compress { public class Server : TestHelper { public override async Task RunAsync(string[] args) { await using Communicator communicator = Initialize(ref args, new Dictionary() { ["Ice.CompressionMinSize"] = "1K" }); await communicator.ActivateAsync(); communicator.SetProperty("TestAdapter.Endpoints", GetTestEndpoint(0)); ObjectAdapter adapter = communicator.CreateObjectAdapter("TestAdapter"); adapter.Add("test-1", new Interceptor(new TestIntf(), compressed: true)); adapter.Add("test-2", new Interceptor(new TestIntf(), compressed: false)); await adapter.ActivateAsync(); ServerReady(); await communicator.ShutdownComplete; } public static Task Main(string[] args) => TestDriver.RunTestAsync(args); } }