Ejemplo n.º 1
0
 /// <summary>
 /// Internals the write search settings to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="groupBy">The group by clause.</param>
 internal override void InternalWriteSearchSettingsToXml(EwsServiceXmlWriter writer, Grouping groupBy)
 {
     if (groupBy != null)
     {
         groupBy.WriteToXml(writer);
     }
 }
 /// <summary>
 /// Writes elements to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     if (null != this.clientExtension)
     {
         this.clientExtension.WriteToXml(writer, XmlNamespace.Types, XmlElementNames.ClientExtension);
     }
 }
        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="propertyBag">The property bag.</param>
        /// <param name="isUpdateOperation">Indicates whether the context is an update operation.</param>
        internal override void WritePropertyValueToXml(
            EwsServiceXmlWriter writer,
            PropertyBag propertyBag,
            bool isUpdateOperation)
        {
            object value = propertyBag[this];

            if (value != null)
            {
                if (writer.Service.RequestedServerVersion == ExchangeVersion.Exchange2007_SP1)
                {
                    ExchangeService service = writer.Service as ExchangeService;
                    if (service != null && service.Exchange2007CompatibilityMode == false)
                    {
                        MeetingTimeZone meetingTimeZone = new MeetingTimeZone((TimeZoneInfo)value);
                        meetingTimeZone.WriteToXml(writer, XmlElementNames.MeetingTimeZone);
                    }
                }
                else
                {
                    base.WritePropertyValueToXml(
                        writer,
                        propertyBag,
                        isUpdateOperation);
                }
            }
        }
 /// <summary>
 /// Writes elements to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     if (this.Content != null && this.Content.Length > 0)
     {
         writer.WriteBase64ElementValue(this.Content);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Writes elements to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteElementValue(
         XmlNamespace.Types,
         XmlElementNames.StartDate,
         EwsUtilities.DateTimeToXSDate(this.StartDate));
 }
 /// <summary>
 /// Writes the attributes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
 {
     if (this.serviceObjType == ServiceObjectType.Item)
     {
         writer.WriteAttributeValue(XmlAttributeNames.Traversal, this.Traversal);
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Write to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void InternalWriteViewToXml(EwsServiceXmlWriter writer)
        {
            base.InternalWriteViewToXml(writer);

            writer.WriteAttributeValue(XmlAttributeNames.Offset, this.Offset);
            writer.WriteAttributeValue(XmlAttributeNames.BasePoint, this.OffsetBasePoint);
        }
        /// <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);
        }
Ejemplo n.º 9
0
        /// <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();
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Writes this view to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal virtual void InternalWriteViewToXml(EwsServiceXmlWriter writer)
        {
            int? maxEntriesReturned = this.GetMaxEntriesReturned();

            if (maxEntriesReturned.HasValue)
            {
                writer.WriteAttributeValue(XmlAttributeNames.MaxEntriesReturned, maxEntriesReturned.Value);
            }
        }
        /// <summary>
        /// Writes elements to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            base.WriteElementsToXml(writer);

            writer.WriteElementValue(
                XmlNamespace.Types,
                XmlElementNames.DateTime,
                this.dateTime);
        }
        /// <summary>
        /// Writes attributes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
        {
            writer.WriteAttributeValue(XmlAttributeNames.SetClientExtensionActionId, this.setClientExtensionActionId);

            if (!string.IsNullOrEmpty(this.extensionId))
            {
                writer.WriteAttributeValue(XmlAttributeNames.ClientExtensionId, this.extensionId);
            }
        }
            /// <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);
            }
Ejemplo n.º 14
0
 /// <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();
     }
 }
        /// <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();
        }
        /// <summary>
        /// Writes the attributes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
        {
            if (this.Traversal.HasValue)
            {
                writer.WriteAttributeValue(XmlAttributeNames.Traversal, this.Traversal);
            }

            if (this.ViewFilter.HasValue)
            {
                writer.WriteAttributeValue(XmlAttributeNames.ViewFilter, this.ViewFilter);
            }
        }
        /// <summary>
        /// Writes the elements to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            base.WriteElementsToXml(writer);

            if (this.NumberOfOccurrences.HasValue)
            {
                writer.WriteElementValue(
                    XmlNamespace.Types,
                    XmlElementNames.NumberOfOccurrences,
                    this.NumberOfOccurrences);
            }
        }
        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="propertyBag">The property bag.</param>
        /// <param name="isUpdateOperation">Indicates whether the context is an update operation.</param>
        internal override void WritePropertyValueToXml(
            EwsServiceXmlWriter writer,
            PropertyBag propertyBag,
            bool isUpdateOperation)
        {
            MeetingTimeZone value = (MeetingTimeZone)propertyBag[this];

            if (value != null)
            {
                value.WriteToXml(writer, this.XmlElementName);
            }
        }
