本文整理汇总了C#中DataDictionary.FindParagraph方法的典型用法代码示例。如果您正苦于以下问题:C# DataDictionary.FindParagraph方法的具体用法?C# DataDictionary.FindParagraph怎么用?C# DataDictionary.FindParagraph使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataDictionary
的用法示例。
在下文中一共展示了DataDictionary.FindParagraph方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PerformDelta
/// <summary>
/// Performs the delta on the specification provided
/// </summary>
/// <param name="delta"></param>
/// <param name="specifications"></param>
private void PerformDelta(DataDictionary.Specification.Specification specifications)
{
foreach (Paragraph p in NewDocument.ChangedParagraphs)
{
DataDictionary.Specification.Paragraph par = specifications.FindParagraph(p.Id);
if (par != null)
{
par.Text = p.Text;
par.AddInfo("Paragraph has been changed");
par.setImplementationStatus(DataDictionary.Generated.acceptor.SPEC_IMPLEMENTED_ENUM.Impl_NewRevisionAvailable);
par.setReviewed(false);
foreach (DataDictionary.ReqRef reqRef in par.Implementations)
{
DataDictionary.ReqRelated reqRelated = reqRef.Model as DataDictionary.ReqRelated;
if (reqRelated != null)
{
reqRelated.setImplemented(false);
reqRelated.setVerified(false);
}
}
}
else
{
AddError(specifications, p, "Cannot find paragraph " + p.Id + " for modification");
}
}
foreach (Paragraph p in NewDocument.NewParagraphs)
{
DataDictionary.Specification.Paragraph par = specifications.FindParagraph(p.Id);
if (par != null)
{
AddError(specifications, p, "Paragraph " + p.Id + " already exists, whereas it has been detected as a new paragraph in the release");
}
else
{
par = specifications.FindParagraph(p.Id, true);
if (par != null)
{
par.setText(p.Text);
par.AddInfo("New paragraph");
}
else
{
AddError(specifications, p, "Paragraph " + p.Id + " cannot be found in the specification");
}
}
}
foreach (Paragraph p in NewDocument.RemovedParagraphs)
{
DataDictionary.Specification.Paragraph par = specifications.FindParagraph(p.Id);
if (par != null)
{
par.Text = "<Removed in current release>";
par.AddInfo("Paragraph has been removed");
}
else
{
AddError(specifications, p, "Cannot find paragraph " + p.Id + " for removal");
}
}
}