本文整理汇总了C#中Machine.Specifications.ReSharperRunner.Presentation.ContextElement类的典型用法代码示例。如果您正苦于以下问题:C# ContextElement类的具体用法?C# ContextElement怎么用?C# ContextElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContextElement类属于Machine.Specifications.ReSharperRunner.Presentation命名空间,在下文中一共展示了ContextElement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetOrCreateContextSpecification
public static ContextSpecificationElement GetOrCreateContextSpecification(MSpecUnitTestProvider provider,
IProject project,
ContextElement context,
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
string fieldName,
ICollection<string> tags,
bool isIgnored)
{
#if RESHARPER_6
var id = ContextSpecificationElement.CreateId(context, fieldName);
var contextSpecification = provider.UnitTestManager.GetElementById(project, id) as ContextSpecificationElement;
if (contextSpecification != null)
{
contextSpecification.Parent = context;
contextSpecification.State = UnitTestElementState.Valid;
return contextSpecification;
}
#endif
return new ContextSpecificationElement(provider,
context,
projectEnvoy,
declaringTypeName,
fieldName,
tags,
isIgnored);
}
开发者ID:ChrisEdwards,项目名称:machine.specifications,代码行数:28,代码来源:ContextSpecificationFactory.cs
示例2: GetOrCreateBehavior
public static BehaviorElement GetOrCreateBehavior(MSpecUnitTestProvider provider,
IProject project,
ProjectModelElementEnvoy projectEnvoy,
ContextElement context,
string declaringTypeName,
string fieldName,
bool isIgnored,
string fullyQualifiedTypeName)
{
#if RESHARPER_6
var id = BehaviorElement.CreateId(context, fieldName);
var behavior = provider.UnitTestManager.GetElementById(project, id) as BehaviorElement;
if (behavior != null)
{
behavior.Parent = context;
behavior.State = UnitTestElementState.Valid;
return behavior;
}
#endif
return new BehaviorElement(provider,
context,
projectEnvoy,
declaringTypeName,
fieldName,
isIgnored,
fullyQualifiedTypeName);
}
开发者ID:ChrisEdwards,项目名称:machine.specifications,代码行数:28,代码来源:BehaviorFactory.cs
示例3: PresentContext
protected virtual void PresentContext(ContextElement element,
IPresentableItem item,
TreeModelNode modelNode,
PresentationState state)
{
PresentItem(item, element, state, UnitTestElementImage.TestContainer);
}
开发者ID:simonlaroche,项目名称:machine,代码行数:7,代码来源:Presenter.cs
示例4: CreateContextSpecification
public ContextSpecificationElement CreateContextSpecification(ContextElement context, IMetadataField specification)
{
return GetOrCreateContextSpecification(context,
_reflectionTypeNameCache.GetClrName(specification.DeclaringType),
specification.Name,
specification.IsIgnored());
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:7,代码来源:ContextSpecificationFactory.cs
示例5: CreateContextTask
public UnitTestTask CreateContextTask(ContextElement context)
{
return new UnitTestTask(context,
new ContextTask(_providerId,
context.AssemblyLocation,
context.GetTypeClrName().FullName));
}
开发者ID:ptomasroos,项目名称:machine.specifications,代码行数:7,代码来源:UnitTestTaskFactory.cs
示例6: CreateContextTask
public UnitTestTask CreateContextTask(ContextElement context, bool isExplicit)
{
return new UnitTestTask(context,
new ContextTask(_providerId,
context.AssemblyLocation,
context.GetTypeClrName(),
false));
}
开发者ID:bmavity,项目名称:machine.specifications,代码行数:8,代码来源:UnitTestTaskFactory.cs
示例7: CreateContextSpecificationTask
public UnitTestTask CreateContextSpecificationTask(ContextElement context,
ContextSpecificationElement contextSpecification)
{
return new UnitTestTask(contextSpecification,
new ContextSpecificationTask(_providerId,
context.AssemblyLocation,
context.GetTypeClrName().FullName,
contextSpecification.FieldName));
}
开发者ID:ptomasroos,项目名称:machine.specifications,代码行数:9,代码来源:UnitTestTaskFactory.cs
示例8: CreateContextSpecification
public ContextSpecificationElement CreateContextSpecification(ContextElement context, IMetadataField specification)
{
return new ContextSpecificationElement(_provider,
context,
_projectEnvoy,
specification.DeclaringType.FullyQualifiedName,
specification.Name,
specification.IsIgnored());
}
开发者ID:smaclell,项目名称:machine.specifications,代码行数:9,代码来源:ContextSpecificationFactory.cs
示例9: CreateBehaviorTask
public UnitTestTask CreateBehaviorTask(ContextElement context, BehaviorElement behavior, bool isExplicit)
{
return new UnitTestTask(behavior,
new BehaviorTask(_providerId,
context.AssemblyLocation,
context.GetTypeClrName(),
behavior.FieldName,
false));
}
开发者ID:bmavity,项目名称:machine.specifications,代码行数:9,代码来源:UnitTestTaskFactory.cs
示例10: ContextSpecificationElement
public ContextSpecificationElement(IUnitTestProvider provider,
// ReSharper disable SuggestBaseTypeForParameter
ContextElement context,
// ReSharper restore SuggestBaseTypeForParameter
IProjectModelElement project,
string declaringTypeName,
string fieldName,
bool isIgnored)
: base(provider, context, project, declaringTypeName, fieldName, isIgnored || context.IsExplicit)
{
}
开发者ID:Jirapong,项目名称:machine.specifications,代码行数:11,代码来源:ContextSpecificationElement.cs
示例11: AddContext
public void AddContext(ITypeElement type, ContextElement context)
{
if (!_contexts.ContainsKey(type))
{
_contexts.Add(type, context);
}
else
{
_contexts[type] = context;
}
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:11,代码来源:ContextCache.cs
示例12: CreateBehaviorSpecificationTask
public UnitTestTask CreateBehaviorSpecificationTask(ContextElement context,
BehaviorSpecificationElement behaviorSpecification)
{
return new UnitTestTask(behaviorSpecification,
new BehaviorSpecificationTask(_providerId,
context.AssemblyLocation,
context.GetTypeClrName().FullName,
behaviorSpecification.Behavior.FieldName,
behaviorSpecification.FieldName,
behaviorSpecification.Behavior.FieldType));
}
开发者ID:ptomasroos,项目名称:machine.specifications,代码行数:11,代码来源:UnitTestTaskFactory.cs
示例13: CreateBehavior
public BehaviorElement CreateBehavior(ContextElement context, IMetadataField behavior)
{
IMetadataTypeInfo typeContainingBehaviorSpecifications = behavior.GetFirstGenericArgument();
return new BehaviorElement(_provider,
context,
_projectEnvoy,
behavior.DeclaringType.FullyQualifiedName,
behavior.Name,
behavior.IsIgnored() || typeContainingBehaviorSpecifications.IsIgnored());
}
开发者ID:smaclell,项目名称:machine.specifications,代码行数:11,代码来源:BehaviorFactory.cs
示例14: BehaviorElement
public BehaviorElement(IUnitTestProvider provider,
// ReSharper disable SuggestBaseTypeForParameter
ContextElement context,
// ReSharper restore SuggestBaseTypeForParameter
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
string fieldName,
bool isIgnored)
: base(provider, context, projectEnvoy, declaringTypeName, fieldName, isIgnored || context.IsExplicit)
{
}
开发者ID:smaclell,项目名称:machine.specifications,代码行数:11,代码来源:BehaviorElement.cs
示例15: CreateContextSpecification
public ContextSpecificationElement CreateContextSpecification(ContextElement context, IMetadataField specification)
{
return GetOrCreateContextSpecification(_provider,
_manager,
_psiModuleManager,
_cacheManager,
_project,
context,
_projectEnvoy,
_reflectionTypeNameCache.GetClrName(specification.DeclaringType),
specification.Name,
specification.IsIgnored());
}
开发者ID:AnthonyMastrean,项目名称:machine.specifications,代码行数:13,代码来源:ContextSpecificationFactory.cs
示例16: CreateContextSpecification
public ContextSpecificationElement CreateContextSpecification(ContextElement context, IMetadataField specification)
{
return GetOrCreateContextSpecification(_provider,
#if RESHARPER_61
_manager, _psiModuleManager, _cacheManager,
#endif
_project,
context,
_projectEnvoy,
specification.DeclaringType.FullyQualifiedName,
specification.Name,
specification.DeclaringType.GetTags(),
specification.IsIgnored());
}
开发者ID:hereyes,项目名称:machine.specifications,代码行数:14,代码来源:ContextSpecificationFactory.cs
示例17: CreateBehavior
public BehaviorElement CreateBehavior(ContextElement context, IMetadataField behavior)
{
var typeContainingBehaviorSpecifications = behavior.GetFirstGenericArgument();
var metadataTypeName = behavior.FirstGenericArgumentClass().FullyQualifiedName();
var fieldType = new NormalizedTypeName(new ClrTypeName(metadataTypeName));
var behaviorElement = GetOrCreateBehavior(context,
_reflectionTypeNameCache.GetClrName(behavior.DeclaringType),
behavior.Name,
behavior.IsIgnored() || typeContainingBehaviorSpecifications.IsIgnored(),
fieldType);
return behaviorElement;
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:15,代码来源:BehaviorFactory.cs
示例18: BehaviorElement
public BehaviorElement(MSpecUnitTestProvider provider,
PsiModuleManager psiModuleManager,
CacheManager cacheManager,
// ReSharper disable SuggestBaseTypeForParameter
ContextElement context,
// ReSharper restore SuggestBaseTypeForParameter
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
string fieldName,
bool isIgnored,
string fullyQualifiedTypeName)
: base(provider, psiModuleManager, cacheManager, context, projectEnvoy, declaringTypeName, fieldName, isIgnored || context.Explicit)
{
FullyQualifiedTypeName = fullyQualifiedTypeName;
}
开发者ID:hereyes,项目名称:machine.specifications,代码行数:15,代码来源:BehaviorElement.cs
示例19: ContextSpecificationElement
public ContextSpecificationElement(IUnitTestProvider provider,
// ReSharper disable SuggestBaseTypeForParameter
ContextElement context,
// ReSharper restore SuggestBaseTypeForParameter
ProjectModelElementEnvoy project,
string declaringTypeName,
string fieldName,
ICollection<string> tags,
bool isIgnored)
: base(provider, context, project, declaringTypeName, fieldName, isIgnored || context.IsExplicit)
{
if (tags != null)
{
AssignCategories(tags);
}
}
开发者ID:jhollingworth,项目名称:machine.specifications,代码行数:16,代码来源:ContextSpecificationElement.cs
示例20: CreateContext
public ContextElement CreateContext(ITypeElement type)
{
if (_cache.Classes.ContainsKey(type))
{
return _cache.Classes[type];
}
ContextElement context = new ContextElement(_provider,
_project,
type.CLRName,
_assemblyPath,
type.GetTags(),
type.IsIgnored());
_cache.Classes.Add(type, context);
return context;
}
开发者ID:BarryWoods,项目名称:machine.specifications,代码行数:16,代码来源:ContextFactory.cs
注:本文中的Machine.Specifications.ReSharperRunner.Presentation.ContextElement类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论