本文整理匯總了C#中Assembly.GetImage方法的典型用法代碼示例。如果您正苦於以下問題:C# Assembly.GetImage方法的具體用法?C# Assembly.GetImage怎麽用?C# Assembly.GetImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Assembly
的用法示例。
在下文中一共展示了Assembly.GetImage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SetView
public void SetView(Assembly assembly, Address address)
{
if (viewModel == null || viewModel.Image != assembly.GetImage())
{
this.DataContext = null;
this.viewModel = new ListingViewModel(assembly, address.Segment);
this.DataContext = viewModel;
}
GoToAddress(address.Offset);
}
示例2: ErrorListViewModel
public ErrorListViewModel(Assembly program)
{
if (program == null)
return;
int errorCount = 0;
int warningCount = 0;
int messageCount = 0;
int n = program.GetImage().Errors.Count;
allItems = (from error in program.GetImage().Errors
select new ErrorListItem(error, program)).ToArray();
foreach (ErrorListItem item in allItems)
{
switch (item.Error.Category)
{
case ErrorCategory.Error: errorCount++; break;
case ErrorCategory.Warning: warningCount++; break;
case ErrorCategory.Message: messageCount++; break;
}
}
Array.Sort(allItems, (x, y) => x.Error.Location.CompareTo(y.Error.Location));
//this.Items = items.ToArray();
this.Items = null; // no item to display initially
this.ErrorCount = errorCount;
this.WarningCount = warningCount;
this.MessageCount = messageCount;
this.ShowErrors = true;
}