private static void printIdentityFacetOperation(System.IO.StringWriter s, Ice.InputStream 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); } }
public Reference create(Ice.Identity ident, Ice.InputStream 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(); Ice.ProtocolVersion protocol; Ice.EncodingVersion encoding; if(!s.getEncoding().Equals(Ice.Util.Encoding_1_0)) { protocol = new Ice.ProtocolVersion(); protocol.read__(s); encoding = new Ice.EncodingVersion(); encoding.read__(s); } else { protocol = Ice.Util.Protocol_1_0; encoding = Ice.Util.Encoding_1_0; } 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, protocol, encoding, endpoints, adapterId, null); }