本文整理汇总了C#中Machine.Specifications.ReSharperRunner.Presentation.ContextElement.GetProject方法的典型用法代码示例。如果您正苦于以下问题:C# ContextElement.GetProject方法的具体用法?C# ContextElement.GetProject怎么用?C# ContextElement.GetProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Machine.Specifications.ReSharperRunner.Presentation.ContextElement
的用法示例。
在下文中一共展示了ContextElement.GetProject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetOrCreateContextSpecification
public ContextSpecificationElement GetOrCreateContextSpecification(ContextElement context,
IClrTypeName declaringTypeName,
string fieldName,
bool isIgnored)
{
var id = ContextSpecificationElement.CreateId(context, fieldName);
var contextSpecification = _manager.GetElementById(context.GetProject(), id) as ContextSpecificationElement;
if (contextSpecification != null)
{
contextSpecification.Parent = context;
contextSpecification.State = UnitTestElementState.Valid;
return contextSpecification;
}
return new ContextSpecificationElement(_provider,
_psiModuleManager,
_cacheManager,
new ProjectModelElementEnvoy(context.GetProject()),
context,
declaringTypeName,
fieldName, isIgnored);
}
示例2: GetOrCreateBehavior
public BehaviorElement GetOrCreateBehavior(ContextElement context,
IClrTypeName declaringTypeName,
string fieldName,
bool isIgnored,
string fieldType)
{
var id = BehaviorElement.CreateId(context, fieldType, fieldName);
var behavior = _manager.GetElementById(context.GetProject(), id) as BehaviorElement;
if (behavior != null)
{
behavior.Parent = context;
behavior.State = UnitTestElementState.Valid;
return behavior;
}
return new BehaviorElement(_provider,
_psiModuleManager,
_cacheManager,
context,
new ProjectModelElementEnvoy(context.GetProject()),
declaringTypeName,
fieldName,
isIgnored,
fieldType);
}