/// <summary>
        /// This function is used to update header details in object models.
        /// </summary>
        /// <param name="selectedlayer">
        /// Updated layer.
        /// </param>
        private static void UpdateHeader(LayerMap selectedlayer)
        {
            // Integration with WWT : Update the Layer details in WWT for the changes
            if (selectedlayer.CanUpdateWWT())
            {
                // This is used only for Layer Property update notifications. Since the notifications are handled in background thread,
                // CodeUpdate cannot be set the false here (main thread). It needs to be reset only by background thread once the
                // notification is handled by the background thread.
                selectedlayer.IsPropertyChangedFromCode = true;

                // Update the header details.
                if (!WWTManager.UpdateLayer(selectedlayer.LayerDetails, true, false))
                {
                    selectedlayer.IsNotInSync = true;
                }
            }
        }
        /// <summary>
        /// This function is used to update data in WWT.
        /// </summary>
        /// <param name="selectedRange">
        /// Updated range.
        /// </param>
        /// <param name="selectedlayer">
        /// Updated layer.
        /// </param>
        private static void UpdateData(Range selectedRange, LayerMap selectedlayer)
        {
            // Update Data based on the Header
            // 1. Set layer properties dependent on mapping.
            // 2. Purge the existing layer data in WWT and then push new data to WWT
            if (selectedlayer.CanUpdateWWT())
            {
                string[] data = selectedRange.GetData();

                if (!WWTManager.UploadDataInWWT(selectedlayer.LayerDetails.ID, data, true))
                {
                    selectedlayer.IsNotInSync = true;
                }
            }
        }