Ejemplo 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);
 }
Ejemplo n.º 2
0
 /// <remarks/>
 public System.IAsyncResult BeginGetFolder(GetFolderType GetFolder1, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetFolder", new object[] {
             GetFolder1}, callback, asyncState);
 }
Ejemplo n.º 3
0
 /// <remarks/>
 public void GetFolderAsync(GetFolderType GetFolder1)
 {
     this.GetFolderAsync(GetFolder1, null);
 }
Ejemplo n.º 4
0
        public BaseFolderType GetFolder(DistinguishedFolderIdNameType folderType)
        {
            var binding = ChannelHelper.BuildChannel(hostname, username, password);

            var getFolderType = new GetFolderType
                {
                    FolderIds = new[] { new DistinguishedFolderIdType { Id = folderType } },
                    FolderShape = new FolderResponseShapeType { BaseShape = DefaultShapeNamesType.AllProperties }
                };

            var getFolderResponse = binding.GetFolder(getFolderType);

            if (getFolderResponse.ResponseMessages.Items[0].ResponseClass == ResponseClassType.Error)
                throw new Exception(getFolderResponse.ResponseMessages.Items[0].MessageText);

            return ((FolderInfoResponseMessageType) getFolderResponse.ResponseMessages.Items[0]).Folders[0];
        }