public bool SetUriFormatType(UriFormatType format) { if (this.hostConfigurationHelper != null) { return(this.hostConfigurationHelper.UpdateUriFormatElment(format)); } return(false); }
/// <summary> /// Sets the Uri Format to the specified format /// </summary> /// <param name="format">Uri format</param> /// <returns>Returns true if setting is changed else false.</returns> internal bool UpdateUriFormatElment(UriFormatType format) { if (HostConfigurationHelper.pivotConfigSection != null && HostConfigurationHelper.pivotConfigSection.GlobalSettings != null && HostConfigurationHelper.pivotConfigSection.GlobalSettings.OutputSettings != null && HostConfigurationHelper.pivotConfigSection.GlobalSettings.OutputSettings.UriFormat != null) { HostConfigurationHelper.pivotConfigSection.GlobalSettings.OutputSettings.UriFormat.Format = format; return(true); } else { throw new FaultException(new FaultReason(Properties.Messages.HostConfigFileNotOpened)); //throw new FaultException<Exception>(new Exception(), new FaultReason("Invalid operation exception. The Host Configuration File is not Opened.")); } }