当前位置: 首页>>代码示例>>C#>>正文


C# Presentation.ContextElement类代码示例

本文整理汇总了C#中Machine.Specifications.ReSharperRunner.Presentation.ContextElement的典型用法代码示例。如果您正苦于以下问题:C# ContextElement类的具体用法?C# ContextElement怎么用?C# ContextElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ContextElement类属于Machine.Specifications.ReSharperRunner.Presentation命名空间,在下文中一共展示了ContextElement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的Machine.Specifications.ReSharperRunner.Presentation.ContextElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。