Class UnsupportedFileFormatException
نام ها : Aspose.Note جمع آوری: WL31_.dll (25.4.0)
در هنگام بارگذاری اسناد، هنگامی که فرمت فایل توسط Aspose.Note شناخته نشده یا پشتیبانی نشده است.
public class UnsupportedFileFormatException : Exception, ISerializable
Inheritance
object ← Exception ← UnsupportedFileFormatException
Implements
اعضای ارثی
Exception.GetBaseException() , Exception.ToString() , Exception.GetType() , Exception.TargetSite , Exception.Message , Exception.Data , Exception.InnerException , Exception.HelpLink , Exception.Source , Exception.HResult , Exception.StackTrace , Exception.SerializeObjectState , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
نشان می دهد که چگونه می توان بررسی کرد که آیا یک بارگذاری اسناد شکست خورده است زیرا فرمت OneNote 2007 پشتیبانی نمی شود.
// The path to the documents directory.
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
UnsupportedFileFormatException(بایگانی برچسب ها: StreamingContext)
یک مثال جدید از کلاس Aspose.Note.UnsupportedFileFormatException را آغاز می کند.
protected UnsupportedFileFormatException(SerializationInfo serializationInfo, StreamingContext synchronizationContext)
Parameters
serializationInfo
SerializationInfo
اطلاعات سریالی سازی
synchronizationContext
StreamingContext
مفهوم همگام سازی
Properties
FileFormat
فرمت فایل داده های منتقل شده را در صورت شناسایی دریافت می کند.
public FileFormat FileFormat { get; }
ارزش املاک
Examples
نشان می دهد که چگونه می توان بررسی کرد که آیا یک بارگذاری اسناد شکست خورده است زیرا فرمت OneNote 2007 پشتیبانی نمی شود.
// The path to the documents directory.
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;
}