コード例 #1
0
 // Token: 0x0600162D RID: 5677 RVA: 0x000510B7 File Offset: 0x0004F2B7
 internal OwaServiceHttpHandlerBase(HttpContext httpContext, OWAService service, ServiceMethodInfo methodInfo)
 {
     this.HttpContext       = httpContext;
     this.Service           = service;
     this.ServiceMethodInfo = methodInfo;
     this.Inspector         = new OwaServiceMessageInspector();
     this.MethodDispatcher  = new OwaServiceMethodDispatcher(this.Inspector);
 }
コード例 #2
0
        public void ProcessRequest(HttpContext context)
        {
            Exception ex = null;

            this.Initialize(context.Response);
            try
            {
                OwaServerTraceLogger.AppendToLog(new TraceLogEvent("GrEsProcReq", null, "GroupSubscriptionHandler.ProcessRequest", "Started processing request: " + context.Request.RawUrl));
                OWAService         owaservice  = new OWAService();
                CallContext        callContext = GroupSubscriptionHandler.CreateAndSetCallContext(context);
                IExchangePrincipal mailboxIdentityPrincipal = callContext.MailboxIdentityPrincipal;
                try
                {
                    this.SetPreferredCulture(mailboxIdentityPrincipal);
                    this.ValidateRequestMadeToGroupMailbox(callContext);
                    string action = this.ValidateAndGetActionString(context);
                    this.ParseEscalateOperationType(action);
                    if (this.RedirectToOwaGroupPageIfPossible(mailboxIdentityPrincipal, callContext, context.Response))
                    {
                        return;
                    }
                    this.BuildGroupHeaderDiv(mailboxIdentityPrincipal);
                    SetModernGroupMembershipJsonRequest modernGroupMembership = new SetModernGroupMembershipJsonRequest
                    {
                        GroupSmtpAddress = mailboxIdentityPrincipal.MailboxInfo.PrimarySmtpAddress.ToString(),
                        OperationType    = this.operationType.Value
                    };
                    SetModernGroupMembershipJsonResponse ewsresponse = owaservice.SetModernGroupMembership(modernGroupMembership);
                    this.ValidateEwsResponse(ewsresponse);
                    this.WriteSuccessfulResponse(context);
                }
                finally
                {
                    GroupSubscriptionHandler.DisposeContext(callContext);
                }
            }
            catch (ExceededMaxSubscribersException)
            {
                this.WriteErrorResponse(context, ClientStrings.GroupSubscriptionPageSubscribeFailedMaxSubscribers(this.encodedGroupDisplayName));
            }
            catch (NotAMemberException)
            {
                this.WriteErrorResponse(context, ClientStrings.GroupSubscriptionPageSubscribeFailedNotAMember(this.encodedGroupDisplayName));
            }
            catch (Exception ex2)
            {
                this.WriteErrorResponse(context, ClientStrings.GroupSubscriptionPageRequestFailedInfo);
                ex = ex2;
            }
            if (ex != null)
            {
                OwaServerTraceLogger.AppendToLog(new TraceLogEvent("GrEsProcReq", null, "GroupSubscriptionHandler.ProcessRequest", "Error processing request: " + ex.ToString()));
            }
        }
コード例 #3
0
        public static CreateAttachmentResponse CreateAttachment(CreateAttachmentRequest request)
        {
            CreateAttachmentJsonRequest createAttachmentJsonRequest = new CreateAttachmentJsonRequest();

            createAttachmentJsonRequest.Body = request;
            OWAService   owaservice  = new OWAService();
            IAsyncResult asyncResult = owaservice.BeginCreateAttachment(createAttachmentJsonRequest, null, null);

            asyncResult.AsyncWaitHandle.WaitOne();
            return(owaservice.EndCreateAttachment(asyncResult).Body);
        }
コード例 #4
0
        // Token: 0x06001BFB RID: 7163 RVA: 0x0006D404 File Offset: 0x0006B604
        private static GetMailTipsResponseMessage InvokeGetMailTipsSynchronous(UserContext userContext, GetMailTipsRequest request)
        {
            OwaServerTraceLogger.AppendToLog(new TraceLogEvent("UpdateAttachmentPermissions-GetMailTipsBegin", userContext, "InvokeGetMailTipsSynchronous", "Starting Synchronous call to GetMailTips"));
            GetMailTipsJsonRequest getMailTipsJsonRequest = new GetMailTipsJsonRequest();

            getMailTipsJsonRequest.Body = request;
            OWAService   owaservice  = new OWAService();
            IAsyncResult asyncResult = owaservice.BeginGetMailTips(getMailTipsJsonRequest, null, null);

            asyncResult.AsyncWaitHandle.WaitOne();
            GetMailTipsResponseMessage body = owaservice.EndGetMailTips(asyncResult).Body;

            OwaServerTraceLogger.AppendToLog(new TraceLogEvent("UpdateAttachmentPermissions-GetMailTipsEnd", userContext, "InvokeGetMailTipsSynchronous", "Ending Synchronous call to GetMailTips"));
            return(body);
        }
