本文整理汇总了C#中Ice.InitializationData类的典型用法代码示例。如果您正苦于以下问题:C# InitializationData类的具体用法?C# InitializationData怎么用?C# InitializationData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InitializationData类属于Ice命名空间,在下文中一共展示了InitializationData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Main
public static int Main(string[] args)
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
App app = new App();
return app.main(args, initData);
}
开发者ID:externl,项目名称:ice,代码行数:7,代码来源:Server.cs
示例2: initData
public override Ice.InitializationData initData()
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties();
initData.properties.setProperty("Ice.Warn.Connections", "0");
return initData;
}
开发者ID:joshmoore,项目名称:ice,代码行数:7,代码来源:AllTests.cs
示例3: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator communicator = null;
Debug.Listeners.Add(new ConsoleTraceListener());
try
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.Default.Host", "127.0.0.1");
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
if(communicator != null)
{
try
{
communicator.destroy();
}
catch(Ice.LocalException ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
}
return status;
}
开发者ID:externl,项目名称:ice,代码行数:35,代码来源:Client.cs
示例4: Main
public static int Main(string[] args)
{
int status = 0;
try
{
Console.Out.Write("testing load properties from UTF-8 path... ");
Console.Out.Flush();
Ice.InitializationData id = new Ice.InitializationData();
id.properties = Ice.Util.createProperties();
id.properties.load("./config/中国_client.config");
test(id.properties.getProperty("Ice.Trace.Network").Equals("1"));
test(id.properties.getProperty("Ice.Trace.Protocol").Equals("1"));
test(id.properties.getProperty("Config.Path").Equals("./config/中国_client.config"));
test(id.properties.getProperty("Ice.ProgramName").Equals("PropertiesClient"));
Console.Out.WriteLine("ok");
Console.Out.Write("testing load properties from UTF-8 path using Ice::Application... ");
Console.Out.Flush();
PropertiesClient c = new PropertiesClient();
c.main(args, "./config/中国_client.config");
Console.Out.WriteLine("ok");
}
catch(System.Exception ex)
{
System.Console.Error.WriteLine(ex);
status = 1;
}
return status;
}
开发者ID:sbesson,项目名称:zeroc-ice,代码行数:29,代码来源:Client.cs
示例5: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator communicator = null;
try
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
if(communicator != null)
{
try
{
communicator.destroy();
}
catch(Ice.LocalException ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
}
return status;
}
开发者ID:externl,项目名称:ice,代码行数:34,代码来源:Client.cs
示例6: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator communicator = null;
try
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
//
// For this test, we want to disable retries.
//
initData.properties.setProperty("Ice.RetryIntervals", "-1");
//
// This test kills connections, so we don't want warnings.
//
initData.properties.setProperty("Ice.Warn.Connections", "0");
initData.properties.setProperty("Ice.MessageSizeMax", "50000");
// This test relies on filling the TCP send/recv buffer, so
// we rely on a fixed value for these buffers.
initData.properties.setProperty("Ice.TCP.SndSize", "50000");
//
// Setup the test transport plug-in.
//
string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp");
initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol);
communicator = Ice.Util.initialize(ref args, initData);
PluginI plugin = new PluginI(communicator);
plugin.initialize();
communicator.getPluginManager().addPlugin("Test", plugin);
status = run(args, communicator);
}
catch(System.Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
if(communicator != null)
{
try
{
communicator.destroy();
}
catch(Ice.LocalException ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
}
return status;
}
开发者ID:pedia,项目名称:zeroc-ice,代码行数:60,代码来源:Client.cs
示例7: TempCommunicator
public TempCommunicator(string configFileClasspath)
{
log("Constructor called");
try
{
InitializationData initData = new InitializationData();
initData.properties = Util.createProperties();
initData.properties.load(configFileClasspath);
communicator = Util.initialize(initData);
log("Properties Loaded!");
}
catch (Exception e)
{
log(e.ToString());
throw e;
}
string proxy1 = "'::TeRK::TeRKUser':tcp -h 127.0.0.1 -p 10101";
log("Calling stringToProxy on " + proxy1);
communicator.stringToProxy(proxy1);
log("Complete!");
string proxy2 = "'::TeRK::TeRKUser':tcp -h 192.168.0.16 -p 10101";
log("Calling stringToProxy on " + proxy2);
communicator.stringToProxy(proxy2);
log("Complete!");
log("Constructor terminated");
writeLog("C:\\tempCommLog.txt");
}
开发者ID:CMU-CREATE-Lab,项目名称:terk-legacy,代码行数:29,代码来源:TempCommunicator.cs
示例8: createClientProps
createClientProps(Ice.Properties defaultProperties, string defaultDir, string defaultHost)
{
Ice.InitializationData result = new Ice.InitializationData();
result.properties = Ice.Util.createProperties();
//
// TODO:
//
// When an application loads IceSSL.dll directly, as this one does, we
// must ensure that it uses the same DLL as the one loaded dynamically
// by Ice.
//
// When Mono supports .NET 2.0, we'll need to fix this.
//
result.properties.setProperty("Ice.Plugin.IceSSL", "IceSSL:IceSSL.PluginFactory");
if(defaultProperties.getProperty("Ice.IPv6").Length > 0)
{
result.properties.setProperty("Ice.IPv6", defaultProperties.getProperty("Ice.IPv6"));
}
result.properties.setProperty("Ice.RetryIntervals", "-1");
if(defaultHost.Length > 0)
{
result.properties.setProperty("Ice.Default.Host", defaultHost);
}
if(defaultDir.Length > 0)
{
result.properties.setProperty("IceSSL.DefaultDir", defaultDir);
}
//result.properties.setProperty("IceSSL.Trace.Security", "1");
return result;
}
开发者ID:joshmoore,项目名称:ice,代码行数:30,代码来源:AllTests.cs
示例9: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator communicator = null;
try
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.ThreadPool.Server.ThreadPriority", "AboveNormal");
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
catch(System.Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
if(communicator != null)
{
try
{
communicator.destroy();
}
catch(Ice.LocalException ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
}
return status;
}
开发者ID:joshmoore,项目名称:ice,代码行数:34,代码来源:Server.cs
示例10: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator communicator = null;
try
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties();
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
catch(Exception ex)
{
Console.WriteLine(ex);
status = 1;
}
if(communicator != null)
{
try
{
communicator.destroy();
}
catch(Ice.LocalException ex)
{
Console.WriteLine(ex);
status = 1;
}
}
return status;
}
开发者ID:externl,项目名称:ice,代码行数:35,代码来源:Collocated.cs
示例11: Main
public static int Main(string[] args)
{
#if !COMPACT
Debug.Listeners.Add(new ConsoleTraceListener());
#endif
//
// We must disable connection warnings, because we attempt to
// ping the router before session establishment, as well as
// after session destruction. Both will cause a
// ConnectionLostException.
//
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.Warn.Connections", "0");
#if COMPACT
//
// When using Ice for .NET Compact Framework, we need to specify
// the assembly so that Ice can locate classes and exceptions.
//
initData.properties.setProperty("Ice.FactoryAssemblies", "client");
#endif
App app = new App();
return app.main(args, initData);
}
开发者ID:bholl,项目名称:zeroc-ice,代码行数:28,代码来源:Client.cs
示例12: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator ic = null;
try
{
Ice.InitializationData data = new Ice.InitializationData();
#if COMPACT
//
// When using Ice for .NET Compact Framework, we need to specify
// the assembly so that Ice can locate classes and exceptions.
//
data.properties = Ice.Util.createProperties();
data.properties.setProperty("Ice.FactoryAssemblies", "client,version=1.0.0.0");
#endif
//
// Create a communicator
//
ic = Ice.Util.initialize(ref args, data);
//
// Create a proxy for the root directory
//
Ice.ObjectPrx obj = ic.stringToProxy("RootDir:default -h localhost -p 10000");
//
// Down-cast the proxy to a Directory proxy
//
DirectoryPrx rootDir = DirectoryPrxHelper.checkedCast(obj);
if(rootDir == null)
{
throw new ApplicationException("Invalid proxy");
}
//
// Recursively list the contents of the root directory
//
Console.WriteLine("Contents of root directory:");
listRecursive(rootDir, 0);
}
catch(Exception e)
{
Console.Error.WriteLine(e);
status = 1;
}
if(ic != null)
{
try
{
ic.destroy();
}
catch(Exception e)
{
Console.Error.WriteLine(e);
status = 1;
}
}
return status;
}
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:60,代码来源:Client.cs
示例13: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator communicator = null;
#if !COMPACT
Debug.Listeners.Add(new ConsoleTraceListener());
#endif
try
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
//
// For this test, we want to disable retries.
//
initData.properties.setProperty("Ice.RetryIntervals", "-1");
//
// This test kills connections, so we don't want warnings.
//
initData.properties.setProperty("Ice.Warn.Connections", "0");
//
// Setup the test transport plug-in.
//
string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp");
initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol);
communicator = Ice.Util.initialize(ref args, initData);
PluginI plugin = new PluginI(communicator);
plugin.initialize();
communicator.getPluginManager().addPlugin("Test", plugin);
status = run(args, communicator);
}
catch(System.Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
if(communicator != null)
{
try
{
communicator.destroy();
}
catch(Ice.LocalException ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
}
return status;
}
开发者ID:bholl,项目名称:zeroc-ice,代码行数:58,代码来源:Client.cs
示例14: ServerManagerI
internal ServerManagerI(ServerLocatorRegistry registry,
Ice.InitializationData initData)
{
_registry = registry;
_communicators = new ArrayList();
_initData = initData;
_initData.properties.setProperty("TestAdapter.AdapterId", "TestAdapter");
_initData.properties.setProperty("TestAdapter.ReplicaGroupId", "ReplicatedAdapter");
_initData.properties.setProperty("TestAdapter2.AdapterId", "TestAdapter2");
}
开发者ID:bholl,项目名称:zeroc-ice,代码行数:10,代码来源:ServerManagerI.cs
示例15: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator communicator = null;
#if !COMPACT
Debug.Listeners.Add(new ConsoleTraceListener());
#endif
try
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.Package.Test", "test.Ice.metrics");
initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010");
initData.properties.setProperty("Ice.Admin.Endpoints", "tcp");
initData.properties.setProperty("Ice.Admin.InstanceName", "client");
initData.properties.setProperty("Ice.Admin.DelayCreation", "1");
initData.properties.setProperty("Ice.Warn.Connections", "0");
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
initData.properties.setProperty("Ice.MessageSizeMax", "50000");
initData.properties.setProperty("Ice.Default.Host", "127.0.0.1");
#if COMPACT
//
// When using Ice for .NET Compact Framework, we need to specify
// the assembly so that Ice can locate classes and exceptions.
//
initData.properties.setProperty("Ice.FactoryAssemblies", "collocated");
#endif
initData.observer = _observer;
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
catch(System.Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
if(communicator != null)
{
try
{
communicator.destroy();
}
catch(Ice.LocalException ex)
{
Console.Error.WriteLine(ex);
status = 1;
}
}
return status;
}
开发者ID:joshmoore,项目名称:ice,代码行数:54,代码来源:Collocated.cs
示例16: Main
public static int Main(string[] args)
{
int status = 0;
Ice.Communicator ic = null;
try
{
Ice.InitializationData data = new Ice.InitializationData();
//
// Create a communicator
//
ic = Ice.Util.initialize(ref args, data);
//
// Create a proxy for the root directory
//
Ice.ObjectPrx obj = ic.stringToProxy("RootDir:default -h localhost -p 10000");
//
// Down-cast the proxy to a Directory proxy
//
DirectoryPrx rootDir = DirectoryPrxHelper.checkedCast(obj);
if(rootDir == null)
{
throw new ApplicationException("Invalid proxy");
}
//
// Recursively list the contents of the root directory
//
Console.WriteLine("Contents of root directory:");
listRecursive(rootDir, 0);
}
catch(Exception e)
{
Console.Error.WriteLine(e);
status = 1;
}
if(ic != null)
{
try
{
ic.destroy();
}
catch(Exception e)
{
Console.Error.WriteLine(e);
status = 1;
}
}
return status;
}
开发者ID:RonsonNamek,项目名称:ice-demos,代码行数:52,代码来源:Client.cs
示例17: Main
static void Main(string[] args)
{
Server server = new Server();
InitializationData initializationData = new InitializationData {properties = Util.createProperties()};
initializationData.properties.setProperty("Ice.ThreadPool.Client.Size", "1");
initializationData.properties.setProperty("Ice.ThreadPool.Client.SizeMax", "10");
initializationData.properties.setProperty("Ice.ThreadPool.Server.Size", "1");
initializationData.properties.setProperty("Ice.ThreadPool.Server.SizeMax", "10");
initializationData.properties.setProperty("Ice.ACM.Client", "0");
Environment.Exit(server.main(args, initializationData));
}
开发者ID:spolnik,项目名称:Chat_Ice_ZeroC,代码行数:13,代码来源:Server.cs
示例18: Main
static public int Main(String[] args)
{
App app = new App();
Ice.InitializationData data = new Ice.InitializationData();
#if COMPACT
//
// When using Ice for .NET Compact Framework, we need to specify
// the assembly so that Ice can locate classes and exceptions.
//
data.properties = Ice.Util.createProperties();
data.properties.setProperty("Ice.FactoryAssemblies", "client,version=1.0.0.0");
#endif
return app.main(args, data);
}
开发者ID:pedia,项目名称:zeroc-ice,代码行数:14,代码来源:Client.cs
示例19: Main
public static int Main(string[] args)
{
//
// We must disable connection warnings, because we attempt to
// ping the router before session establishment, as well as
// after session destruction. Both will cause a
// ConnectionLostException.
//
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.Warn.Connections", "0");
App app = new App();
return app.main(args, initData);
}
开发者ID:externl,项目名称:ice,代码行数:15,代码来源:Client.cs
示例20: App
public App()
{
me = this;
_initData = new Ice.InitializationData();
_initData.properties = Ice.Util.createProperties();
_initData.properties.setProperty("Ice.Default.Router", "Glacier2/router:default -p 12347");
#if COMPACT
_initData.dispatcher = delegate(Ice.VoidAction action, Ice.Connection connection)
#else
_initData.dispatcher = delegate(System.Action action, Ice.Connection connection)
#endif
{
action();
};
}
开发者ID:bholl,项目名称:zeroc-ice,代码行数:16,代码来源:Client.cs
注:本文中的Ice.InitializationData类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论