本文整理汇总了C#中Microsoft.Exchange.WebServices.Data.EwsServiceXmlWriter.WriteAttributeString方法的典型用法代码示例。如果您正苦于以下问题:C# EwsServiceXmlWriter.WriteAttributeString方法的具体用法?C# EwsServiceXmlWriter.WriteAttributeString怎么用?C# EwsServiceXmlWriter.WriteAttributeString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Exchange.WebServices.Data.EwsServiceXmlWriter
的用法示例。
在下文中一共展示了EwsServiceXmlWriter.WriteAttributeString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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
}
示例2: 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);
}
}
}