コード例 #5
0
        // Token: 0x0600012E RID: 302 RVA: 0x0000514C File Offset: 0x0000334C
        public static bool DeleteAttachment(AttachmentIdType attachmentId)
        {
            bool result = false;

            if (attachmentId != null)
            {
                DeleteAttachmentJsonRequest deleteAttachmentJsonRequest = new DeleteAttachmentJsonRequest();
                DeleteAttachmentRequest     deleteAttachmentRequest     = new DeleteAttachmentRequest();
                deleteAttachmentRequest.AttachmentIds    = new AttachmentIdType[1];
                deleteAttachmentRequest.AttachmentIds[0] = attachmentId;
                deleteAttachmentJsonRequest.Body         = deleteAttachmentRequest;
                OWAService   owaservice  = new OWAService();
                IAsyncResult asyncResult = owaservice.BeginDeleteAttachment(deleteAttachmentJsonRequest, null, null);
                asyncResult.AsyncWaitHandle.WaitOne();
                DeleteAttachmentResponse body = owaservice.EndDeleteAttachment(asyncResult).Body;
                if (body != null && body.ResponseMessages != null && body.ResponseMessages.Items != null && body.ResponseMessages.Items[0] != null)
                {
                    result = (body.ResponseMessages.Items[0].ResponseCode == ResponseCodeType.NoError);
                }
            }
            return(result);
        }
コード例 #6
0
        // Token: 0x06001AD2 RID: 6866 RVA: 0x00065C5C File Offset: 0x00063E5C
        private static void PostUploadMessage(string groupAddress, string userAddress, string userDisplayName, BaseItemId referenceItemId, string fileName, string contentUrl, string providerType, string endpointUrl, string sessionId)
        {
            BodyContentType bodyContentType = new BodyContentType();

            bodyContentType.Value = string.Format(Strings.ModernGroupAttachmentUploadNoticeBody, fileName, userDisplayName);
            ReferenceAttachmentType referenceAttachmentType = new ReferenceAttachmentType();

            referenceAttachmentType.AttachLongPathName  = contentUrl;
            referenceAttachmentType.ProviderEndpointUrl = endpointUrl;
            referenceAttachmentType.ProviderType        = providerType;
            referenceAttachmentType.Name = fileName;
            ReplyToItemType replyToItemType = new ReplyToItemType();

            replyToItemType.NewBodyContent  = bodyContentType;
            replyToItemType.Attachments     = new AttachmentType[1];
            replyToItemType.Attachments[0]  = referenceAttachmentType;
            replyToItemType.ReferenceItemId = referenceItemId;
            PostModernGroupItemJsonRequest postModernGroupItemJsonRequest = new PostModernGroupItemJsonRequest();

            postModernGroupItemJsonRequest.Body       = new PostModernGroupItemRequest();
            postModernGroupItemJsonRequest.Body.Items = new NonEmptyArrayOfAllItemsType();
            postModernGroupItemJsonRequest.Body.Items.Add(replyToItemType);
            postModernGroupItemJsonRequest.Body.ModernGroupEmailAddress = new EmailAddressWrapper();
            postModernGroupItemJsonRequest.Body.ModernGroupEmailAddress.EmailAddress = groupAddress;
            postModernGroupItemJsonRequest.Body.ModernGroupEmailAddress.MailboxType  = MailboxHelper.MailboxTypeType.GroupMailbox.ToString();
            OWAService owaservice = new OWAService();

            GetWacAttachmentInfo.PostUploadMessageAsyncState postUploadMessageAsyncState = new GetWacAttachmentInfo.PostUploadMessageAsyncState();
            postUploadMessageAsyncState.MailboxSmtpAddress = groupAddress;
            postUploadMessageAsyncState.LogonSmtpAddress   = userAddress;
            postUploadMessageAsyncState.OwaService         = owaservice;
            postUploadMessageAsyncState.SessionId          = sessionId;
            IAsyncResult asyncResult = owaservice.BeginPostModernGroupItem(postModernGroupItemJsonRequest, null, null);

            asyncResult.AsyncWaitHandle.WaitOne();
            PostModernGroupItemResponse body = owaservice.EndPostModernGroupItem(asyncResult).Body;
        }
コード例 #7
0
 // Token: 0x06001683 RID: 5763 RVA: 0x00053124 File Offset: 0x00051324
 internal OwaServiceHttpAsyncHandler(HttpContext httpContext, OWAService service, ServiceMethodInfo methodInfo) : base(httpContext, service, methodInfo)
 {
 }
コード例 #8
0
 // Token: 0x0600167D RID: 5757 RVA: 0x00052FCF File Offset: 0x000511CF
 internal OwaServiceHttpHandler(HttpContext httpContext, OWAService service, ServiceMethodInfo methodInfo) : base(httpContext, service, methodInfo)
 {
     this.FaultHandler = new OWAFaultHandler();
 }