本文整理汇总了C#中Cell.SetAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# Cell.SetAttribute方法的具体用法?C# Cell.SetAttribute怎么用?C# Cell.SetAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cell
的用法示例。
在下文中一共展示了Cell.SetAttribute方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowActual
static void ShowActual(Cell cell, object actual) {
cell.SetAttribute(
CellAttribute.InformationSuffix,
actual == null ? "null"
: actual.ToString().Length == 0 ? "blank"
: actual.ToString());
}
示例2: MarkCellWithCounts
void MarkCellWithCounts(Cell target, TestCounts beforeCounts)
{
string style = Processor.TestStatus.Counts.Subtract(beforeCounts).Style;
if (!string.IsNullOrEmpty(style) && string.IsNullOrEmpty(target.GetAttribute(CellAttribute.Status))) {
target.SetAttribute(CellAttribute.Status, style);
}
}
示例3: MarkException
public void MarkException(Cell cell, System.Exception exception) {
if (exception is IgnoredException) return;
System.Exception abandonException = GetAbandonException(exception);
if (abandonException != null && IsAbandoned) throw abandonException;
if (cell.GetAttribute(CellAttribute.Status) != Exception) {
cell.SetAttribute(CellAttribute.Exception, exception.ToString());
cell.SetAttribute(CellAttribute.Status, Exception);
AddCount(Exception);
}
if (abandonException == null) return;
IsAbandoned = true;
if (abandonException is AbandonSuiteException) SuiteIsAbandoned = true;
throw abandonException;
}
示例4: MarkException
public void MarkException(Cell cell, System.Exception exception)
{
if (exception is IgnoredException) return;
System.Exception abandonException = GetAbandonStoryTestException(exception);
if (abandonException != null && IsAbandoned) throw abandonException;
if (cell.GetAttribute(CellAttributes.StatusKey) != CellAttributes.ExceptionStatus) {
cell.SetAttribute(CellAttributes.ExceptionKey, exception.ToString());
cell.SetAttribute(CellAttributes.StatusKey, CellAttributes.ExceptionStatus);
AddCount(CellAttributes.ExceptionStatus);
}
if (abandonException == null) return;
IsAbandoned = true;
throw abandonException;
}
示例5: MarkWithCounts
void MarkWithCounts(Cell cell, TestCounts beforeCounts)
{
var style = Counts.Subtract(beforeCounts).Style;
if (!string.IsNullOrEmpty(style) && string.IsNullOrEmpty(cell.GetAttribute(CellAttribute.Status))) {
cell.SetAttribute(CellAttribute.Status, style);
}
}
示例6: MarkWrong
public void MarkWrong(Cell cell, string actual)
{
cell.SetAttribute(CellAttribute.Actual, actual);
MarkWrong(cell);
}
示例7: MarkRight
public void MarkRight(Cell cell)
{
cell.SetAttribute(CellAttribute.Status, Right);
AddCount(Right);
}
示例8: MarkIgnore
public void MarkIgnore(Cell cell)
{
cell.SetAttribute(CellAttribute.Status, Ignore);
AddCount(Ignore);
}
示例9: MarkCellWithLastResults
void MarkCellWithLastResults(Cell cell, Action<Cell> markWithCounts)
{
if (cell != null && !string.IsNullOrEmpty(LastAction)) {
cell.SetAttribute(CellAttribute.Folded, LastAction);
markWithCounts(cell);
}
LastAction = null;
}
示例10: EndCell
void EndCell(Cell cell) {
if (!cells.ContainsKey(cell)) return;
var stopwatch = cells[cell];
stopwatch.Stop();
cell.SetAttribute(CellAttribute.Title, string.Format("elapsed: {0} ms", stopwatch.ElapsedMilliseconds));
}
示例11: MarkRight
public void MarkRight(Cell cell)
{
cell.SetAttribute(CellAttributes.StatusKey, CellAttributes.RightStatus);
AddCount(CellAttributes.RightStatus);
}
示例12: MarkIgnore
public void MarkIgnore(Cell cell)
{
cell.SetAttribute(CellAttributes.StatusKey, CellAttributes.IgnoreStatus);
AddCount(CellAttributes.IgnoreStatus);
}
示例13: MarkWrong
public void MarkWrong(Cell cell)
{
cell.SetAttribute(CellAttributes.StatusKey, CellAttributes.WrongStatus);
AddCount(CellAttributes.WrongStatus);
}