Microsoft.Protocols.TestSuites.MS_OXCNOTIF.MS_OXCNOTIFAdapter.Process C# (CSharp) Method

Process() public method

Send ROP request with single operation, multiple input object handles.
public Process ( ISerializable ropRequest, IEnumerable inputObjHandles, List &responseSOHs ) : IList
ropRequest ISerializable The ROP request.
inputObjHandles IEnumerable The multiple input object handles.
responseSOHs List The Response SOH Table returned by ROP call, provides information like object handle.
return IList
        public IList<IDeserializable> Process(ISerializable ropRequest, IEnumerable<uint> inputObjHandles, out List<List<uint>> responseSOHs)
        {
            List<ISerializable> requestRops = null;
            if (ropRequest != null)
            {
                requestRops = new List<ISerializable>
                {
                    ropRequest
                };
            }

            List<uint> requestSOH = new List<uint>();
            if (inputObjHandles != null)
            {
                requestSOH.AddRange(inputObjHandles);

                if (ropRequest != null && Common.IsOutputHandleInRopRequest(ropRequest))
                {
                    // Add an element for server output object handle, set default value to 0xFFFFFFFF
                    requestSOH.Add(0xFFFFFFFF);
                }
            }

            List<IDeserializable> responseRops = new List<IDeserializable>();

            byte[] rawData = new byte[10008];
            responseSOHs = new List<List<uint>>();
            uint length = 0;

            if (Common.IsRequirementEnabled(81001, this.Site))
            {
                // Refer to MS-OXCRPC section 3.1.4.2 and endnote 22, the minimal value of pcbOut is 0x00008007 in Exchange 2007. 
                // So set the value of pcbOut to 0xC350 in Exchange 2007.
                length = 0xC350;
            }

            if (Common.IsRequirementEnabled(81002, this.Site))
            {
                // Refer to MS-OXCRPC section 3.1.4.2 and endnote 22, the minimal value of pcbOut is 0x00000008 in Exchange 2010 and Exchange 2013.
                // Set the value of pcbOut to 0x190 in Exchange 2010 and Exchange 2013.
                length = 0x190;
            }

            uint maxPcbout = (uint)(ropRequest == null ? length : 0x10008);
            uint ret = this.oxcRopsClient.RopCall(requestRops, requestSOH, ref responseRops, ref responseSOHs, ref rawData, maxPcbout);
            if (ret == OxcRpcErrorCode.ECRpcFormat)
            {
                this.Site.Assert.Fail("Error RPC Format");
            }

            this.Site.Assert.AreEqual<uint>(0x0, ret, "If the response is success, the return value is 0x0.");

            return responseRops.ToList();
        }

Same methods

MS_OXCNOTIFAdapter::Process ( ISerializable requestRop, uint inputObjHandles, List &responseSOHs ) : IList