/// <summary>
        /// Reads response elements from Json.
        /// </summary>
        /// <param name="responseObject">The response object.</param>
        /// <param name="service">The service.</param>
        internal override void ReadElementsFromJson(JsonObject responseObject, ExchangeService service)
        {
            EwsServiceJsonReader jsonReader = new EwsServiceJsonReader(service);

            List <Folder> folders = jsonReader.ReadServiceObjectsCollectionFromJson <Folder>(
                responseObject,
                XmlElementNames.Folders,
                this.GetObjectInstance,
                false,  /* clearPropertyBag */
                null,   /* requestedPropertySet */
                false); /* summaryPropertiesOnly */

            this.folder = folders[0];
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Reads response elements from Json.
        /// </summary>
        /// <param name="responseObject">The response object.</param>
        /// <param name="service">The service.</param>
        internal override void ReadElementsFromJson(JsonObject responseObject, ExchangeService service)
        {
            EwsServiceJsonReader jsonReader = new EwsServiceJsonReader(service);

            List <Item> items = jsonReader.ReadServiceObjectsCollectionFromJson <Item>(
                responseObject,
                XmlElementNames.Folders,
                this.GetObjectInstance,
                false,  /* clearPropertyBag */
                null,   /* requestedPropertySet */
                false); /* summaryPropertiesOnly */

            // We only receive the copied or moved items if the copy or move operation was within
            // a single mailbox. No item is returned if the operation is cross-mailbox, from a
            // mailbox to a public folder or from a public folder to a mailbox.
            if (items.Count > 0)
            {
                this.item = items[0];
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Loads from json.
        /// </summary>
        /// <param name="jsonProperty">The json property.</param>
        /// <param name="service">The service.</param>
        internal override void LoadFromJson(JsonObject jsonProperty, ExchangeService service)
        {
            this.InternetMessageId = jsonProperty.ReadAsString(XmlElementNames.ConversationIndex);

            if (jsonProperty.ContainsKey(XmlElementNames.ParentInternetMessageId))
            {
                this.ParentInternetMessageId = jsonProperty.ReadAsString(XmlElementNames.ParentInternetMessageId);
            }

            if (jsonProperty.ContainsKey(XmlElementNames.Items))
            {
                EwsServiceJsonReader jsonReader = new EwsServiceJsonReader(service);

                this.Items = jsonReader.ReadServiceObjectsCollectionFromJson <Item>(
                    jsonProperty,
                    XmlElementNames.Items,
                    this.GetObjectInstance,
                    false,              /* clearPropertyBag */
                    this.propertySet,   /* requestedPropertySet */
                    false);             /* summaryPropertiesOnly */
            }
        }