Ejemplo n.º 1
0
		/// <summary>
		/// Throws an exception to indicate the .NET Framework is unable to load an image file into the System.Drawing.Bitmap 
		/// class. This is probably because it is corrupted, not an image supported by the .NET Framework, or the server does
		/// not have enough memory to process the image.
		/// </summary>
		/// <param name="info">The System.Runtime.Serialization.SerializationInfo that holds the serialized object 
		/// data about the exception being thrown.</param>
		/// <param name="context">The System.Runtime.Serialization.StreamingContext that contains contextual 
		/// information about the source or destination.</param>
		protected UnsupportedImageTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
			: base(info, context)
		{
			if (info == null) throw new ArgumentNullException("info");

			this._mediaObject = (GalleryServerPro.Business.Interfaces.IGalleryObject)info.GetValue("MediaObject", typeof(GalleryServerPro.Business.Interfaces.IGalleryObject));
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Throws an exception to indicate the .NET Framework is unable to load an image file into the System.Drawing.Bitmap 
		/// class. This is probably because it is corrupted, not an image supported by the .NET Framework, or the server does
		/// not have enough memory to process the image.
		/// </summary>
		/// <param name="mediaObject">The media object that contains the unsupported image file.</param>
		public UnsupportedImageTypeException(GalleryServerPro.Business.Interfaces.IGalleryObject mediaObject)
			: base(string.Format(CultureInfo.CurrentCulture, Resources.UnsupportedImageType_Ex_Msg2, ((mediaObject != null) && (mediaObject.Original != null) ? mediaObject.Original.FileName : String.Empty)))
		{
			this._mediaObject = mediaObject;
		}