/// <summary> /// finds the code set service context among the collection of received service contexts. /// </summary> internal static CodeSetServiceContext FindCodeSetServiceContext(omg.org.IOP.ServiceContextList contexts) { if (contexts.ContainsServiceContext(SERVICE_ID)) { omg.org.IOP.ServiceContext context = contexts.GetServiceContext(SERVICE_ID); return(new CodeSetServiceContext(context)); } else { return(null); } }
/// <summary> /// create a codeSetServiceContext from the service context with the specified id. /// </summary> /// <param name="svcContext"></param> internal CodeSetServiceContext(omg.org.IOP.ServiceContext svcContext) { Deserialise(svcContext.context_data); }
/// <summary> /// insert a codeset service context into the service context list. /// </summary> internal static void InsertCodeSetServiceContext(omg.org.IOP.ServiceContextList contexts, int charSet, int wcharSet) { omg.org.IOP.ServiceContext context = CreateServiceContext(charSet, wcharSet); contexts.AddServiceContext(context); }
public void send_reply(ServerRequestInfo ri) { if (MustNonInterceptCall(ri)) { return; } m_outPathResult = OutPathResult.Reply; if (m_contextReceived != null) { TestServiceContext resultContextEntry = new TestServiceContext(((TestServiceContext)m_contextReceived).TestEntry); ServiceContext context = new ServiceContext(1000, m_codec.encode(resultContextEntry)); ri.add_reply_service_context(context, true); } }
public void send_request(ClientRequestInfo ri) { object testEntryBeginAsObject = ri.get_slot(m_slotId); if (testEntryBeginAsObject != null) { int testEntryBegin = (int)testEntryBeginAsObject; TestServiceContext contextEntry = new TestServiceContext(); contextEntry.TestEntry = testEntryBegin; ServiceContext context = new ServiceContext(1000, m_codec.encode(contextEntry)); ri.add_request_service_context(context, true); } }
public void send_reply(ServerRequestInfo ri) { object testEntryAsObject = ri.get_slot(m_slotId); if (testEntryAsObject != null) { int entryResult = (int)testEntryAsObject; TestServiceContext resultContextEntry = new TestServiceContext(entryResult); ServiceContext context = new ServiceContext(1000, m_codec.encode(resultContextEntry)); ri.add_reply_service_context(context, true); } }
/// <summary><see cref="omg.org.PortableInterceptor.ServerRequestInfo.add_reply_service_context"></see></summary> public void add_reply_service_context(ServiceContext service_context, bool replace) { if ((!m_serverRequest.ResponseServiceContext.ContainsServiceContext(service_context.context_id)) || replace) { m_serverRequest.ResponseServiceContext.AddServiceContext(service_context); } else { throw new BAD_INV_ORDER(11, CompletionStatus.Completed_MayBe); } }
/// <summary> /// add a service context to the list. /// </summary> public void AddServiceContext(ServiceContext context) { m_contexts[context.context_id] = context; }
private void ReadSvcContextList(CdrInputStream inputStream) { uint nrOfServiceContexts = inputStream.ReadULong(); for (int i = 0; i < nrOfServiceContexts; i++) { ServiceContext context = new ServiceContext(inputStream); if (!m_contexts.Contains(context.context_id)) { m_contexts[context.context_id] = context; } else { // ignore multiple contexts with same id; iop interfaces allow access by id Debug.WriteLine("ignoring duplicate context with id: " + context.context_id); } } }
/// <summary> /// <see cref="omg.org.PortableInterceptor.ClientRequestInterceptor.send_request"></see> /// </summary> public void send_request(ClientRequestInfo ri) { ClientRequestInfoImpl internalInfo = (ClientRequestInfoImpl)ri; // need access to connection information if ((internalInfo.ConnectionDesc.Connection.IsInitiatedLocal()) && // initiated in this appdomain (internalInfo.ConnectionDesc.ConnectionManager.SupportBiDir())) { GiopBidirectionalConnectionManager biDirConManager = (GiopBidirectionalConnectionManager)internalInfo.ConnectionDesc.ConnectionManager; ListenPoint[] listenPointsEntry = ConvertToListenPoints(biDirConManager.GetOwnListenPoints()); BiDirIIOPServiceContext contextEntry = new BiDirIIOPServiceContext(listenPointsEntry); ServiceContext svcContext = new ServiceContext(BI_DIR_IIOP.ConstVal, m_codec.encode_value(contextEntry)); ri.add_request_service_context(svcContext, true); biDirConManager.SetupConnectionForBidirReception(internalInfo.ConnectionDesc); } }
public void send_request(ClientRequestInfo ri) { if (MustNonInterceptCall(ri)) { return; } m_invokedOnOutPath = true; TestServiceContext contextEntry = new TestServiceContext(); contextEntry.TestEntry = m_contextEntryBegin; ServiceContext context = new ServiceContext(1000, m_codec.encode(contextEntry)); ri.add_request_service_context(context, true); try { TaggedComponent taggedComponentEnc = ri.get_effective_component(1000); omg.org.CORBA.TypeCode typeCode = omg.org.CORBA.OrbServices.GetSingleton().create_tc_for_type(typeof(TestComponent)); m_taggedComponent = m_codec.decode_value(taggedComponentEnc.component_data, typeCode); } catch (BAD_PARAM) { m_taggedComponent = null; } }