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


C# ITypeElement.GetClrName方法代码示例

本文整理汇总了C#中ITypeElement.GetClrName方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeElement.GetClrName方法的具体用法?C# ITypeElement.GetClrName怎么用?C# ITypeElement.GetClrName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITypeElement的用法示例。


在下文中一共展示了ITypeElement.GetClrName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateContext

    public ContextElement CreateContext(ITypeElement type)
    {
      if (_cache.Classes.ContainsKey(type))
      {
        return _cache.Classes[type];
      }

      var context = GetOrCreateContextElement(_provider,
#if RESHARPER_61
                                              _manager,
                                              _psiModuleManager,
                                              _cacheManager,
#endif
                                              _project,
                                              _projectEnvoy,
                                              type.GetClrName().FullName,
                                              _assemblyPath,
                                              type.GetSubjectString(),
                                              type.GetTags(),
                                              type.IsIgnored());

      foreach (var child in context.Children)
      {
        child.State = UnitTestElementState.Pending;
      }

      _cache.Classes.Add(type, context);
      return context;
    }
开发者ID:icewwn,项目名称:machine.specifications,代码行数:29,代码来源:ContextFactory.cs

示例2: BasedOnRegistration

        public BasedOnRegistration(ITreeNode registrationRootElement, ITypeElement basedOnElement, IEnumerable<WithServiceRegistration> withServices)
            : base(registrationRootElement, withServices)
        {
            this.basedOnElement = basedOnElement;

            name = basedOnElement.GetClrName().FullName;
        }
开发者ID:derigel23,项目名称:AgentMulder,代码行数:7,代码来源:BasedOnRegistration.cs

示例3: BasedOnRegistration

        public BasedOnRegistration(ITreeNode registrationRootElement, ITypeElement basedOnElement)
            : base(registrationRootElement)
        {
            this.basedOnElement = basedOnElement;

            name = basedOnElement.GetClrName().FullName;
        }
开发者ID:renana,项目名称:AgentMulder,代码行数:7,代码来源:BasedOnRegistration.cs

示例4: GetDisplayName

        private static string GetDisplayName(ITypeElement element)
        {
            IClrTypeName clrName = element.GetClrName();

            string fullName = string.Format("{0}.{1}", clrName.GetNamespaceName(), clrName.ShortName);

            if (element.HasTypeParameters())
            {
                fullName = string.Format("{0}<>", fullName);
            }

            return fullName;
        }
开发者ID:derigel23,项目名称:AgentMulder,代码行数:13,代码来源:ComponentRegistration.cs

示例5: CreateContext

    public ContextElement CreateContext(ITypeElement type)
    {
      if (_cache.Classes.ContainsKey(type))
      {
        return _cache.Classes[type];
      }

      ContextElement context = new ContextElement(_provider,
                                                  _projectEnvoy,
#if RESHARPER_6
                                                  type.GetClrName().FullName,
#else
                                                  type.CLRName,
#endif
                                                  _assemblyPath,
                                                  type.GetSubjectString(),
                                                  type.GetTags(),
                                                  type.IsIgnored());
      _cache.Classes.Add(type, context);
      return context;
    }
开发者ID:hhariri,项目名称:machine.specifications,代码行数:21,代码来源:ContextFactory.cs

示例6: CreateContext

    public ContextElement CreateContext(ITypeElement type)
    {
      var context = GetOrCreateContext(_provider,
                                       _manager,
                                       _psiModuleManager,
                                       _cacheManager,
                                       _project,
                                       _projectEnvoy,
                                       type.GetClrName().GetPersistent(),
                                       _assemblyPath,
                                       type.GetSubjectString(),
                                       type.GetTags(),
                                       type.IsIgnored());

      foreach (var child in context.Children)
      {
        child.State = UnitTestElementState.Pending;
      }

      _cache.Contexts.Add(type, context);
      return context;
    }
开发者ID:ptomasroos,项目名称:machine.specifications,代码行数:22,代码来源:ContextFactory.cs

示例7: IsAssignableFrom

 // I always have to think about what this means...
 // Based on Type.IsAssignableFrom(c)
 // "Determines whether an instance of the current Type can be assigned from an instance of the specified Type"
 // True if c and the current type are the same type, or if the current type is in the inheritance hierarchy of
 // the type c
 // In other words, type.IsAssignableFrom(c) is true if I can assign an instance of c to a variable of type "type"
 internal static bool IsAssignableFrom(this Type type, ITypeElement c)
 {
     return type.FullName == c.GetClrName().FullName || c.GetAllSuperTypes().Any(superType => type.FullName == c.GetClrName().FullName);
 }
开发者ID:EddieGarmon,项目名称:resharper-xunit,代码行数:10,代码来源:PsiExtensions.cs

示例8: GetCommonType

 public CommonType GetCommonType(ITypeElement type)
 {
     var clrTypeName = type.GetClrName();
       return new CommonType(clrTypeName.ShortName, clrTypeName.FullName, type.GetImplementedTypes().Select(x => x.GetClrName().FullName));
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例9: GetParent

 private XunitTestClassElement GetParent(ITypeElement containingType)
 {
     var typeName = containingType.GetClrName().GetPersistent();
     var id = typeName.FullName;
     return factory.GetElementById(project, id) as XunitTestClassElement;
 }
开发者ID:hazzik,项目名称:ReSharper.XUnitTestRunner,代码行数:6,代码来源:XunitFileExplorer.cs

示例10: GetOrCreateClassElement

        private XunitTestClassElement GetOrCreateClassElement(ITypeElement testClass, IProject projectElement, ProjectModelElementEnvoy projectEnvoy)
        {
            ITypeElement containingType = testClass.GetContainingType();
            XunitTestClassElement parent = null;
            if (containingType != null)
                parent = GetParent(containingType);

            return factory.GetOrCreateClassElement(testClass.GetClrName(), projectElement, projectEnvoy, parent);
        }
开发者ID:hazzik,项目名称:ReSharper.XUnitTestRunner,代码行数:9,代码来源:XunitFileExplorer.cs


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