Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ClassType.Helpers.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 namespace SiliconStudio.Shaders.Ast.Hlsl
4 {
5  /// <summary>
6  /// Definition of a class.
7  /// </summary>
8  public partial class ClassType
9  {
10  /// <summary>
11  /// Determines whether the specified type is a a stream type.
12  /// </summary>
13  /// <param name="targetType">Type of the target.</param>
14  /// <returns><c>true</c> if [the specified target type] [is stream type] ; otherwise, <c>false</c>.</returns>
15  public static bool IsStreamType(TypeBase targetType)
16  {
17  return targetType is ClassType && ((ClassType)targetType).GenericArguments.Count > 0 && StreamTypeName.Parse(targetType.Name) != null;
18  }
19  }
20 }
Base type for all types.
Definition: TypeBase.cs:11
static bool IsStreamType(TypeBase targetType)
Determines whether the specified type is a a stream type.