/// <summary> /// Creates an instance of <see cref="GlobalConfiguration"/> initialized by default values. /// </summary> public GlobalConfiguration() { GlobalVariables = new GlobalVariablesSection(); Library = new LibraryConfigurationsSection(); #if !SILVERLIGHT PostedFiles = new PostedFilesSection(); SafeMode = new SafeModeSection(); #endif this.LastConfigurationModifiedTimeUtc = DateTime.MinValue; }
/// <summary> /// Creates an instance of <see cref="GlobalConfiguration"/> initialized by values /// copied from the specified instance. /// </summary> /// <param name="source">The configuration from which to copy values.</param> private GlobalConfiguration(GlobalConfiguration /*!*/ source) { Debug.Assert(source != null); this.GlobalVariables = source.GlobalVariables.DeepCopy(); this.Library = source.Library.DeepCopy(); #if !SILVERLIGHT this.PostedFiles = source.PostedFiles.DeepCopy(); this.SafeMode = source.SafeMode.DeepCopy(); #endif this.LastConfigurationModifiedTimeUtc = source.LastConfigurationModifiedTimeUtc; }
public string GetTempPath(SafeModeSection/*!*/ safeModeConfig) { string result = (TempPath != "") ? TempPath : null; try { if (result != null) { if (safeModeConfig.IsPathAllowed(result)) Directory.CreateDirectory(result); else result = null; } } catch (SystemException) { result = null; } if (result == null) { result = Path.Combine(HttpRuntime.CodegenDir, "Posted Files"); Directory.CreateDirectory(result); } return result; }
/// <summary> /// Creates an instance of <see cref="GlobalConfiguration"/> initialized by values /// copied from the specified instance. /// </summary> /// <param name="source">The configuration from which to copy values.</param> private GlobalConfiguration(GlobalConfiguration/*!*/ source) { Debug.Assert(source != null); this.GlobalVariables = source.GlobalVariables.DeepCopy(); this.Library = source.Library.DeepCopy(); #if !SILVERLIGHT this.PostedFiles = source.PostedFiles.DeepCopy(); this.SafeMode = source.SafeMode.DeepCopy(); #endif this.LastConfigurationModificationTime = source.LastConfigurationModificationTime; }
/// <summary> /// Creates an instance of <see cref="GlobalConfiguration"/> initialized by default values. /// </summary> public GlobalConfiguration() { GlobalVariables = new GlobalVariablesSection(); Library = new LibraryConfigurationsSection(); #if !SILVERLIGHT PostedFiles = new PostedFilesSection(); SafeMode = new SafeModeSection(); #endif this.LastConfigurationModificationTime = DateTime.MinValue; }