本文整理匯總了C#中Mono.CSharp.Report.RuntimeMissingSupport方法的典型用法代碼示例。如果您正苦於以下問題:C# Report.RuntimeMissingSupport方法的具體用法?C# Report.RuntimeMissingSupport怎麽用?C# Report.RuntimeMissingSupport使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mono.CSharp.Report
的用法示例。
在下文中一共展示了Report.RuntimeMissingSupport方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Save
static public void Save (string name, bool saveDebugInfo, Report Report)
{
PortableExecutableKinds pekind;
ImageFileMachine machine;
switch (RootContext.Platform) {
case Platform.X86:
pekind = PortableExecutableKinds.Required32Bit;
machine = ImageFileMachine.I386;
break;
case Platform.X64:
pekind = PortableExecutableKinds.PE32Plus;
machine = ImageFileMachine.AMD64;
break;
case Platform.IA64:
pekind = PortableExecutableKinds.PE32Plus;
machine = ImageFileMachine.IA64;
break;
case Platform.AnyCPU:
default:
pekind = PortableExecutableKinds.ILOnly;
machine = ImageFileMachine.I386;
break;
}
try {
Assembly.Builder.Save (Basename (name), pekind, machine);
}
catch (COMException) {
if ((RootContext.StrongNameKeyFile == null) || (!RootContext.StrongNameDelaySign))
throw;
// FIXME: it seems Microsoft AssemblyBuilder doesn't like to delay sign assemblies
Report.Error (1548, "Couldn't delay-sign the assembly with the '" +
RootContext.StrongNameKeyFile +
"', Use MCS with the Mono runtime or CSC to compile this assembly.");
}
catch (System.IO.IOException io) {
Report.Error (16, "Could not write to file `"+name+"', cause: " + io.Message);
return;
}
catch (System.UnauthorizedAccessException ua) {
Report.Error (16, "Could not write to file `"+name+"', cause: " + ua.Message);
return;
}
catch (System.NotImplementedException nie) {
Report.RuntimeMissingSupport (Location.Null, nie.Message);
return;
}
//
// Write debuger symbol file
//
if (saveDebugInfo)
SymbolWriter.WriteSymbolFile ();
}