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


C# INamespace类代码示例

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


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

示例1: AddNamespace

        public static void AddNamespace(INamespace ns)
        {
            if (ns == null)
                throw new ArgumentNullException("ns");

            namespaces[ns.Identifier] = ns;
        }
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:7,代码来源:HtmlNodeExtensions.cs

示例2: ResolveQualifiedNameToSingle

		public static IEntity ResolveQualifiedNameToSingle(INamespace root, string qualifiedName)
		{
			IEntity current = root;
			foreach (string part in qualifiedName.Split('.'))
				current = ResolveSingle((INamespace) current, part);
			return current;
		}
开发者ID:0xb1dd1e,项目名称:boo,代码行数:7,代码来源:NamespaceAssert.cs

示例3: AddNamespace

		public void AddNamespace (INamespace ns)
		{
			if (usedNamespaces.Contains (ns.Name))
				return;
			usedNamespaces.Add (ns.Name);
			result.Add (Factory.CreateNamespaceCompletionData (ns));
		}
开发者ID:Gobiner,项目名称:ILSpy,代码行数:7,代码来源:CompletionDataWrapper.cs

示例4: CodeNamespace

 public CodeNamespace(CodeModelContext context, INamespace ns)
     : base(context)
 {
     this.ns = ns;
     this.InfoLocation = global::EnvDTE.vsCMInfoLocation.vsCMInfoLocationExternal;
     this.Language = context.CurrentProject.GetCodeModelLanguage();
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:CodeNamespace.cs

示例5: ResolveCoalescingNamespaces

		public static bool ResolveCoalescingNamespaces(INamespace parent, INamespace namespaceToResolveAgainst, string name, EntityType typesToConsider, ICollection<IEntity> resultingSet)
		{
			var resolved = new Set<IEntity>();
			if (!namespaceToResolveAgainst.Resolve(resolved, name, typesToConsider))
				return false;
			return CoalesceResolved(resolved, parent, name, resultingSet);
		}
开发者ID:0xb1dd1e,项目名称:boo,代码行数:7,代码来源:Namespaces.cs

示例6: ResolveSingle

		public static IEntity ResolveSingle(INamespace root, string name)
		{
			var resolved = new List<IEntity>();
			Assert.IsTrue(root.Resolve(resolved, name, EntityType.Any), "Failed to resolve '{0}' against '{1}'", name, root);
			Assert.AreEqual(1, resolved.Count);
			return resolved[0];
		}
开发者ID:0xb1dd1e,项目名称:boo,代码行数:7,代码来源:NamespaceAssert.cs

示例7: FindReferences

		AstNode[] FindReferences(INamespace ns)
		{
			var result = new List<AstNode>();
			var searchScopes = findReferences.GetSearchScopes(ns);
			findReferences.FindReferencesInFile(searchScopes, unresolvedFile, syntaxTree, compilation,
			                                    (node, rr) => result.Add(node), CancellationToken.None);
			return result.OrderBy(n => n.StartLocation).ToArray();
		}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:8,代码来源:FindReferencesTest.cs

示例8: SetChild

 public void SetChild(string name, INamespace entity)
 {
     _children[name] = entity;
     if (name == "")
     {
         _empty = entity;
     }
 }
开发者ID:w4x,项目名称:boolangstudio,代码行数:8,代码来源:GlobalNamespace.cs

示例9: NamespaceDelegator

 public NamespaceDelegator(INamespace parent, params INamespace[] namespaces)
 {
     if (null == namespaces)
     {
         throw new ArgumentNullException("namespaces");
     }
     _parent = parent;
     _namespaces = namespaces;
 }
开发者ID:w4x,项目名称:boolangstudio,代码行数:9,代码来源:NamespaceDelegator.cs

示例10: NamespaceEntity

        public NamespaceEntity(INamespace parent, TypeSystemServices tagManager, string name)
        {
            _parent = parent;
            _typeSystemServices = tagManager;
            _name = name;
			_assemblies = new Dictionary<Assembly, Dictionary<string, List<Type>>>(AssemblyEqualityComparer.Default);
            _childrenNamespaces = new Dictionary<string, NamespaceEntity>();
            _internalModules = new List<ModuleEntity>();
            _externalModules = new List<ExternalType>();
开发者ID:boo,项目名称:boo-lang,代码行数:9,代码来源:NamespaceEntity.cs

示例11: GlobalNamespace

 public GlobalNamespace(IDictionary children)
     : base(null, children)
 {
     _empty = (INamespace)children[""];
     if (null == _empty)
     {
         _empty = NullNamespace.Default;
     }
 }
开发者ID:w4x,项目名称:boolangstudio,代码行数:9,代码来源:GlobalNamespace.cs

示例12: SimpleNamespace

 public SimpleNamespace(INamespace parent, IDictionary children)
 {
     if (null == children)
     {
         throw new ArgumentNullException("children");
     }
     _parent = parent;
     _children = children;
 }
开发者ID:w4x,项目名称:boolangstudio,代码行数:9,代码来源:SimpleNamespace.cs

示例13: IsAccessible

		bool IsAccessible(MemberLookup lookup, INamespace ns)
		{
			if (ns.Types.Any (t => lookup.IsAccessible (t, false)))
				return true;
			foreach (var child in ns.ChildNamespaces)
				if (IsAccessible (lookup, child))
					return true;
			return false;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:9,代码来源:CompletionDataWrapper.cs

示例14: MergedNamespace

		/// <summary>
		/// Creates a new merged root namespace.
		/// </summary>
		/// <param name="compilation">The main compilation.</param>
		/// <param name="namespaces">The individual namespaces being merged.</param>
		/// <param name="externAlias">The extern alias for this namespace.</param>
		public MergedNamespace(ICompilation compilation, INamespace[] namespaces, string externAlias = null)
		{
			if (compilation == null)
				throw new ArgumentNullException("compilation");
			if (namespaces == null)
				throw new ArgumentNullException("namespaces");
			this.compilation = compilation;
			this.namespaces = namespaces;
			this.externAlias = externAlias;
		}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:16,代码来源:MergedNamespace.cs

示例15: ResolveQualifiedName

		public static Set<IEntity> ResolveQualifiedName(INamespace root, string qualifiedName)
		{
			INamespace current = root;
			string[] parts = qualifiedName.Split('.');
			for (int i=0; i < parts.Length - 1; ++i)
				current = (INamespace) ResolveSingle(current, parts[i]);
			var result = new Set<IEntity>();
			current.Resolve(result, parts[parts.Length - 1], EntityType.Any);
			return result;
		}
开发者ID:0xb1dd1e,项目名称:boo,代码行数:10,代码来源:NamespaceAssert.cs


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