本文整理汇总了C#中Microsoft.Exchange.WebServices.Data.EwsServiceXmlWriter.WriteStartElement方法的典型用法代码示例。如果您正苦于以下问题:C# EwsServiceXmlWriter.WriteStartElement方法的具体用法?C# EwsServiceXmlWriter.WriteStartElement怎么用?C# EwsServiceXmlWriter.WriteStartElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Exchange.WebServices.Data.EwsServiceXmlWriter
的用法示例。
在下文中一共展示了EwsServiceXmlWriter.WriteStartElement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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();
}
示例3: WriteElementsToXml
/// <summary>
/// Writes the elements to XML.
/// </summary>
/// <param name="writer">The writer.</param>
internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
{
foreach (byte[] item in this.content)
{
writer.WriteStartElement(XmlNamespace.Types, ByteArrayArray.ItemXmlElementName);
writer.WriteBase64ElementValue(item);
writer.WriteEndElement();
}
}
示例4: 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
}
示例5: WriteElementsToXml
/// <summary>
/// Writes XML elements for GetPeopleInsights request
/// </summary>
/// <param name="writer">The writer.</param>
internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
{
writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.EmailAddresses);
foreach (string emailAddress in this.Emailaddresses)
{
writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.String, emailAddress);
}
writer.WriteEndElement();
}
示例6: 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
}
示例7: WriteElementsToXml
/// <summary>
/// Writes the elements to XML writer.
/// </summary>
/// <param name="writer">The writer.</param>
internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
{
writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.SubscriptionIds);
foreach (string id in this.subscriptionIds)
{
writer.WriteElementValue(
XmlNamespace.Types,
XmlElementNames.SubscriptionId,
id);
}
writer.WriteEndElement();
writer.WriteElementValue(
XmlNamespace.Messages,
XmlElementNames.ConnectionTimeout,
this.connectionTimeout);
}
示例8: 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();
}
示例9: 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();
}
}
示例10: WriteEntryValueToXml
/// <summary>
/// Writes a dictionary entry value to Xml.
/// </summary>
/// <param name="writer">The writer.</param>
/// <param name="value">Value to write.</param>
private void WriteEntryValueToXml(EwsServiceXmlWriter writer, string value)
{
writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Value);
// While an entry value can't be null, if the entry is an array, an element of the array can be null.
if (value != null)
{
writer.WriteValue(value, XmlElementNames.Value);
}
writer.WriteEndElement();
}
示例11: WriteEntryTypeToXml
/// <summary>
/// Writes a dictionary entry type to Xml.
/// </summary>
/// <param name="writer">The writer.</param>
/// <param name="dictionaryObjectType">Type to write.</param>
private void WriteEntryTypeToXml(EwsServiceXmlWriter writer, UserConfigurationDictionaryObjectType dictionaryObjectType)
{
writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Type);
writer.WriteValue(dictionaryObjectType.ToString(), XmlElementNames.Type);
writer.WriteEndElement();
}
示例12: WriteElementsToXml
/// <summary>
/// Writes XML elements.
/// </summary>
/// <param name="writer">The writer.</param>
internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
{
// Emit the EmailAddress element
writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.Email);
writer.WriteValue(this.EmailAddress, XmlElementNames.Email);
writer.WriteEndElement();
writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.SizeRequested);
writer.WriteValue(this.UserPhotoSize, XmlElementNames.SizeRequested);
writer.WriteEndElement();
}
示例13: WriteElementsToXml
/// <summary>
/// Writes the elements to XML.
/// </summary>
/// <param name="writer">The writer.</param>
internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
{
writer.WriteStartElement(this.Namespace, XmlElementNames.Mailbox);
base.WriteElementsToXml(writer);
writer.WriteEndElement();
}
示例14: WriteToXml
/// <summary>
/// Writes to XML.
/// </summary>
/// <param name="writer">The writer.</param>
internal void WriteToXml(EwsServiceXmlWriter writer)
{
writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.MailboxData);
writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Email);
writer.WriteElementValue(XmlNamespace.Types, XmlElementNames.Address, this.SmtpAddress);
writer.WriteEndElement(); // Email
writer.WriteElementValue(
XmlNamespace.Types,
XmlElementNames.AttendeeType,
this.attendeeType);
writer.WriteElementValue(
XmlNamespace.Types,
XmlElementNames.ExcludeConflicts,
this.excludeConflicts);
writer.WriteEndElement(); // MailboxData
}
示例15: WriteEmptyReplyToXml
/// <summary>
/// Writes an empty OofReply to XML.
/// </summary>
/// <param name="writer">The writer.</param>
/// <param name="xmlElementName">Name of the XML element.</param>
internal static void WriteEmptyReplyToXml(EwsServiceXmlWriter writer, string xmlElementName)
{
writer.WriteStartElement(XmlNamespace.Types, xmlElementName);
writer.WriteEndElement(); // xmlElementName
}