本文整理汇总了C#中IceInternal.BasicStream.readString方法的典型用法代码示例。如果您正苦于以下问题:C# BasicStream.readString方法的具体用法?C# BasicStream.readString怎么用?C# BasicStream.readString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IceInternal.BasicStream
的用法示例。
在下文中一共展示了BasicStream.readString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WSEndpoint
internal WSEndpoint(ProtocolInstance instance, EndpointI del, BasicStream s)
{
_instance = instance;
_delegate = (IPEndpointI)del;
_resource = s.readString();
}
示例2: IPEndpointI
public IPEndpointI(ProtocolInstance instance, BasicStream s)
{
instance_ = instance;
host_ = s.readString();
port_ = s.readInt();
sourceAddr_ = null;
connectionId_ = "";
_hashInitialized = false;
}
示例3: TcpEndpointI
public TcpEndpointI(BasicStream s)
{
_instance = s.instance();
s.startReadEncaps();
_host = s.readString();
_port = s.readInt();
_timeout = s.readInt();
_compress = s.readBool();
s.endReadEncaps();
calcHashValue();
}
示例4: create
public Reference create(Ice.Identity ident, BasicStream s)
{
//
// Don't read the identity here. Operations calling this
// constructor read the identity, and pass it as a parameter.
//
if(ident.name.Length == 0 && ident.category.Length == 0)
{
return null;
}
//
// For compatibility with the old FacetPath.
//
string[] facetPath = s.readStringSeq();
string facet;
if(facetPath.Length > 0)
{
if(facetPath.Length > 1)
{
throw new Ice.ProxyUnmarshalException();
}
facet = facetPath[0];
}
else
{
facet = "";
}
int mode = (int)s.readByte();
if(mode < 0 || mode > (int)Reference.Mode.ModeLast)
{
throw new Ice.ProxyUnmarshalException();
}
bool secure = s.readBool();
EndpointI[] endpoints = null;
string adapterId = "";
int sz = s.readSize();
if(sz > 0)
{
endpoints = new EndpointI[sz];
for(int i = 0; i < sz; i++)
{
endpoints[i] = instance_.endpointFactoryManager().read(s);
}
}
else
{
adapterId = s.readString();
}
return create(ident, facet, (Reference.Mode)mode, secure, endpoints, adapterId, null);
}
示例5: printRequestHeader
private static void printRequestHeader(System.IO.StringWriter s, BasicStream str)
{
printIdentityFacetOperation(s, str);
try
{
byte mode = str.readByte();
s.Write("\nmode = " + (int)mode + ' ');
switch((Ice.OperationMode)mode)
{
case Ice.OperationMode.Normal:
{
s.Write("(normal)");
break;
}
case Ice.OperationMode.Nonmutating:
{
s.Write("(nonmutating)");
break;
}
case Ice.OperationMode.Idempotent:
{
s.Write("(idempotent)");
break;
}
default:
{
s.Write("(unknown)");
break;
}
}
int sz = str.readSize();
s.Write("\ncontext = ");
while(sz-- > 0)
{
string key = str.readString();
string val = str.readString();
s.Write(key + '/' + val);
if(sz > 0)
{
s.Write(", ");
}
}
Ice.EncodingVersion v = str.skipEncaps();
if(!v.Equals(Ice.Util.Encoding_1_0))
{
s.Write("\nencoding = ");
s.Write(Ice.Util.encodingVersionToString(v));
}
}
catch(System.IO.IOException)
{
Debug.Assert(false);
}
}
示例6: printReply
private static void printReply(System.IO.StringWriter s, BasicStream str)
{
int requestId = str.readInt();
s.Write("\nrequest id = " + requestId);
byte replyStatus = str.readByte();
s.Write("\nreply status = " + (int)replyStatus + ' ');
switch(replyStatus)
{
case ReplyStatus.replyOK:
{
s.Write("(ok)");
break;
}
case ReplyStatus.replyUserException:
{
s.Write("(user exception)");
break;
}
case ReplyStatus.replyObjectNotExist:
case ReplyStatus.replyFacetNotExist:
case ReplyStatus.replyOperationNotExist:
{
switch(replyStatus)
{
case ReplyStatus.replyObjectNotExist:
{
s.Write("(object not exist)");
break;
}
case ReplyStatus.replyFacetNotExist:
{
s.Write("(facet not exist)");
break;
}
case ReplyStatus.replyOperationNotExist:
{
s.Write("(operation not exist)");
break;
}
default:
{
Debug.Assert(false);
break;
}
}
printIdentityFacetOperation(s, str);
break;
}
case ReplyStatus.replyUnknownException:
case ReplyStatus.replyUnknownLocalException:
case ReplyStatus.replyUnknownUserException:
{
switch(replyStatus)
{
case ReplyStatus.replyUnknownException:
{
s.Write("(unknown exception)");
break;
}
case ReplyStatus.replyUnknownLocalException:
{
s.Write("(unknown local exception)");
break;
}
case ReplyStatus.replyUnknownUserException:
{
s.Write("(unknown user exception)");
break;
}
default:
{
Debug.Assert(false);
break;
}
}
string unknown = str.readString();
s.Write("\nunknown = " + unknown);
break;
}
default:
{
s.Write("(unknown)");
break;
}
}
}
示例7: printIdentityFacetOperation
private static void printIdentityFacetOperation(System.IO.StringWriter s, BasicStream str)
{
try
{
Ice.Identity identity = new Ice.Identity();
identity.read__(str);
s.Write("\nidentity = " + str.instance().identityToString(identity));
string[] facet = str.readStringSeq();
s.Write("\nfacet = ");
if(facet.Length > 0)
{
s.Write(IceUtilInternal.StringUtil.escapeString(facet[0], ""));
}
string operation = str.readString();
s.Write("\noperation = " + operation);
}
catch(System.IO.IOException)
{
Debug.Assert(false);
}
}
示例8: invoke
public void invoke(ServantManager servantManager, BasicStream stream)
{
_is = stream;
int start = _is.pos();
//
// Read the current.
//
current_.id.read__(_is);
//
// For compatibility with the old FacetPath.
//
string[] facetPath = _is.readStringSeq();
if(facetPath.Length > 0)
{
if(facetPath.Length > 1)
{
throw new Ice.MarshalException();
}
current_.facet = facetPath[0];
}
else
{
current_.facet = "";
}
current_.operation = _is.readString();
current_.mode = (Ice.OperationMode)(int)_is.readByte();
current_.ctx = new Dictionary<string, string>();
int sz = _is.readSize();
while(sz-- > 0)
{
string first = _is.readString();
string second = _is.readString();
current_.ctx[first] = second;
}
Ice.Instrumentation.CommunicatorObserver obsv = instance_.initializationData().observer;
if(obsv != null)
{
// Read the encapsulation size.
int size = _is.readInt();
_is.pos(_is.pos() - 4);
observer_ = obsv.getDispatchObserver(current_, _is.pos() - start + size);
if(observer_ != null)
{
observer_.attach();
}
}
//
// Don't put the code above into the try block below. Exceptions
// in the code above are considered fatal, and must propagate to
// the caller of this operation.
//
if(servantManager != null)
{
servant_ = servantManager.findServant(current_.id, current_.facet);
if(servant_ == null)
{
locator_ = servantManager.findServantLocator(current_.id.category);
if(locator_ == null && current_.id.category.Length > 0)
{
locator_ = servantManager.findServantLocator("");
}
if(locator_ != null)
{
try
{
servant_ = locator_.locate(current_, out cookie_);
}
catch(Ice.UserException ex)
{
Ice.EncodingVersion encoding = _is.skipEncaps(); // Required for batch requests.
if(observer_ != null)
{
observer_.userException();
}
if(response_)
{
os_.writeByte(ReplyStatus.replyUserException);
os_.startWriteEncaps(encoding, Ice.FormatType.DefaultFormat);
os_.writeUserException(ex);
os_.endWriteEncaps();
if(observer_ != null)
{
observer_.reply(os_.size() - Protocol.headerSize - 4);
}
responseHandler_.sendResponse(current_.requestId, os_, compress_, false);
}
else
{
responseHandler_.sendNoResponse();
//.........这里部分代码省略.........
示例9: printReply
private static void printReply(System.IO.StringWriter s, BasicStream str)
{
int requestId = str.readInt();
s.Write("\nrequest id = " + requestId);
byte replyStatus = str.readByte();
s.Write("\nreply status = " + (int)replyStatus + ' ');
switch(replyStatus)
{
case ReplyStatus.replyOK:
{
s.Write("(ok)");
break;
}
case ReplyStatus.replyUserException:
{
s.Write("(user exception)");
break;
}
case ReplyStatus.replyObjectNotExist:
case ReplyStatus.replyFacetNotExist:
case ReplyStatus.replyOperationNotExist:
{
switch(replyStatus)
{
case ReplyStatus.replyObjectNotExist:
{
s.Write("(object not exist)");
break;
}
case ReplyStatus.replyFacetNotExist:
{
s.Write("(facet not exist)");
break;
}
case ReplyStatus.replyOperationNotExist:
{
s.Write("(operation not exist)");
break;
}
default:
{
Debug.Assert(false);
break;
}
}
printIdentityFacetOperation(s, str);
break;
}
case ReplyStatus.replyUnknownException:
case ReplyStatus.replyUnknownLocalException:
case ReplyStatus.replyUnknownUserException:
{
switch(replyStatus)
{
case ReplyStatus.replyUnknownException:
{
s.Write("(unknown exception)");
break;
}
case ReplyStatus.replyUnknownLocalException:
{
s.Write("(unknown local exception)");
break;
}
case ReplyStatus.replyUnknownUserException:
{
s.Write("(unknown user exception)");
break;
}
default:
{
Debug.Assert(false);
break;
}
}
string unknown = str.readString();
s.Write("\nunknown = " + unknown);
break;
}
default:
{
s.Write("(unknown)");
break;
}
}
//.........这里部分代码省略.........
示例10: UdpEndpointI
public UdpEndpointI(BasicStream s)
{
instance_ = s.instance();
s.startReadEncaps();
_host = s.readString();
_port = s.readInt();
if(s.getReadEncoding().Equals(Ice.Util.Encoding_1_0))
{
s.readByte();
s.readByte();
s.readByte();
s.readByte();
}
// Not transmitted.
//_connect = s.readBool();
_connect = false;
_compress = s.readBool();
s.endReadEncaps();
calcHashValue();
}
示例11: UdpEndpointI
public UdpEndpointI(BasicStream s)
{
instance_ = s.instance();
s.startReadEncaps();
_host = s.readString();
_port = s.readInt();
_protocolMajor = s.readByte();
_protocolMinor = s.readByte();
_encodingMajor = s.readByte();
_encodingMinor = s.readByte();
if(_protocolMajor != Protocol.protocolMajor)
{
Ice.UnsupportedProtocolException e = new Ice.UnsupportedProtocolException();
e.badMajor = _protocolMajor < 0?_protocolMajor + 255:_protocolMajor;
e.badMinor = _protocolMinor < 0?_protocolMinor + 255:_protocolMinor;
e.major = Protocol.protocolMajor;
e.minor = Protocol.protocolMinor;
throw e;
}
if(_encodingMajor != Protocol.encodingMajor)
{
Ice.UnsupportedEncodingException e = new Ice.UnsupportedEncodingException();
e.badMajor = _encodingMajor < 0?_encodingMajor + 255:_encodingMajor;
e.badMinor = _encodingMinor < 0?_encodingMinor + 255:_encodingMinor;
e.major = Protocol.encodingMajor;
e.minor = Protocol.encodingMinor;
throw e;
}
// Not transmitted.
//_connect = s.readBool();
_connect = false;
_compress = s.readBool();
s.endReadEncaps();
calcHashValue();
}