Ejemplo n.º 19
0
 /// <summary>
 /// Serializes an OofReply. Emits an empty OofReply in case the one passed in is null.
 /// </summary>
 /// <param name="oofReply">The oof reply.</param>
 /// <param name="writer">The writer.</param>
 /// <param name="xmlElementName">Name of the XML element.</param>
 private void SerializeOofReply(
     OofReply oofReply,
     EwsServiceXmlWriter writer,
     string xmlElementName)
 {
     if (oofReply != null)
     {
         oofReply.WriteToXml(writer, xmlElementName);
     }
     else
     {
         OofReply.WriteEmptyReplyToXml(writer, xmlElementName);
     }
 }
Ejemplo n.º 20
0
        /// <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);
            }
        }
            /// <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);
            }
Ejemplo n.º 22
0
        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal void WriteToXml(EwsServiceXmlWriter writer)
        {
            writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.GroupBy);
            writer.WriteAttributeValue(XmlAttributeNames.Order, this.SortDirection);

            this.GroupOn.WriteToXml(writer);

            writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.AggregateOn);
            writer.WriteAttributeValue(XmlAttributeNames.Aggregate, this.AggregateType);

            this.AggregateOn.WriteToXml(writer);

            writer.WriteEndElement(); // AggregateOn

            writer.WriteEndElement(); // GroupBy
        }
        /// <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);
        }
Ejemplo n.º 24
0
        /// <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
        }
        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="propertyBag">The property bag.</param>
        /// <param name="isUpdateOperation">Indicates whether the context is an update operation.</param>
        internal override void WritePropertyValueToXml(
            EwsServiceXmlWriter writer,
            PropertyBag propertyBag,
            bool isUpdateOperation)
        {
            TimeZoneInfo value = (TimeZoneInfo)propertyBag[this];

            if (value != null)
            {
                // We emit time zone properties only if we have not emitted the time zone SOAP header
                // or if this time zone is different from that of the service through which the request
                // is being emitted.
                if (!writer.IsTimeZoneHeaderEmitted || value != writer.Service.TimeZone)
                {
                    TimeZoneDefinition timeZoneDefinition = new TimeZoneDefinition(value);

                    timeZoneDefinition.WriteToXml(writer, this.XmlElementName);
                }
            }
        }
 /// <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();
 }
        /// <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();
        }
        /// <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();
        }
        /// <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
        }
 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.HoldId, this.HoldId);
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Writes the attributes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal virtual void WriteAttributesToXml(EwsServiceXmlWriter writer)
 {
 }
Ejemplo n.º 32
0
 /// <summary>
 /// Writes OrderBy property to XML.
 /// </summary>
 /// <param name="writer">The writer</param>
 internal override void WriteOrderByToXml(EwsServiceXmlWriter writer)
 {
     this.orderBy.WriteToXml(writer, XmlElementNames.SortOrder);
 }
 /// <summary>
 /// Writes the attributes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteAttributeValue(XmlAttributeNames.Id, this.id);
 }
Ejemplo n.º 34
0
 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     this.RoomList.WriteToXml(writer, XmlNamespace.Messages, XmlElementNames.RoomList);
 }
Ejemplo n.º 35
0
 /// <summary>
 /// Writes OrderBy property to XML.
 /// </summary>
 /// <param name="writer">The writer</param>
 internal override void WriteOrderByToXml(EwsServiceXmlWriter writer)
 {
     // No order by for paged view
 }
Ejemplo n.º 36
0
 /// <summary>
 /// Internals the write search settings to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="groupBy">The group by.</param>
 internal override void InternalWriteSearchSettingsToXml(EwsServiceXmlWriter writer, Grouping groupBy)
 {
     base.InternalWriteSearchSettingsToXml(writer, groupBy);
 }
Ejemplo n.º 37
0
        /// <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
            }
        }
Ejemplo n.º 38
0
 /// <summary>
 /// Writes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal virtual void WriteToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteStartElement(XmlNamespace.Types, this.GetXmlElementName());
     this.WriteAttributesToXml(writer);
     writer.WriteEndElement();
 }
Ejemplo n.º 39
0
 /// <summary>
 /// Writes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal void WriteToXml(EwsServiceXmlWriter writer)
 {
     this.WriteToXml(writer, this.GetXmlElementName());
 }
Ejemplo n.º 40
0
 /// <summary>
 /// Writes the attributes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal abstract void WriteAttributesToXml(EwsServiceXmlWriter writer);
Ejemplo n.º 41
0
        /// <summary>
        /// Writes XML attributes.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
        {
            base.WriteAttributesToXml(writer);

            writer.WriteAttributeValue(XmlAttributeNames.DeleteType, this.DeleteMode);
        }
 /// <summary>
 /// Writes XML attributes.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
 {
     base.WriteAttributesToXml(writer);
 }
        /// <summary>
        /// Writes the attributes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
        {
            base.WriteAttributesToXml(writer);

            writer.WriteAttributeValue(XmlAttributeNames.FieldIndex, this.Index);
        }
Ejemplo n.º 44
0
 /// <summary>
 /// Writes the attributes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteAttributeValue(XmlAttributeNames.HeaderName, this.Name);
 }
