本文整理汇总了C#中IceInternal.Instance类的典型用法代码示例。如果您正苦于以下问题:C# Instance类的具体用法?C# Instance怎么用?C# Instance使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Instance类属于IceInternal命名空间,在下文中一共展示了Instance类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectAdapterFactory
//
// Only for use by Instance.
//
internal ObjectAdapterFactory(Instance instance, Ice.Communicator communicator)
{
instance_ = instance;
_communicator = communicator;
_adapterNamesInUse = new HashSet<string>();
_adapters = new List<Ice.ObjectAdapterI>();
}
示例2: ConnectionMonitor
//
// Only for use by Instance.
//
internal ConnectionMonitor(Instance instance, int interval)
{
instance_ = instance;
_interval = interval;
_scheduledInterval = 0;
_connections = new HashSet<Ice.ConnectionI>();
}
示例3: TcpEndpointI
public TcpEndpointI(Instance instance, string ho, int po, int ti, string conId, bool co) : base(conId)
{
_instance = instance;
_host = ho;
_port = po;
_timeout = ti;
_compress = co;
calcHashValue();
}
示例4: ProtocolInstance
public ProtocolInstance(Instance instance, short type, string protocol)
{
instance_ = instance;
traceLevel_ = instance_.traceLevels().network;
traceCategory_ = instance_.traceLevels().networkCat;
logger_ = instance_.initializationData().logger;
properties_ = instance_.initializationData().properties;
type_ = type;
protocol_ = protocol;
}
示例5: FixedReference
public FixedReference(Instance instance,
Ice.Communicator communicator,
Ice.Identity identity,
string facet,
Reference.Mode mode,
bool secure,
Ice.ConnectionI connection)
: base(instance, communicator, identity, facet, mode, secure)
{
_fixedConnection = connection;
}
示例6: ProtocolInstance
public ProtocolInstance(Ice.Communicator communicator, short type, string protocol, bool secure)
{
instance_ = Util.getInstance(communicator);
traceLevel_ = instance_.traceLevels().network;
traceCategory_ = instance_.traceLevels().networkCat;
logger_ = instance_.initializationData().logger;
properties_ = instance_.initializationData().properties;
type_ = type;
protocol_ = protocol;
secure_ = secure;
}
示例7: UdpEndpointI
public UdpEndpointI(Instance instance, string ho, int po, string mif, int mttl, bool conn, string conId,
bool co) : base(conId)
{
instance_ = instance;
_host = ho;
_port = po;
_mcastInterface = mif;
_mcastTtl = mttl;
_connect = conn;
connectionId_ = conId;
_compress = co;
calcHashValue();
}
示例8: TcpConnector
//
// Only for use by TcpEndpoint
//
internal TcpConnector(Instance instance, IPEndPoint addr, int timeout, string connectionId)
{
_instance = instance;
_traceLevels = instance.traceLevels();
_logger = instance.initializationData().logger;
_addr = addr;
_timeout = timeout;
_connectionId = connectionId;
_hashCode = _addr.GetHashCode();
_hashCode = 5 * _hashCode + _timeout;
_hashCode = 5 * _hashCode + _connectionId.GetHashCode();
}
示例9: get
static public InvocationObserver get(Instance instance, string op)
{
CommunicatorObserver obsv = instance.initializationData().observer;
if(obsv != null)
{
InvocationObserver observer = obsv.getInvocationObserver(null, op, _emptyContext);
if(observer != null)
{
observer.attach();
}
return observer;
}
return null;
}
示例10: UdpConnector
//
// Only for use by TcpEndpoint
//
internal UdpConnector(Instance instance, EndPoint addr, string mcastInterface, int mcastTtl, string connectionId)
{
instance_ = instance;
_addr = addr;
_mcastInterface = mcastInterface;
_mcastTtl = mcastTtl;
_connectionId = connectionId;
_hashCode = 5381;
IceInternal.HashUtil.hashAdd(ref _hashCode, _addr);
IceInternal.HashUtil.hashAdd(ref _hashCode, _mcastInterface);
IceInternal.HashUtil.hashAdd(ref _hashCode, _mcastTtl);
IceInternal.HashUtil.hashAdd(ref _hashCode, _connectionId);
}
示例11: TcpConnector
//
// Only for use by TcpEndpoint
//
internal TcpConnector(Instance instance, EndPoint addr, NetworkProxy proxy, int timeout, string connectionId)
{
_instance = instance;
_traceLevels = instance.traceLevels();
_logger = instance.initializationData().logger;
_addr = addr;
_proxy = proxy;
_timeout = timeout;
_connectionId = connectionId;
_hashCode = 5381;
IceInternal.HashUtil.hashAdd(ref _hashCode, _addr);
IceInternal.HashUtil.hashAdd(ref _hashCode, _timeout);
IceInternal.HashUtil.hashAdd(ref _hashCode, _connectionId);
}
示例12: AsyncIOThread
internal AsyncIOThread(Instance instance)
{
_instance = instance;
_thread = new HelperThread(this);
if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
{
ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
instance.initializationData().properties.getProperty("Ice.ThreadPriority"));
_thread.Start(priority);
}
else
{
_thread.Start(ThreadPriority.Normal);
}
}
示例13: Incoming
public Incoming(Instance instance, ResponseHandler handler, Ice.ConnectionI connection,
Ice.ObjectAdapter adapter, bool response, byte compress, int requestId)
: base(instance, handler, connection, adapter, response, compress, requestId)
{
//
// Prepare the response if necessary.
//
if(response)
{
os_.writeBlob(IceInternal.Protocol.replyHdr);
//
// Add the request ID.
//
os_.writeInt(requestId);
}
}
示例14: TcpAcceptor
internal TcpAcceptor(Instance instance, string host, int port)
{
instance_ = instance;
_traceLevels = instance.traceLevels();
_logger = instance.initializationData().logger;
_backlog = instance.initializationData().properties.getPropertyAsIntWithDefault("Ice.TCP.Backlog", 511);
try
{
_addr = Network.getAddressForServer(host, port, instance_.protocolSupport());
_fd = Network.createSocket(false, _addr.AddressFamily);
Network.setBlock(_fd, false);
#if !COMPACT
Network.setTcpBufSize(_fd, instance_.initializationData().properties, _logger);
#endif
if(AssemblyUtil.platform_ != AssemblyUtil.Platform.Windows)
{
//
// Enable SO_REUSEADDR on Unix platforms to allow
// re-using the socket even if it's in the TIME_WAIT
// state. On Windows, this doesn't appear to be
// necessary and enabling SO_REUSEADDR would actually
// not be a good thing since it allows a second
// process to bind to an address even it's already
// bound by another process.
//
// TODO: using SO_EXCLUSIVEADDRUSE on Windows would
// probably be better but it's only supported by recent
// Windows versions (XP SP2, Windows Server 2003).
//
Network.setReuseAddress(_fd, true);
}
if(_traceLevels.network >= 2)
{
string s = "attempting to bind to tcp socket " + Network.addrToString(_addr);
_logger.trace(_traceLevels.networkCat, s);
}
_addr = Network.doBind(_fd, _addr);
}
catch(System.Exception)
{
_fd = null;
throw;
}
}
示例15: EndpointHostResolver
internal EndpointHostResolver(Instance instance)
{
_instance = instance;
_protocol = instance.protocolSupport();
_preferIPv6 = instance.preferIPv6();
_thread = new HelperThread(this);
updateObserver();
if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
{
ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
instance.initializationData().properties.getProperty("Ice.ThreadPriority"));
_thread.Start(priority);
}
else
{
_thread.Start(ThreadPriority.Normal);
}
}