本文整理汇总了C#中ApplicationClass.Acquire方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationClass.Acquire方法的具体用法?C# ApplicationClass.Acquire怎么用?C# ApplicationClass.Acquire使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApplicationClass
的用法示例。
在下文中一共展示了ApplicationClass.Acquire方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsQSTAR
protected bool IsQSTAR()
{
var analyst = new ApplicationClass();
// Make sure that Analyst is fully started
var acqMethodDir = (IAcqMethodDirConfig)analyst.Acquire();
if (acqMethodDir == null)
throw new IOException("Failed to initialize. Analyst may need to be started.");
string methodFilePath = Path.GetFullPath(Path.Combine(GetProjectDirectory(), METHOD_FILE_IDA_QSTAR));
object acqMethodObj;
acqMethodDir.LoadNonUIMethod(methodFilePath, out acqMethodObj);
var acqMethod = (IAcqMethod)acqMethodObj;
var method = BuildAnalystFullScanMethod.ExtractMsMethod(acqMethod);
// there must be a better way to figure out which version of Analyst we have
return method != null;
}
示例2: GetAcqMethod
internal static IAcqMethod GetAcqMethod(string methodFilePath, out MassSpecMethod templateMsMethod)
{
ApplicationClass analyst = new ApplicationClass();
// Make sure that Analyst is fully started
IAcqMethodDirConfig acqMethodDir = (IAcqMethodDirConfig)analyst.Acquire();
if (acqMethodDir == null)
{
throw new IOException("Failed to initialize. Analyst may need to be started.");
}
object acqMethodObj;
acqMethodDir.LoadNonUIMethod(methodFilePath, out acqMethodObj);
IAcqMethod templateAcqMethod = (IAcqMethod)acqMethodObj;
templateMsMethod = ExtractMsMethod(templateAcqMethod);
return templateAcqMethod;
}