Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
			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;
			}
Exemplo n.º 4
0
		/// <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;
		}
Exemplo n.º 5
0
		/// <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;
		}