Inheritance: BaseRequestType
Esempio n. 1
0
 /// <remarks/>
 public void GetFolderAsync(GetFolderType GetFolder1, object userState)
 {
     if ((this.GetFolderOperationCompleted == null))
     {
         this.GetFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFolderOperationCompleted);
     }
     this.InvokeAsync("GetFolder", new object[] {
             GetFolder1}, this.GetFolderOperationCompleted, userState);
 }
Esempio n. 2
0
 /// <remarks/>
 public void GetFolderAsync(GetFolderType GetFolder1)
 {
     this.GetFolderAsync(GetFolder1, null);
 }
Esempio n. 3
0
 /// <remarks/>
 public System.IAsyncResult BeginGetFolder(GetFolderType GetFolder1, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetFolder", new object[] {
             GetFolder1}, callback, asyncState);
 }
        /// <summary>
        /// Get folders, Calendar folders, Contacts folders, Tasks folders, and search folders.
        /// </summary>
        /// <param name="request">Request of GetFolder operation.</param>
        /// <returns>Response of GetFolder operation.</returns>
        public GetFolderResponseType GetFolder(GetFolderType request)
        {
            // Send the request and get the response.
            GetFolderResponseType response = this.exchangeServiceBinding.GetFolder(request);
            Site.Assert.IsNotNull(response, "If the operation is successful, the response should not be null.");

            if (ResponseClassType.Success == response.ResponseMessages.Items[0].ResponseClass)
            {
                this.VerifyGetFolderResponse(response, this.exchangeServiceBinding.IsSchemaValidated);
                this.VerifyAllRelatedRequirements(this.exchangeServiceBinding.IsSchemaValidated, response);
            }

            // Verify transport type related requirement.
            this.VerifyTransportType();

            // Verify soap version.
            this.VerifySoapVersion();

            return response;
        }
        /// <summary>
        /// Get folders, Calendar folders, Contacts folders, Tasks folders, and search folders.
        /// </summary>
        /// <param name="request">Request of GetFolder operation.</param>
        /// <returns>Response of GetFolder operation.</returns>
        public GetFolderResponseType GetFolder(GetFolderType request)
        {
            // Send the request and get the response.
            GetFolderResponseType response = this.exchangeServiceBinding.GetFolder(request);
            Site.Assert.IsNotNull(response, "If the operation is successful, the response should not be null.");

            return response;
        }
        /// <summary>
        /// Generate the request message for operation "GetFolder".
        /// </summary>
        /// <param name="shapeName">The properties to include in the response.</param>
        /// <param name="folderIds">An array of folder identifiers.</param>   
        /// <returns>Get folder request instance that will send to server.</returns>
        protected GetFolderType GetGetFolderRequest(DefaultShapeNamesType shapeName, params BaseFolderIdType[] folderIds)
        {
            Site.Assert.IsNotNull(folderIds, "Folders id should not be null!");
            Site.Assert.AreNotEqual<int>(0, folderIds.Length, "Folders id should contains at least one Id!");
            GetFolderType getFolderRequest = new GetFolderType();

            // Specify how many folders need to be gotten.
            int folderCount = folderIds.Length;

            // Set the request's folderId.
            getFolderRequest.FolderIds = new BaseFolderIdType[folderCount];

            for (int folderIdIndex = 0; folderIdIndex < folderCount; folderIdIndex++)
            {
                getFolderRequest.FolderIds[folderIdIndex] = folderIds[folderIdIndex];
            }

            // Set folder shape.
            getFolderRequest.FolderShape = new FolderResponseShapeType();
            getFolderRequest.FolderShape.BaseShape = shapeName;
            return getFolderRequest;
        }