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


C# EwsServiceXmlWriter.WriteEndElement方法代码示例

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


在下文中一共展示了EwsServiceXmlWriter.WriteEndElement方法的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);
        }
开发者ID:Pravinmprajapati,项目名称:ews-managed-api,代码行数:12,代码来源:SetUserOofSettingsRequest.cs

示例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();
        }
开发者ID:XavierDa,项目名称:ews-managed-api,代码行数:12,代码来源:InstallAppRequest.cs

示例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();
     }
 }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:13,代码来源:ByteArrayArray.cs

示例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
        }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:24,代码来源:PrivilegedUserId.cs

示例5: 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

示例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: 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();
 }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:11,代码来源:UserConfigurationDictionary.cs

示例8: WriteObjectToXml

        /// <summary>
        /// Writes a dictionary object (key or value) to Xml.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="xmlElementName">The Xml element name.</param>
        /// <param name="dictionaryObject">The object to write.</param>
        private void WriteObjectToXml(
            EwsServiceXmlWriter writer,
            string xmlElementName,
            object dictionaryObject)
        {
            EwsUtilities.Assert(
                writer != null,
                "UserConfigurationDictionary.WriteObjectToXml",
                "writer is null");
            EwsUtilities.Assert(
                xmlElementName != null,
                "UserConfigurationDictionary.WriteObjectToXml",
                "xmlElementName is null");

            writer.WriteStartElement(XmlNamespace.Types, xmlElementName);

            if (dictionaryObject == null)
            {
                EwsUtilities.Assert(
                    xmlElementName != XmlElementNames.DictionaryKey,
                    "UserConfigurationDictionary.WriteObjectToXml",
                    "Key is null");

                writer.WriteAttributeValue(
                    EwsUtilities.EwsXmlSchemaInstanceNamespacePrefix,
                    XmlAttributeNames.Nil,
                    EwsUtilities.XSTrue);
            }
            else
            {
                this.WriteObjectValueToXml(writer, dictionaryObject);
            }

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

示例9: WriteToXml

        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="request">The request being emitted.</param>
        internal void WriteToXml(EwsServiceXmlWriter writer, GetUserAvailabilityRequest request)
        {
            if (request.IsFreeBusyViewRequested)
            {
                writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.FreeBusyViewOptions);

                request.TimeWindow.WriteToXmlUnscopedDatesOnly(writer, XmlElementNames.TimeWindow);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.MergedFreeBusyIntervalInMinutes,
                    this.MergedFreeBusyInterval);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.RequestedView,
                    this.RequestedFreeBusyView);

                writer.WriteEndElement(); // FreeBusyViewOptions
            }

            if (request.IsSuggestionsViewRequested)
            {
                writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.SuggestionsViewOptions);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.GoodThreshold,
                    this.GoodSuggestionThreshold);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.MaximumResultsByDay,
                    this.MaximumSuggestionsPerDay);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.MaximumNonWorkHourResultsByDay,
                    this.MaximumNonWorkHoursSuggestionsPerDay);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.MeetingDurationInMinutes,
                    this.MeetingDuration);

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.MinimumSuggestionQuality,
                    this.MinimumSuggestionQuality);

                TimeWindow timeWindowToSerialize = this.DetailedSuggestionsWindow == null ?
                    request.TimeWindow :
                    this.DetailedSuggestionsWindow;

                timeWindowToSerialize.WriteToXmlUnscopedDatesOnly(writer, XmlElementNames.DetailedSuggestionsWindow);

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

                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.GlobalObjectId,
                    this.GlobalObjectId);

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

示例10: 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();
 }
开发者ID:asine,项目名称:ews-managed-api,代码行数:10,代码来源:Attendee.cs

示例11: 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
        }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:24,代码来源:AttendeeInfo.cs

示例12: WriteByteArrayToXml

        /// <summary>
        /// Writes a byte array to Xml.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="byteArray">Byte array to write.</param>
        /// <param name="xmlElementName">Name of the Xml element.</param>
        private static void WriteByteArrayToXml(
            EwsServiceXmlWriter writer,
            byte[] byteArray,
            string xmlElementName)
        {
            EwsUtilities.Assert(
                writer != null,
                "UserConfiguration.WriteByteArrayToXml",
                "writer is null");
            EwsUtilities.Assert(
                xmlElementName != null,
                "UserConfiguration.WriteByteArrayToXml",
                "xmlElementName is null");

            writer.WriteStartElement(XmlNamespace.Types, xmlElementName);

            if (byteArray != null && byteArray.Length > 0)
            {
                writer.WriteValue(Convert.ToBase64String(byteArray), xmlElementName);
            }

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

示例13: WriteToXml

 /// <summary>
 /// WriteToXml
 /// </summary>
 /// <param name="writer"></param>
 internal void WriteToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.ManagementRole);
     WriteRolesToXml(writer, this.userRoles, XmlElementNames.UserRoles);
     WriteRolesToXml(writer, this.applicationRoles, XmlElementNames.ApplicationRoles);
     writer.WriteEndElement();
 }
开发者ID:liliankasem,项目名称:ProjectSpikeAPI,代码行数:11,代码来源:ManagementRole.cs

示例14: WriteUserConfigurationNameToXml

        /// <summary>
        /// Writes to Xml.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="xmlNamespace">The XML namespace.</param>
        /// <param name="name">The user configuration name.</param>
        /// <param name="parentFolderId">The Id of the folder containing the user configuration.</param>
        internal static void WriteUserConfigurationNameToXml(
            EwsServiceXmlWriter writer,
            XmlNamespace xmlNamespace,
            string name,
            FolderId parentFolderId)
        {
            EwsUtilities.Assert(
                writer != null,
                "UserConfiguration.WriteUserConfigurationNameToXml",
                "writer is null");
            EwsUtilities.Assert(
                name != null,
                "UserConfiguration.WriteUserConfigurationNameToXml",
                "name is null");
            EwsUtilities.Assert(
                parentFolderId != null,
                "UserConfiguration.WriteUserConfigurationNameToXml",
                "parentFolderId is null");

            writer.WriteStartElement(xmlNamespace, XmlElementNames.UserConfigurationName);

            writer.WriteAttributeValue(XmlAttributeNames.Name, name);

            parentFolderId.WriteToXml(writer);

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

示例15: WriteToXml

        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="xmlNamespace">The XML namespace.</param>
        /// <param name="xmlElementName">Name of the XML element.</param>
        internal void WriteToXml(
            EwsServiceXmlWriter writer,
            XmlNamespace xmlNamespace,
            string xmlElementName)
        {
            EwsUtilities.Assert(
                writer != null,
                "UserConfiguration.WriteToXml",
                "writer is null");
            EwsUtilities.Assert(
                xmlElementName != null,
                "UserConfiguration.WriteToXml",
                "xmlElementName is null");

            writer.WriteStartElement(xmlNamespace, xmlElementName);

            // Write the UserConfigurationName element
            WriteUserConfigurationNameToXml(
                writer, 
                XmlNamespace.Types, 
                this.name, 
                this.parentFolderId);

            // Write the Dictionary element
            if (this.IsPropertyUpdated(UserConfigurationProperties.Dictionary))
            {
                this.dictionary.WriteToXml(writer, XmlElementNames.Dictionary);
            }

            // Write the XmlData element
            if (this.IsPropertyUpdated(UserConfigurationProperties.XmlData))
            {
                this.WriteXmlDataToXml(writer);
            }

            // Write the BinaryData element
            if (this.IsPropertyUpdated(UserConfigurationProperties.BinaryData))
            {
                this.WriteBinaryDataToXml(writer);
            }

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


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