本文整理汇总了C#中ChangeType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ChangeType.ToString方法的具体用法?C# ChangeType.ToString怎么用?C# ChangeType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChangeType
的用法示例。
在下文中一共展示了ChangeType.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsInOriginal
private bool IsInOriginal(ChangeType changeType)
{
switch (changeType)
{
case ChangeType.None:
case ChangeType.Deletion:
case ChangeType.MoveSource:
case ChangeType.FormatChange:
case ChangeType.Match:
case ChangeType.StyleChangeText:
case ChangeType.DeletedComment:
case ChangeType.Comment:
return true;
case ChangeType.MoveDestination:
case ChangeType.Insertion:
case ChangeType.ChangeNumber:
case ChangeType.Delimiter:
case ChangeType.MovedDeletion:
case ChangeType.StyleChangedLabel:
case ChangeType.InsertedComment:
return false;
case ChangeType.CellInserted:
case ChangeType.CellDeleted:
case ChangeType.CellMerged:
case ChangeType.CellIsPadding:
case ChangeType.ChangedText:
case ChangeType.ChangedComment:
default:
throw new InvalidOperationException("Unexpected change type in summary : " + changeType.ToString());
}
}
示例2: GetLocalizedStringForChangeType
static public string GetLocalizedStringForChangeType(ChangeType changeType)
{
return changeType.ToString();
}
示例3: GetHighlight
private HighlightStyle GetHighlight(ChangeType changeType)
{
switch (changeType)
{
case ChangeType.SearchResult:
return SearchHighlight;
case ChangeType.None:
case ChangeType.Match:
return null;
case ChangeType.Deletion:
return m_opts.DeleteStyle;
case ChangeType.MoveSource:
return m_opts.MoveSourceStyle;
case ChangeType.MoveDestination:
return m_opts.MoveDestStyle;
case ChangeType.Insertion:
return m_opts.InsertStyle;
case ChangeType.FormatChange:
return m_opts.FormatChangeStyle;
case ChangeType.MovedDeletion:
return m_opts.MovedDeletionStyle;
case ChangeType.StyleChangeText:
return m_opts.StyleChangeTextStyle;
case ChangeType.StyleChangedLabel:
return m_opts.StyleChangeLabelStlye;
case ChangeType.InsertedComment:
return m_opts.InsertedCommentStyle;
case ChangeType.DeletedComment:
return m_opts.DeletedCommentStyle;
case ChangeType.Comment:
return m_opts.CommentStyle;
case ChangeType.CellInserted:
case ChangeType.CellDeleted:
case ChangeType.CellMerged:
case ChangeType.CellIsPadding:
case ChangeType.ChangeNumber:
case ChangeType.Delimiter:
case ChangeType.ChangedText:
case ChangeType.ChangedComment:
default:
throw new InvalidOperationException("Unexpected change type in summary : " + changeType.ToString());
}
}