Class UnsupportedFileFormatException
Nombre del espacio: Aspose.Note Asamblea: Aspose.Note.dll (25.4.0)
Transcurrido durante la carga de documentos, cuando el formato de archivo no es reconocido o no se apoya por Aspose.Note.
public class UnsupportedFileFormatException : Exception, ISerializable
{
public UnsupportedFileFormatException() { }
public UnsupportedFileFormatException(string message) : base(message) { }
public UnsupportedFileFormatException(string message, Exception innerException) : base(message, innerException) { }
protected UnsupportedFileFormatException(SerializationInfo info, StreamingContext context) : base(info, context) { }
public string SomeProperty { get; set; }
public void SomeMethod()
{
}
public int SomeOtherMethod(int param1, string param2)
{
}
}
Inheritance
object ← Exception ← UnsupportedFileFormatException
Implements
Miembros heredados
Exception.GetBaseException() ,y, Exception.ToString() ,y, Exception.GetType() ,y, Exception.TargetSite ,y, Exception.Message ,y, Exception.Data ,y, Exception.InnerException ,y, Exception.HelpLink ,y, Exception.Source ,y, Exception.HResult ,y, Exception.StackTrace ,y, Exception.SerializeObjectState ,y, object.GetType() ,y, object.MemberwiseClone() ,y, object.ToString() ,y, object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) ,y, object.GetHashCode()
Examples
Mostra cómo verificar si un cargamento de documento falló porque el formato de OneNote 2007 no está soportado.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "OneNote2007.one");
try
{
new Document(fileName);
}
catch (UnsupportedFileFormatException e)
{
if (e.FileFormat == FileFormat.OneNote2007)
{
Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
}
else
{
throw;
}
}
Constructors
No soportadoFileFormatExcepción(SerializationInfo, StreamingContext)
Inicia una nueva instancia de la clase Aspose.Note.UnsupportedFileFormatExcepción.
protected UnsupportedFileFormatException(SerializationInfo serializationInfo, StreamingContext synchronizationContext)
{
base(serializationInfo, synchronizationContext);
}
Parameters
serializationInfo
SerializationInfo
La información de la seriedad.
synchronizationContext
StreamingContext
Contexto de sincronización.
Properties
FileFormat
Obtenga el formato de archivo de los datos transmitidos si se detecta.
public FileFormat FileFormat
{
get;
}
Valor de la propiedad
Examples
Mostra cómo verificar si un cargamento de documento falló porque el formato de OneNote 2007 no está soportado.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "OneNote2007.one");
try
{
new Document(fileName);
}
catch (UnsupportedFileFormatException e)
{
if (e.FileFormat == FileFormat.OneNote2007)
{
Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
}
else
{
throw;
}
}