当前位置: 首页>>代码示例>>C#>>正文


C# EwsServiceXmlWriter.WriteElementValue方法代码示例

本文整理汇总了C#中Microsoft.Exchange.WebServices.Data.EwsServiceXmlWriter.WriteElementValue方法的典型用法代码示例。如果您正苦于以下问题:C# EwsServiceXmlWriter.WriteElementValue方法的具体用法?C# EwsServiceXmlWriter.WriteElementValue怎么用?C# EwsServiceXmlWriter.WriteElementValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Exchange.WebServices.Data.EwsServiceXmlWriter的用法示例。


在下文中一共展示了EwsServiceXmlWriter.WriteElementValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteElementsToXml

        /// <summary>
        /// Writes elements to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.FlagStatus, this.FlagStatus);

            if (this.FlagStatus == ItemFlagStatus.Flagged)
            {
                writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.StartDate, this.StartDate);
                writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.DueDate, this.DueDate);
            }
            else if (this.FlagStatus == ItemFlagStatus.Complete)
            {
                writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.CompleteDate, this.CompleteDate);
            }
        }
开发者ID:asine,项目名称:ews-managed-api,代码行数:18,代码来源:Flag.cs

示例2: WriteElementsToXml

        /// <summary>
        /// Writes the elements to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Mailbox);
            writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.Address, this.SmtpAddress);
            writer.WriteEndElement(); // Mailbox

            this.OofSettings.WriteToXml(writer, XmlElementNames.UserOofSettings);
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:12,代码来源:SetUserOofSettingsRequest.cs

示例3: InternalWritePropertiesToXml

            /// <summary>
            /// Write properties to XML.
            /// </summary>
            /// <param name="writer">The writer.</param>
            internal override void InternalWritePropertiesToXml(EwsServiceXmlWriter writer)
            {
                base.InternalWritePropertiesToXml(writer);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.Interval,
                    this.Interval);
            }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:13,代码来源:Recurrence.IntervalPattern.cs

示例4: InternalWritePropertiesToXml

            /// <summary>
            /// Write properties to XML.
            /// </summary>
            /// <param name="writer">The writer.</param>
            internal override void InternalWritePropertiesToXml(EwsServiceXmlWriter writer)
            {
                base.InternalWritePropertiesToXml(writer);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.DaysOfWeek,
                    this.DayOfTheWeek);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.DayOfWeekIndex,
                    this.DayOfTheWeekIndex);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.Month,
                    this.Month);
            }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:23,代码来源:Recurrence.RelativeYearlyPattern.cs

示例5: WriteElementsToXml

 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     if (!string.IsNullOrEmpty(this.mailboxSmtpAddress))
     {
         writer.WriteElementValue(
             XmlNamespace.Messages,
             XmlElementNames.MailboxSmtpAddress,
             this.mailboxSmtpAddress);
     }
     
     writer.WriteElementValue(
         XmlNamespace.Messages,
         XmlElementNames.RemoveOutlookRuleBlob, 
         this.RemoveOutlookRuleBlob);
     writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.Operations);
     foreach (RuleOperation operation in this.inboxRuleOperations)
     {
         operation.WriteToXml(writer, operation.XmlElementName);
     }
     writer.WriteEndElement();
 }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:25,代码来源:UpdateInboxRulesRequest.cs

示例6: WriteElementsToXml

        /// <summary>
        /// Writes XML elements.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.Manifest);

            writer.WriteBase64ElementValue(manifestStream);

            writer.WriteEndElement();

            if (!string.IsNullOrEmpty(this.marketplaceAssetId))
            {
                writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.MarketplaceAssetId, this.marketplaceAssetId);

                if (!string.IsNullOrEmpty(this.marketplaceContentMarket))
                {
                    writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.MarketplaceContentMarket, this.marketplaceContentMarket);
                }

                writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.SendWelcomeEmail, this.sendWelcomeEmail);
            }

            writer.WriteEndElement();
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:26,代码来源:InstallAppRequest.cs

示例7: WriteToXml

        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="requestedServerVersion">The requested server version.</param>
        internal void WriteToXml(EwsServiceXmlWriter writer, ExchangeVersion requestedServerVersion)
        {
            if (string.IsNullOrEmpty(this.id))
            {
                throw new ArgumentException(Strings.IdPropertyMustBeSet);
            }

            writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.OpenAsAdminOrSystemService);
            writer.WriteAttributeString(XmlElementNames.LogonType, this.logonType.ToString());
            if (requestedServerVersion >= ExchangeVersion.Exchange2013 && this.budgetType.HasValue)
            {
                writer.WriteAttributeString(XmlElementNames.BudgetType, ((int)this.budgetType.Value).ToString());
            }

            writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.ConnectingSID);
            writer.WriteElementValue(XmlNamespace.Types, this.idType.ToString(), this.id);
            writer.WriteEndElement(); // ConnectingSID
            writer.WriteEndElement(); // OpenAsAdminOrSystemService
        }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:24,代码来源:PrivilegedUserId.cs

