Next() static private method

Get the next value of the client ID
static private Next ( ) : string
return string
        /// <summary>
        /// Builds a Sync add request by using the specified sync key, folder collection ID and add application data.
        /// In general, returns the XMl formatted Sync request as follows:
        /// <!--
        /// <?xml version="1.0" encoding="utf-8"?>
        /// <Sync xmlns="AirSync">
        ///   <Collections>
        ///     <Collection>
        ///       <SyncKey>0</SyncKey>
        ///       <CollectionId>5</CollectionId>
        ///       <GetChanges>1</GetChanges>
        ///       <WindowSize>152</WindowSize>
        ///        <Commands>
        ///            <Add>
        ///                <ServerId>5:1</ServerId>
        ///                <ApplicationData>
        ///                    ...
        ///                </ApplicationData>
        ///            </Add>
        ///        </Commands>
        ///     </Collection>
        ///   </Collections>
        /// </Sync>
        /// -->
        /// </summary>
        /// <param name="collectionId">Specify the server ID of the folder to be synchronized, which can be returned by ActiveSync FolderSync command(Refer to [MS-ASCMD]2.2.3.30.5)</param>
        /// <param name="syncKey">Specify the sync key obtained from the last sync response(Refer to [MS-ASCMD]2.2.3.166.4)</param>
        /// <param name="addCalendars">Contains the data used to specify the Add element for Sync command(Refer to [MS-ASCMD]2.2.3.7.2)</param>
        /// <returns>Returns the SyncRequest instance</returns>
        internal static SyncRequest CreateSyncAddRequest(string collectionId, string syncKey, Request.SyncCollectionAddApplicationData addCalendars)
        {
            SyncRequest syncAddRequest;

            Request.SyncCollectionAdd add = new Request.SyncCollectionAdd
            {
                ClientId        = TestSuiteHelper.Next(),
                ApplicationData = addCalendars
            };

            List <object> commandList = new List <object> {
                add
            };

            // The Sync request include the GetChanges element of the Collection element will set to 0 (FALSE)
            syncAddRequest = TestSuiteHelper.CreateSyncRequest(collectionId, syncKey, false);
            syncAddRequest.RequestData.Collections[0].Commands = commandList.ToArray();

            return(syncAddRequest);
        }
        /// <summary>
        /// Using mail with mime content to send a meeting request or cancel request
        /// </summary>
        /// <param name="calendarItem">Calendar information</param>
        /// <param name="subjectName">The subject name of meeting request mail</param>
        /// <param name="organizerEmailAddress">The organizer email address</param>
        /// <param name="attendeeEmailAddress">The attendee email address</param>
        /// <param name="method">Specify normal appointments from meeting requests, responses, and cancellations, it can be set to 'REQUEST', 'REPLY', or 'CANCEL'</param>
        /// <param name="replyMethod">Specify REPLY method, it can be set to 'ACCEPTED', 'TENTATIVE', or 'DECLINED'</param>
        protected void SendMimeMeeting(Calendar calendarItem, string subjectName, string organizerEmailAddress, string attendeeEmailAddress, string method, string replyMethod)
        {
            string icalendarContent = string.Empty;

            switch (method.ToUpper(CultureInfo.CurrentCulture))
            {
            case "REQUEST":
            case "CANCEL":
                icalendarContent = TestSuiteHelper.CreateiCalendarFormatContent(calendarItem, method, replyMethod, organizerEmailAddress, attendeeEmailAddress);
                break;

            case "REPLY":
                icalendarContent = TestSuiteHelper.CreateiCalendarFormatContent(calendarItem, method, replyMethod, attendeeEmailAddress, organizerEmailAddress);
                break;
            }

            string body = string.Empty;

            string mime = TestSuiteHelper.CreateMeetingRequestMime(
                organizerEmailAddress,
                attendeeEmailAddress,
                subjectName,
                body,
                icalendarContent);

            // Send a meeting request
            SendMailRequest  sendMailRequest  = TestSuiteHelper.CreateSendMailRequest(TestSuiteHelper.Next(), false, mime);
            SendMailResponse sendMailResponse = this.CALAdapter.SendMail(sendMailRequest);

            Site.Assert.AreEqual <string>(
                string.Empty,
                sendMailResponse.ResponseDataXML,
                "The server should return an empty xml response data to indicate SendMail command success.");
        }