Microsoft.Protocols.TestSuites.MS_OXCSTOR.MS_OXCSTORAdapter.DoRopCall C# (CSharp) Method

DoRopCall() public method

Send ROP request with single operation with expected SuccessResponse.
public DoRopCall ( ISerializable ropRequest, uint inputObjHandle, ROPCommandType commandType, RopOutputBuffer &outputBuffer, string mailBoxUser = null ) : void
ropRequest ISerializable ROP request objects.
inputObjHandle uint Server object handle in request.
commandType ROPCommandType ROP commands type
outputBuffer RopOutputBuffer ROP response buffer
mailBoxUser string Mailbox which to logon to
return void
        public void DoRopCall(ISerializable ropRequest, uint inputObjHandle, ROPCommandType commandType, out RopOutputBuffer outputBuffer, string mailBoxUser = null)
        {
            outputBuffer = new RopOutputBuffer();
            List<ISerializable> inputBuffer = new List<ISerializable>
            {
                ropRequest
            };
            List<uint> requestSOH = new List<uint>();
            requestSOH.Add(inputObjHandle);

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

            List<IDeserializable> responses = new List<IDeserializable>();
            List<List<uint>> responseSOHTable = new List<List<uint>>();
            byte[] rawData = null;
            uint ret = this.oxcropsClient.RopCall(inputBuffer, requestSOH, ref responses, ref responseSOHTable, ref rawData, 0x10008, mailBoxUser);
            if (ret != 0)
            {
                Site.Assert.Fail("Calling RopCall should return 0 for success, but it returns value: {0}", ret);
            }

            this.VerifyRPC();
            this.VerifyTransport();
            outputBuffer.RopsList = responses;
            outputBuffer.ServerObjectHandleTable = responseSOHTable[0];

            IDeserializable response = null;
            if (commandType != ROPCommandType.Others)
            {
                response = responses[0x0];
            }

            switch (commandType)
            {
                case ROPCommandType.RopLogonPrivateMailbox:
                    this.VerifyRopLogonForPrivateMailbox((RopLogonRequest)ropRequest, (RopLogonResponse)response);
                    break;
                case ROPCommandType.RopLogonPublicFolder:
                    this.VerifyRopLogonForPublicFolder((RopLogonRequest)ropRequest, (RopLogonResponse)response);
                    break;
                case ROPCommandType.RopGetOwningServers:
                    this.VerifyRopGetOwningServers((RopGetOwningServersResponse)response);
                    break;
                case ROPCommandType.RopGetPerUserLongTermIds:
                    this.VerifyRopGetPerUserLongTermIds((RopGetPerUserLongTermIdsResponse)response);
                    break;
                case ROPCommandType.RopGetPerUserGuid:
                    this.VerifyRopGetPerUserGuid((RopGetPerUserGuidResponse)response);
                    break;
                case ROPCommandType.RopSetReceiveFolder:
                    this.VerifyRopSetReceiveFolder((RopSetReceiveFolderResponse)response);
                    break;
                case ROPCommandType.RopGetReceiveFolder:
                    this.VerifyRopGetReceiveFolder((RopGetReceiveFolderResponse)response);
                    break;
                case ROPCommandType.RopGetReceiveFolderTable:
                        this.VerifyRopGetReceiveFolderTable((RopGetReceiveFolderTableResponse)response);
                    break;
                case ROPCommandType.RopPublicFolderIsGhosted:
                    this.VerifyRopPublicFolderIsGhosted((RopPublicFolderIsGhostedResponse)response);
                    break;
                case ROPCommandType.RopLongTermIdFromId:
                    this.VerifyRopLongTermIdFromId((RopLongTermIdFromIdRequest)ropRequest, (RopLongTermIdFromIdResponse)response);
                    break;
                case ROPCommandType.RopIdFromLongTermId:
                    this.VerifyRopIdFromLongTermId((RopIdFromLongTermIdRequest)ropRequest, (RopIdFromLongTermIdResponse)response);
                    break;
                case ROPCommandType.RopReadPerUserInformation:
                    this.VerifyRopReadPerUserInformation((RopReadPerUserInformationResponse)response);
                    break;
                case ROPCommandType.RopWritePerUserInformation:
                    this.VerifyRopWritePerUserInformation((RopWritePerUserInformationResponse)response);
                    break;
                case ROPCommandType.Others:
                    break;
                default:
                    break;
            }
        }