示例8: WriteToXml

        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal void WriteToXml(EwsServiceXmlWriter writer)
        {
            if (string.IsNullOrEmpty(this.id))
            {
                throw new ArgumentException(Strings.IdPropertyMustBeSet);
            }

            writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.ExchangeImpersonation);
            writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.ConnectingSID);

            // For 2007 SP1, use PrimarySmtpAddress for type SmtpAddress
            string connectingIdTypeLocalName =
                (this.idType == ConnectingIdType.SmtpAddress) && (writer.Service.RequestedServerVersion == ExchangeVersion.Exchange2007_SP1) 
                    ? XmlElementNames.PrimarySmtpAddress 
                    : this.IdType.ToString();

            writer.WriteElementValue(
                XmlNamespace.Types,
                connectingIdTypeLocalName,
                this.id);

            writer.WriteEndElement(); // ConnectingSID
            writer.WriteEndElement(); // ExchangeImpersonation
        }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:28,代码来源:ImpersonatedUserId.cs

示例9: WriteElementsToXml

        /// <summary>
        /// Writes elements to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            if (this.AssignCategories.Count > 0)
            {
                this.AssignCategories.WriteToXml(writer, XmlElementNames.AssignCategories);
            }

            if (this.CopyToFolder != null)
            {
                writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.CopyToFolder);
                this.CopyToFolder.WriteToXml(writer);
                writer.WriteEndElement();
            }

            if (this.Delete != false)
            {
                writer.WriteElementValue(
                    XmlNamespace.Types, 
                    XmlElementNames.Delete, 
                    this.Delete);
            }

            if (this.ForwardAsAttachmentToRecipients.Count > 0)
            {
                this.ForwardAsAttachmentToRecipients.WriteToXml(writer, XmlElementNames.ForwardAsAttachmentToRecipients);
            }

            if (this.ForwardToRecipients.Count > 0)
            {
                this.ForwardToRecipients.WriteToXml(writer, XmlElementNames.ForwardToRecipients);
            }

            if (this.MarkImportance.HasValue)
            {
                writer.WriteElementValue(
                    XmlNamespace.Types, 
                    XmlElementNames.MarkImportance, 
                    this.MarkImportance.Value);
            }

            if (this.MarkAsRead != false)
            {
                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.MarkAsRead,
                    this.MarkAsRead);
            }

            if (this.MoveToFolder != null)
            {
                writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.MoveToFolder);
                this.MoveToFolder.WriteToXml(writer);
                writer.WriteEndElement();
            }

            if (this.PermanentDelete != false)
            {
                writer.WriteElementValue(
                    XmlNamespace.Types, 
                    XmlElementNames.PermanentDelete, 
                    this.PermanentDelete);
            }

            if (this.RedirectToRecipients.Count > 0)
            {
                this.RedirectToRecipients.WriteToXml(writer, XmlElementNames.RedirectToRecipients);
            }

            if (this.SendSMSAlertToRecipients.Count > 0)
            {
                EmailAddressCollection emailCollection = ConvertSMSRecipientsFromMobilePhoneCollectionToEmailAddressCollection(this.SendSMSAlertToRecipients);
                emailCollection.WriteToXml(writer, XmlElementNames.SendSMSAlertToRecipients);
            }

            if (this.ServerReplyWithMessage != null)
            {
                this.ServerReplyWithMessage.WriteToXml(writer, XmlElementNames.ServerReplyWithMessage);
            }

            if (this.StopProcessingRules != false)
            {
                writer.WriteElementValue(
                    XmlNamespace.Types, 
                    XmlElementNames.StopProcessingRules, 
                    this.StopProcessingRules);
            }
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:91,代码来源:RuleActions.cs

示例10: WriteElementsToXml

        /// <summary>
        /// Writes XML elements.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            // Emit the view element
            //
            this.View.WriteToXml(writer, null);

            // Emit the Sort Order
            //
            this.View.WriteOrderByToXml(writer);

            // Emit the Parent Folder Id
            //
            writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.ParentFolderId);
            this.FolderId.WriteToXml(writer);
            writer.WriteEndElement();

            // Emit the MailboxScope flag
            // 
            if (this.MailboxScope.HasValue)
            {
                writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.MailboxScope, this.MailboxScope.Value);
            }

            if (!string.IsNullOrEmpty(this.queryString))
            {
                // Emit the QueryString
                //
                writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.QueryString);

                if (this.ReturnHighlightTerms)
                {
                    writer.WriteAttributeString(XmlAttributeNames.ReturnHighlightTerms, this.ReturnHighlightTerms.ToString().ToLowerInvariant());
                }

                writer.WriteValue(this.queryString, XmlElementNames.QueryString);
                writer.WriteEndElement();
            }

            if (this.Service.RequestedServerVersion >= ExchangeVersion.Exchange2013)
            {
                if (this.View.PropertySet != null)
                {
                    this.View.PropertySet.WriteToXml(writer, ServiceObjectType.Conversation);
                }
            }
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:50,代码来源:FindConversationRequest.cs

