コード例 #1
0
		public static IEnumerable<TemplateIntermediateType> SearchForClassDerivatives(TemplateIntermediateType t, ResolutionContext ctxt)
		{
			if (!(t is ClassType || t is InterfaceType))
				throw new ArgumentException ("t is expected to be a class or an interface, not " + (t != null ? t.ToString () : "null"));

			var f = new ClassInterfaceDerivativeFinder (ctxt);

			f.typeNodeToFind = t.Definition;
			var bt = t;
			while (bt != null) {
				f.alreadyResolvedClasses.Add (bt.Definition);
				bt = DResolver.StripMemberSymbols (bt.Base) as TemplateIntermediateType;
			}

			var filter = MemberFilter.Classes;
			if (t is InterfaceType) // -> Only interfaces can inherit interfaces. Interfaces cannot be subclasses of classes.
				filter |= MemberFilter.Interfaces;

			f.IterateThroughScopeLayers (t.Definition.Location, filter);

			return f.results; // return them.
		}
コード例 #2
0
ファイル: DType.cs プロジェクト: DinrusGroup/DinrusIDE
		public ClassType(DClassLike dc, ISyntaxRegion td, 
			TemplateIntermediateType baseType, InterfaceType[] baseInterfaces = null,
			IEnumerable<TemplateParameterSymbol> deducedTypes = null)
			: base(dc, td, baseType, baseInterfaces, deducedTypes)
		{}
コード例 #3
0
ファイル: DType.cs プロジェクト: DinrusGroup/DinrusIDE
		public ClassType(DClassLike dc, ISyntaxRegion td, 
			TemplateIntermediateType baseType, InterfaceType[] baseInterfaces,
			ReadOnlyCollection<TemplateParameterSymbol> deducedTypes)
			: base(dc, td, baseType, baseInterfaces, deducedTypes)
		{}
コード例 #4
0
ファイル: DType.cs プロジェクト: windygu/DSharp
 public ClassType(DClassLike dc, ISyntaxRegion td,
                  TemplateIntermediateType baseType, InterfaceType[] baseInterfaces = null,
                  IEnumerable <TemplateParameterSymbol> deducedTypes = null)
     : base(dc, td, baseType, baseInterfaces, deducedTypes)
 {
 }
コード例 #5
0
ファイル: DType.cs プロジェクト: windygu/DSharp
 public ClassType(DClassLike dc, ISyntaxRegion td,
                  TemplateIntermediateType baseType, InterfaceType[] baseInterfaces,
                  ReadOnlyCollection <TemplateParameterSymbol> deducedTypes)
     : base(dc, td, baseType, baseInterfaces, deducedTypes)
 {
 }