internal override LocalizedString When() { if (base.RecurrenceInterval == 1) { return(ClientStrings.TaskWhenMonthlyRegeneratingPattern); } return(ClientStrings.TaskWhenNMonthsRegeneratingPattern(base.RecurrenceInterval)); }
private void WriteEnablementInstructions(StreamWriter streamWriter, bool turnOn) { if (turnOn) { this.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationEnableDeepLink(this.GetOptionsDeepLink())); return; } this.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationDisableDeepLink(this.GetOptionsDeepLink())); }
internal override LocalizedString When() { if (Recurrence.IsGregorianCompatible(this.CalendarType)) { if (base.RecurrenceInterval == 1) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.CalendarWhenMonthlyEveryMonth(this.DayOfMonth)); } return(ClientStrings.TaskWhenMonthlyEveryMonth(this.DayOfMonth)); } else if (base.RecurrenceInterval == 2) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.CalendarWhenMonthlyEveryOtherMonth(this.DayOfMonth)); } return(ClientStrings.TaskWhenMonthlyEveryOtherMonth(this.DayOfMonth)); } else { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.CalendarWhenMonthlyEveryNMonths(this.DayOfMonth, base.RecurrenceInterval)); } return(ClientStrings.TaskWhenMonthlyEveryNMonths(this.DayOfMonth, base.RecurrenceInterval)); } } else if (base.RecurrenceInterval == 1) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.AlternateCalendarWhenMonthlyEveryMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth)); } return(ClientStrings.AlternateCalendarTaskWhenMonthlyEveryMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth)); } else if (base.RecurrenceInterval == 2) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.AlternateCalendarWhenMonthlyEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth)); } return(ClientStrings.AlternateCalendarTaskWhenMonthlyEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth)); } else { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.AlternateCalendarWhenMonthlyEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth, base.RecurrenceInterval)); } return(ClientStrings.AlternateCalendarTaskWhenMonthlyEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), this.DayOfMonth, base.RecurrenceInterval)); } }
protected override void WriteMessageBody(StreamWriter streamWriter) { string clutterFolderName = ClientStrings.ClutterFolderName.ToString(base.Culture); base.WriteHeader(streamWriter, ClientStrings.ClutterNotificationPeriodicHeader); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationPeriodicIntro(clutterFolderName)); base.WriteSurveyInstructions(streamWriter); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationPeriodicCheckBack, 20U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationO365DisplayName, 0U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationPeriodicLearnMore(ClutterNotification.LearnMoreUrl)); }
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())); } }
internal override LocalizedString When() { if (Recurrence.IsGregorianCompatible(this.CalendarType)) { if (base.RecurrenceInterval == 1) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.CalendarWhenMonthlyThEveryMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } return(ClientStrings.TaskWhenMonthlyThEveryMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } else if (base.RecurrenceInterval == 2) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.CalendarWhenMonthlyThEveryOtherMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } return(ClientStrings.TaskWhenMonthlyThEveryOtherMonth(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } else { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.CalendarWhenMonthlyThEveryNMonths(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval)); } return(ClientStrings.TaskWhenMonthlyThEveryNMonths(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval)); } } else if (base.RecurrenceInterval == 1) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.AlternateCalendarWhenMonthlyThEveryMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } return(ClientStrings.AlternateCalendarTaskWhenMonthlyThEveryMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } else if (base.RecurrenceInterval == 2) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.AlternateCalendarWhenMonthlyThEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } return(ClientStrings.AlternateCalendarTaskWhenMonthlyThEveryOtherMonth(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek))); } else { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { return(ClientStrings.AlternateCalendarWhenMonthlyThEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval)); } return(ClientStrings.AlternateCalendarTaskWhenMonthlyThEveryNMonths(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), base.RecurrenceInterval)); } }
protected override void WriteMessageBody(StreamWriter streamWriter) { base.WriteHeader(streamWriter, ClientStrings.ClutterNotificationAutoEnablementNoticeHeader); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationAutoEnablementNoticeIntro, 30U); base.WriteSubHeader(streamWriter, ClientStrings.ClutterNotificationAutoEnablementNoticeWeCallIt); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationAutoEnablementNoticeHowItWorks); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationAutoEnablementNoticeYoullBeEnabed(AutoEnablementNotice.OptOutUrl)); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationAutoEnablementNoticeItsAutomatic, 20U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationO365Closing, 0U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationO365DisplayName); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationAutoEnablementNoticeLearnMore(ClutterNotification.AnnouncementUrl, ClutterNotification.LearnMoreUrl)); }
protected virtual bool TryGetSharePointSiteUrlAndTitle(Uri collectionUrl, Guid webId, out Uri siteUrl, out string siteTitle, out Exception ex) { ex = null; siteUrl = null; siteTitle = string.Empty; try { using (ClientContext clientContext = new ClientContext(collectionUrl)) { TeamMailboxClientOperations.ConfigureClientContext(clientContext, this.credential, this.isOAuthCredential, this.enableHttpDebugProxy, 60000); Site site = clientContext.Site; Web web = site.OpenWebById(webId); clientContext.Load <Web>(web, new Expression <Func <Web, object> >[] { (Web x) => x.Url, (Web x) => x.Title }); clientContext.ExecuteQuery(); string uriString = null; if (MaintenanceSynchronizer.TryEscapeAndGetWellFormedUrl(web.Url, out uriString)) { siteUrl = new Uri(uriString); siteTitle = web.Title; } else { ex = new SharePointException(web.Url, ClientStrings.ErrorSharePointSiteHasNoValidUrl(web.Url)); } } } catch (ClientRequestException ex2) { ex = ex2; } catch (ServerException ex3) { ex = ex3; } catch (TimeoutException ex4) { ex = ex4; } catch (IOException ex5) { ex = ex5; } catch (WebException ex6) { ex = ex6; } return(ex == null); }
private static LocalizedString GenerateOldFashionedReportBody(MessageItem message, out CultureInfo culture) { message.Load(ReportMessageSchema.Instance.AutoloadProperties); ExDateTime? valueAsNullable = message.GetValueAsNullable <ExDateTime>(InternalSchema.ReportTime); ExTimeZone exTimeZone = ExTimeZone.CurrentTimeZone; StoreSession session = message.Session; if (session != null) { exTimeZone = session.ExTimeZone; } byte[] valueOrDefault = message.GetValueOrDefault <byte[]>(InternalSchema.TimeZoneDefinitionStart); ExTimeZone exTimeZone2; if (valueOrDefault != null && O12TimeZoneFormatter.TryParseTruncatedTimeZoneBlob(valueOrDefault, out exTimeZone2)) { exTimeZone = (TimeZoneHelper.PromoteCustomizedTimeZone(exTimeZone2) ?? exTimeZone2); } culture = ReportMessage.GetMdnCulture(message.CoreItem); LocalizedString originalMessageInfo = ReportMessage.GetOriginalMessageInfo(message, exTimeZone, culture); LocalizedString result; if (ObjectClass.IsReport(message.ClassName, "IPNRN")) { if (valueAsNullable != null) { result = ClientStrings.MdnRead(originalMessageInfo, exTimeZone.ConvertDateTime(valueAsNullable.Value), new LocalizedString(exTimeZone.LocalizableDisplayName.ToString(culture))); } else { result = ClientStrings.MdnReadNoTime(originalMessageInfo); } } else { if (!ObjectClass.IsReport(message.ClassName, "IPNNRN")) { ExTraceGlobals.StorageTracer.TraceDebug((long)message.GetHashCode(), ServerStrings.UnsupportedReportType(message.ClassName)); return(new LocalizedString(ServerStrings.UnsupportedReportType(message.ClassName))); } if (valueAsNullable != null) { result = ClientStrings.MdnNotRead(originalMessageInfo, exTimeZone.ConvertDateTime(valueAsNullable.Value), new LocalizedString(exTimeZone.LocalizableDisplayName.ToString(culture))); } else { result = ClientStrings.MdnNotReadNoTime(originalMessageInfo); } } return(result); }
protected override void WriteMessageBody(StreamWriter streamWriter) { base.WriteHeader(streamWriter, ClientStrings.ClutterNotificationInvitationHeader); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationInvitationIntro, 30U); base.WriteSubHeader(streamWriter, ClientStrings.ClutterNotificationInvitationWeCallIt); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationInvitationHowItWorks); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationInvitationItsAutomatic); base.WriteTurnOnInstructions(streamWriter); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationInvitationIfYouDontLikeIt, 0U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationInvitationLearnMore(ClutterNotification.LearnMoreUrl)); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationInvitationO365Helps, 20U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationO365Closing, 0U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationO365DisplayName); }
protected override void WriteMessageBody(StreamWriter streamWriter) { string clutterFolderName = ClientStrings.ClutterFolderName.ToString(base.Culture); base.WriteHeader(streamWriter, ClientStrings.ClutterNotificationOptInHeader); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationOptInIntro(clutterFolderName)); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationOptInHowToTrain(clutterFolderName)); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationOptInFeedback(ClutterNotification.FeedbackMailtoUrl)); base.WriteTurnOffInstructions(streamWriter); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationOptInPrivacy, 0U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationOptInLearnMore(ClutterNotification.LearnMoreUrl), 20U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationO365Closing, 0U); base.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationO365DisplayName); }
private string GetJoinedByMessage() { LocalizedString localizedString = LocalizedString.Empty; if (this.AddedByRecipient) { BaseGroupMessageComposer.Tracer.TraceDebug((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetJoinedByMessage: executingUser is unknown or by user himself."); localizedString = ClientStrings.GroupMailboxWelcomeEmailSecondaryHeaderYouJoined(this.template.EncodedGroupDisplayName); } else { BaseGroupMessageComposer.Tracer.TraceDebug <ADObjectId, ADObjectId>((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetJoinedByMessage: executingUser is different than the one joining the group, returning message header for added member. ExecutingUser.AdObjectId: {0}, NewMember.AdObjectId: {1}.", this.template.ExecutingUser.Id, this.recipient.Id); localizedString = ClientStrings.GroupMailboxWelcomeEmailSecondaryHeaderAddedBy(this.template.EncodedExecutingUserDisplayName, this.template.EncodedGroupDisplayName); } return(localizedString.ToString(this.preferredCulture)); }
internal override LocalizedString GenerateWhen(bool addTimeZoneInfo) { if (!(base.Pattern is RegeneratingPattern)) { return(base.GenerateWhen(addTimeZoneInfo)); } ExDateTime exDateTime = this.ReadExTimeZone.ConvertDateTime(base.Range.StartDate); LocalizedString localizedString = ClientStrings.WhenRecurringNoEndDateNoTimeInDay(base.Pattern.When(), exDateTime); if (!(base.Range is NoEndRecurrenceRange)) { if (!(base.Range is NumberedRecurrenceRange)) { ExTraceGlobals.TaskTracer.TraceError <RecurrencePattern, RecurrenceRange>((long)this.GetHashCode(), "TaskRecurrence::GenerateWhen. The recurrence range is not allowed in this pattern. Pattern = {0}, Range = {1}.", base.Pattern, base.Range); throw new CorruptDataException(ServerStrings.TaskRecurrenceNotSupported(base.Pattern.ToString(), base.Range.ToString())); } localizedString = ClientStrings.JointStrings(localizedString, ClientStrings.WhenNMoreOccurrences(((NumberedRecurrenceRange)base.Range).NumberOfOccurrences)); } return(localizedString); }
private void WriteSuccessfulResponse(HttpContext context) { string localizedString; string localizedString2; if (this.operationType == ModernGroupMembershipOperationType.Escalate) { localizedString = this.GetLocalizedString(ClientStrings.GroupSubscriptionPageSubscribed(this.encodedGroupDisplayName)); localizedString2 = this.GetLocalizedString(ClientStrings.GroupSubscriptionPageSubscribedInfo); } else { localizedString = this.GetLocalizedString(ClientStrings.GroupSubscriptionPageUnsubscribed(this.encodedGroupDisplayName)); localizedString2 = this.GetLocalizedString(ClientStrings.GroupSubscriptionPageUnsubscribedInfo); } string str = string.Format("<table cellspacing=\"0\"cellpadding=\"0\"border=\"0\" style=\"margin-top:24px; color:#333333;max-width:600px\"><tbody><tr><td style=\"font-size:42px;\">{0}</td></tr><tr><td style=\"font-size:17px;padding-top:30px\">{1}</td></tr></tbody></table>", localizedString, localizedString2); string mainBody = this.groupHeaderDiv + str; context.Response.Write(this.GetMainPage(mainBody)); }
internal static LocalizedString EnumerateDaysOfWeek(DaysOfWeek daysOfWeek) { List <IFormattable> list = new List <IFormattable>(); int num = 0; for (DaysOfWeek daysOfWeek2 = DaysOfWeek.Sunday; daysOfWeek2 <= DaysOfWeek.Saturday; daysOfWeek2 <<= 1) { if ((daysOfWeek & daysOfWeek2) == daysOfWeek2) { list.Add(new LocalizedDayOfWeek((DayOfWeek)num)); } num++; } switch (list.Count) { case 1: return(ClientStrings.WhenOneDayOfWeek(list[0])); case 2: return(ClientStrings.WhenTwoDaysOfWeek(list[0], list[1])); case 3: return(ClientStrings.WhenThreeDaysOfWeek(list[0], list[1], list[2])); case 4: return(ClientStrings.WhenFourDaysOfWeek(list[0], list[1], list[2], list[3])); case 5: return(ClientStrings.WhenFiveDaysOfWeek(list[0], list[1], list[2], list[3], list[4])); case 6: return(ClientStrings.WhenSixDaysOfWeek(list[0], list[1], list[2], list[3], list[4], list[5])); case 7: return(ClientStrings.WhenSevenDaysOfWeek(list[0], list[1], list[2], list[3], list[4], list[5], list[6])); default: ExDiagnostics.FailFast("Wrong daysofweek", true); return(default(LocalizedString)); } }
private string GetSubject() { LocalizedString localizedString; if (this.template.ExecutingUser == null) { BaseGroupMessageComposer.Tracer.TraceDebug((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetSubject: executingUser is unknown, returning subject without JoinedBy."); localizedString = ClientStrings.GroupMailboxAddedMemberNoJoinedBySubject(this.template.Group.DisplayName); } else if (this.template.ExecutingUser.Id.Equals(this.recipient.Id)) { BaseGroupMessageComposer.Tracer.TraceDebug <ADObjectId, ADObjectId>((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetSubject: executingUser is same as user joining the group, returning subject for self-join. ExecutingUser.AdObjectId: {0}, NewMember.AdObjectId: {1}.", this.template.ExecutingUser.Id, this.recipient.Id); localizedString = ClientStrings.GroupMailboxAddedSelfMessageSubject(this.template.Group.DisplayName); } else { BaseGroupMessageComposer.Tracer.TraceDebug <ADObjectId, ADObjectId>((long)this.GetHashCode(), "WelcomeToGroupMessageComposer.GetSubject: executingUser is different than the one joining the group, returning subject for added member. ExecutingUser.AdObjectId: {0}, NewMember.AdObjectId: {1}.", this.template.ExecutingUser.Id, this.recipient.Id); localizedString = ClientStrings.GroupMailboxAddedMemberMessageSubject(this.template.Group.DisplayName); } return(localizedString.ToString(this.preferredCulture)); }
public static EnqueueResult EnqueueTeamMailboxSyncRequest(string targetServer, Guid mailboxGuid, QueueType queueType, OrganizationId orgId, string clientString, string domainController, SyncOption syncOption = SyncOption.Default) { if (mailboxGuid == Guid.Empty) { throw new ArgumentNullException("mailboxGuid"); } if (orgId == null) { throw new ArgumentNullException("orgId"); } if (queueType != QueueType.TeamMailboxDocumentSync && queueType != QueueType.TeamMailboxMembershipSync && queueType != QueueType.TeamMailboxMaintenanceSync) { throw new ArgumentException("queueType"); } RpcClientWrapper.InitializeIfNeeded(); if (!RpcClientWrapper.instance.initialized) { return(new EnqueueResult(EnqueueResultType.ClientInitError, ClientStrings.RpcClientInitError)); } EnqueueResult result; try { using (JobQueueRpcClient jobQueueRpcClient = new JobQueueRpcClient(targetServer ?? RpcClientWrapper.instance.localServer.Fqdn)) { TeamMailboxSyncRpcInParameters teamMailboxSyncRpcInParameters = new TeamMailboxSyncRpcInParameters(mailboxGuid, orgId, clientString, syncOption, domainController); byte[] data = jobQueueRpcClient.EnqueueRequest(1, (int)queueType, teamMailboxSyncRpcInParameters.Serialize()); EnqueueRequestRpcOutParameters enqueueRequestRpcOutParameters = new EnqueueRequestRpcOutParameters(data); result = enqueueRequestRpcOutParameters.Result; } } catch (RpcException ex) { result = new EnqueueResult(EnqueueResultType.RpcError, ClientStrings.RpcClientRequestError(ex.Message)); } return(result); }
internal override LocalizedString When() { LocalizedString result; if (base.RecurrenceInterval == 1) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenDailyEveryDay; } else { result = ClientStrings.TaskWhenDailyEveryDay; } } else if (base.RecurrenceInterval == 2) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenEveryOtherDay; } else { result = ClientStrings.TaskWhenEveryOtherDay; } } else if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenDailyEveryNDays(base.RecurrenceInterval); } else { result = ClientStrings.TaskWhenDailyEveryNDays(base.RecurrenceInterval); } return(result); }
internal override LocalizedString When() { LocalizedString result; if (base.RecurrenceInterval == 1) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenWeeklyEveryWeek(new LocalizedDaysOfWeek(this.DaysOfWeek, this.FirstDayOfWeek)); } else { result = ClientStrings.TaskWhenWeeklyEveryWeek(new LocalizedDaysOfWeek(this.DaysOfWeek, this.FirstDayOfWeek)); } } else if (base.RecurrenceInterval == 2) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenWeeklyEveryAlterateWeek(new LocalizedDaysOfWeek(this.DaysOfWeek, this.FirstDayOfWeek)); } else { result = ClientStrings.TaskWhenWeeklyEveryAlterateWeek(new LocalizedDaysOfWeek(this.DaysOfWeek, this.FirstDayOfWeek)); } } else if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenWeeklyEveryNWeeks(base.RecurrenceInterval, new LocalizedDaysOfWeek(this.DaysOfWeek, this.FirstDayOfWeek)); } else { result = ClientStrings.TaskWhenWeeklyEveryNWeeks(base.RecurrenceInterval, new LocalizedDaysOfWeek(this.DaysOfWeek, this.FirstDayOfWeek)); } return(result); }
internal override LocalizedString When() { LocalizedString result; if (Recurrence.IsGregorianCompatible(this.CalendarType)) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenYearly(new LocalizedMonth(this.month), this.DayOfMonth); } else { result = ClientStrings.TaskWhenYearly(new LocalizedMonth(this.month), this.DayOfMonth); } } else if (this.IsLeapMonth) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.AlternateCalendarWhenYearlyLeap(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth); } else { result = ClientStrings.AlternateCalendarTaskWhenYearlyLeap(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth); } } else if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.AlternateCalendarWhenYearly(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth); } else { result = ClientStrings.AlternateCalendarTaskWhenYearly(Recurrence.GetCalendarName(this.CalendarType), this.month, this.DayOfMonth); } return(result); }
internal override LocalizedString When() { LocalizedString result; if (Recurrence.IsGregorianCompatible(this.CalendarType)) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.CalendarWhenYearlyTh(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), new LocalizedMonth(this.Month)); } else { result = ClientStrings.TaskWhenYearlyTh(MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), new LocalizedMonth(this.Month)); } } else if (this.IsLeapMonth) { if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.AlternateCalendarWhenYearlyThLeap(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month); } else { result = ClientStrings.AlternateCalendarTaskWhenYearlyThLeap(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month); } } else if (base.RecurrenceObjectType == RecurrenceObjectType.CalendarRecurrence) { result = ClientStrings.AlternateCalendarWhenYearlyTh(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month); } else { result = ClientStrings.AlternateCalendarTaskWhenYearlyTh(Recurrence.GetCalendarName(this.CalendarType), MonthlyThRecurrencePattern.OrderAsString(this.Order), new LocalizedDaysOfWeek(this.DaysOfWeek), this.Month); } return(result); }
public UserPhotoFileTooSmallException() : base(ClientStrings.UserPhotoFileTooSmall(0)) { }
private void DecorateMissingItemRumBody(MessageItem message, string textToInject, MissingAttendeeItemRumInfo info) { string localizedString = this.GetLocalizedString(ClientStrings.MissingItemRumDescription("2013"), message); this.DecorateRumBody(message, textToInject, localizedString, null); }
private string GetHtmlLink(string unsubscribeUrl) { string link = string.Format("<a id='{0}' href=\"{1}\">{2}</a>", "BD5134C6-8D33-4ABA-A0C4-08581FDF89DB", unsubscribeUrl, ClientStrings.GroupSubscriptionUnsubscribeLinkWord.ToString(this.cultureInfo)); string groupName = AntiXssEncoder.HtmlEncode(this.groupDisplayName, false); return("<br /><div style=\"display:inline-block\" ><table border=\"0\" cellspacing=\"0\" style=\"background-color:#F4F4F4;\" ><tr><td style=\"padding:20px; font-size:12px; color:#666666\" >" + ClientStrings.GroupSubscriptionUnsubscribeInfoHtml(groupName, link).ToString(this.cultureInfo) + "</tr></td></table></div>"); }
public ClientStringsLocDescriptionAttribute(ClientStrings.IDs ids) : base(ClientStrings.GetLocalizedString(ids)) { }
protected void WriteSurveyInstructions(StreamWriter streamWriter) { this.WriteParagraph(streamWriter, ClientStrings.ClutterNotificationTakeSurveyDeepLink(this.GetOptionsDeepLink())); }
protected override LocalizedString GetSyncIssueEmailErrorString(string error, out LocalizedString body) { body = ClientStrings.FailedToSynchronizeHierarchyChangesFromSharePointText(this.siteUri.AbsoluteUri, error); return(ClientStrings.FailedToSynchronizeChangesFromSharePoint(this.siteUri.AbsoluteUri)); }
public static void WriteWarmingMessageBody(StreamWriter streamWriter, string encodedGroupDisplayName, CultureInfo cultureInfo) { ArgumentValidator.ThrowIfNull("streamWriter", streamWriter); streamWriter.Write(string.Format("<html><body><font face={0}><table cellspacing=\"0\"cellpadding=\"0\"border=\"0\"><tbody><tr><td style=\"height:64px;\"colspan=\"2\">{1}</td></tr><tr><td colspan=\"2\"><div style=\"margin-top:0px;height:20px;\"/></td></tr></tbody></table><table style=\"font-size:8pt;margin-top:0px;border-color:#EAEAEA\"align=\"left\"cellspacing=\"0\"cellpadding=\"0\"width=\"639\"border=\"0\"><tbody><tr>{2}</tr></tbody></table></font></body></html>", ClientStrings.GroupMailboxAddedMemberMessageFont.ToString(cultureInfo), string.Format("<div style=\"margin-left:20px;font-size:18pt;color:#0072C6\">{0}</div><div style=\"margin-left:20px;margin-top:5px;font-size:10pt;color:#000000\">{1}</div>", ClientStrings.GroupMailboxWelcomeMessageHeader1(encodedGroupDisplayName).ToString(cultureInfo), ClientStrings.GroupMailboxWelcomeMessageHeader2.ToString(cultureInfo)), WelcomeMessageBodyBuilder.GenerateGroupContent(cultureInfo, ModernGroupObjectType.None, null, null, null))); }
private string GetPlainTextLink(string unsubscribeUrl) { return("\n\n" + ClientStrings.GroupSubscriptionUnsubscribeInfoText(this.groupDisplayName, unsubscribeUrl).ToString(this.cultureInfo)); }
private void DecorateRumBody(MessageItem message, string textToInject, string description, List <KeyValuePair <string, List <string> > > details) { string arg = string.Format("<p><font color='#000000' size='2' face='Tahoma'>{0}</font></p>", description); string arg2 = string.Empty; if (details != null && details.Count != 0) { StringBuilder stringBuilder = new StringBuilder(); foreach (KeyValuePair <string, List <string> > keyValuePair in details) { StringBuilder stringBuilder2 = new StringBuilder(); foreach (string arg3 in keyValuePair.Value) { stringBuilder2.AppendFormat("<tr><td width='29'> </td><td><font color='#000000' size='2' face='Tahoma'>{0}</font></td></tr>", arg3); } stringBuilder.AppendFormat("<table border='0' cellpadding='2'><tr><td width='29'> </td><td><b><font color='#808080' size='2' face='Tahoma'>{0}</font></b></td></tr>{1}</table><br />", keyValuePair.Key, stringBuilder2); } arg2 = stringBuilder.ToString(); } string arg4 = string.Format("<hr/><font color='#808080' size='1' face='Arial'>{0}</font>", this.GetLocalizedString(ClientStrings.RumFooter("2013"), message)); BodyWriteConfiguration bodyWriteConfiguration = new BodyWriteConfiguration(BodyFormat.TextHtml); if (!string.IsNullOrEmpty(textToInject)) { bodyWriteConfiguration.AddInjectedText(textToInject, null, BodyInjectionFormat.Text); } using (TextWriter textWriter = message.Body.OpenTextWriter(bodyWriteConfiguration)) { textWriter.Write(string.Format("<html><body>{0}{1}{2}</body></html>", arg, arg2, arg4)); } }