示例11: WriteRolesToXml

        /// <summary>
        /// WriteRolesToXml
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="roles"></param>
        /// <param name="elementName"></param>
        private void WriteRolesToXml(EwsServiceXmlWriter writer, string[] roles, string elementName)
        {
            if (roles != null)
            {
                writer.WriteStartElement(XmlNamespace.Types, elementName);

                foreach (string role in roles)
                {
                    writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.Role, role);
                }

                writer.WriteEndElement();
            }
        }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:20,代码来源:ManagementRole.cs

示例12: WriteElementsToXml

        /// <summary>
        /// Writes XML elements.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.ActionType, this.ActionType.ToString());
            writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.HoldId, this.HoldId);
            writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.Query, this.Query ?? string.Empty);
            if (this.Mailboxes != null && this.Mailboxes.Length > 0)
            {
                writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.Mailboxes);
                foreach (string mailbox in this.Mailboxes)
                {
                    writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.String, mailbox);
                }

                writer.WriteEndElement();   // Mailboxes
            }

            // Language
            if (!string.IsNullOrEmpty(this.Language))
            {
                writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.Language, this.Language);
            }

            if (!string.IsNullOrEmpty(this.InPlaceHoldIdentity))
            {
                writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.InPlaceHoldIdentity, this.InPlaceHoldIdentity);
            }

            if (!string.IsNullOrEmpty(this.ItemHoldPeriod))
            {
                writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.ItemHoldPeriod, this.ItemHoldPeriod);
            }
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:36,代码来源:SetHoldOnMailboxesRequest.cs

示例13: WriteElementsToXml

        /// <summary>
        /// Writes elements and content to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            base.WriteElementsToXml(writer);

            if (writer.Service.RequestedServerVersion > ExchangeVersion.Exchange2007_SP1)
            {
                writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.IsContactPhoto, this.isContactPhoto);
            }

            writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Content);

            if (!string.IsNullOrEmpty(this.FileName))
            {
                using (FileStream fileStream = new FileStream(this.FileName, FileMode.Open, FileAccess.Read))
                {
                    writer.WriteBase64ElementValue(fileStream);
                }
            }
            else if (this.ContentStream != null)
            {
                writer.WriteBase64ElementValue(this.ContentStream);
            }
            else if (this.Content != null)
            {
                writer.WriteBase64ElementValue(this.Content);
            }
            else
            {
                EwsUtilities.Assert(
                    false,
                    "FileAttachment.WriteElementsToXml",
                    "The attachment's content is not set.");
            }

            writer.WriteEndElement();
        }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:40,代码来源:FileAttachment.cs

示例14: WriteElementsToXml

        /// <summary>
        /// Writes request to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            writer.WriteStartElement(XmlNamespace.Autodiscover, XmlElementNames.Request);

            writer.WriteStartElement(XmlNamespace.Autodiscover, XmlElementNames.Domains);

            foreach (string domain in this.Domains)
            {
                if (!string.IsNullOrEmpty(domain))
                {
                    writer.WriteElementValue(
                        XmlNamespace.Autodiscover,
                        XmlElementNames.Domain,
                        domain);
                }
            }
            writer.WriteEndElement(); // Domains

            writer.WriteStartElement(XmlNamespace.Autodiscover, XmlElementNames.RequestedSettings);
            foreach (DomainSettingName setting in settings)
            {
                writer.WriteElementValue(
                    XmlNamespace.Autodiscover,
                    XmlElementNames.Setting,
                    setting);
            }

            writer.WriteEndElement(); // RequestedSettings

            if (this.requestedVersion.HasValue)
            {
                writer.WriteElementValue(XmlNamespace.Autodiscover, XmlElementNames.RequestedVersion, this.requestedVersion.Value);
            }

            writer.WriteEndElement(); // Request
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:40,代码来源:GetDomainSettingsRequest.cs

示例15: WriteElementsToXml

        /// <summary>
        /// Writes elements to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            this.UserId.WriteToXml(writer, XmlElementNames.UserId);
            this.Permissions.WriteToXml(writer, XmlElementNames.DelegatePermissions);

            writer.WriteElementValue(
                XmlNamespace.Types,
                XmlElementNames.ReceiveCopiesOfMeetingMessages,
                this.ReceiveCopiesOfMeetingMessages);
        
            writer.WriteElementValue(
                XmlNamespace.Types,
                XmlElementNames.ViewPrivateItems,
                this.ViewPrivateItems);
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:19,代码来源:DelegateUser.cs


注:本文中的Microsoft.Exchange.WebServices.Data.EwsServiceXmlWriter.WriteElementValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。