Ejemplo n.º 45
0
 /// <summary>
 /// Writes the Id encapsulated in the wrapper to XML.
 /// </summary>
 /// <param name="writer">The writer to write the Id to.</param>
 internal override void WriteToXml(EwsServiceXmlWriter writer)
 {
     this.itemId.WriteToXml(writer);
 }
Ejemplo n.º 46
0
 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     this.id.WriteToXml(writer, XmlNamespace.Messages, XmlElementNames.PhoneCallId);
 }
Ejemplo n.º 47
0
 /// <summary>
 /// Writes elements to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteValue(this.ImAddress, XmlElementNames.ImAddress);
 }
 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.MailboxSmtpAddress, this.MailboxSmtpAddress);
 }
Ejemplo n.º 49
0
 /// <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
 }
Ejemplo n.º 50
0
 /// <summary>
 /// Writes attachment id elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="attachmentId">The attachment id.</param>
 private void WriteAttachmentIdXml(EwsServiceXmlWriter writer, string attachmentId)
 {
     writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.AttachmentId);
     writer.WriteAttributeValue(XmlAttributeNames.Id, attachmentId);
     writer.WriteEndElement();
 }
 /// <summary>
 /// Writes to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal void WriteToXml(EwsServiceXmlWriter writer)
 {
     this.WriteToXml(writer, XmlElementNames.TransitionsGroup);
 }
 /// <summary>
 /// Writes elements to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteValue(this.PhoneNumber, XmlElementNames.PhoneNumber);
 }
Ejemplo n.º 53
0
 /// <summary>
 /// Writes the deletion update to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="ewsObject">The ews object.</param>
 /// <returns>True if property generated serialization.</returns>
 bool ICustomUpdateSerializer.WriteDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject)
 {
     // Use the default XML serializer.
     return(false);
 }
        /// <summary>
        /// Writes XML elements.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            if (this.SearchFilter != null)
            {
                // Emit the Restriction element
                writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.Restriction);
                this.SearchFilter.WriteToXml(writer);
                writer.WriteEndElement();
            }

            // Emit the View element
            this.View.WriteToXml(writer, null);

            // Emit the SortOrder
            this.View.WriteOrderByToXml(writer);

            // Emit the ParentFolderId element
            if (this.FolderId != null)
            {
                writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.ParentFolderId);
                this.FolderId.WriteToXml(writer);
                writer.WriteEndElement();
            }

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

            // Emit the SuggestionIndex-enabled elements
            if (this.SearchPeopleSuggestionIndex)
            {
                writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.SearchPeopleSuggestionIndex);
                writer.WriteValue(this.SearchPeopleSuggestionIndex.ToString().ToLowerInvariant(), XmlElementNames.SearchPeopleSuggestionIndex);
                writer.WriteEndElement();

                // Write the Context key value pairs
                writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.SearchPeopleContext);
                foreach (KeyValuePair <string, string> contextItem in this.Context)
                {
                    writer.WriteStartElement(XmlNamespace.Types, "ContextProperty");

                    writer.WriteStartElement(XmlNamespace.Types, "Key");
                    writer.WriteValue(contextItem.Key, "Key");
                    writer.WriteEndElement();

                    writer.WriteStartElement(XmlNamespace.Types, "Value");
                    writer.WriteValue(contextItem.Value, "Value");
                    writer.WriteEndElement();

                    writer.WriteEndElement();
                }
                writer.WriteEndElement();

                // Write the Query Mode Sources
                writer.WriteStartElement(XmlNamespace.Messages, XmlElementNames.SearchPeopleQuerySources);
                foreach (string querySource in this.QueryMode.Sources)
                {
                    writer.WriteStartElement(XmlNamespace.Types, "Source");
                    writer.WriteValue(querySource, "Source");
                    writer.WriteEndElement();
                }
                writer.WriteEndElement();
            }

            if (this.Service.RequestedServerVersion >= this.GetMinimumRequiredServerVersion())
            {
                if (this.View.PropertySet != null)
                {
                    this.View.PropertySet.WriteToXml(writer, ServiceObjectType.Persona);
                }
            }
        }
Ejemplo n.º 55
0
 /// <summary>
 /// Writes the ids as XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal abstract void WriteIdsToXml(EwsServiceXmlWriter writer);
Ejemplo n.º 56
0
 /// <summary>
 /// Writes elements to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteValue(this.Value, this.Name);
 }
Ejemplo n.º 57
0
 /// <summary>
 /// Writes elements to XML.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal virtual void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
 }
Ejemplo n.º 58
0
 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     // Don't have parameter in request.
 }
 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     this.id.WriteToXml(writer, XmlNamespace.Messages, XmlElementNames.PhoneCallId);
 }
 /// <summary>
 /// Writes XML elements.
 /// </summary>
 /// <param name="writer">The writer.</param>
 internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
 {
     writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.ID, this.Id);
     writer.WriteElementValue(XmlNamespace.Messages, XmlElementNames.AcceptanceState, this.ConsentState);
 }