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


C# type_definition.GetType方法代码示例

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


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

示例1: CompareInternal

 public void CompareInternal(type_definition left, type_definition right)
 {
     if (left == null && right != null || left != null && right == null)
         throw_not_equal(left, right);
     if (left != null && right != null)
     {
         if (left.GetType() != right.GetType())
             throw_not_equal(left, right);
         /*Type t = left.GetType();
         MethodInfo mi = typeof(SyntaxTreeComparer).GetMethod("CompareInternal", new Type[] { t, t });
         mi.Invoke(this, new object[] { left, right });*/
         if (left is array_type)
             CompareInternal(left as array_type, right as array_type);
         else if (left is array_of_const_type_definition)
             CompareInternal(left as array_of_const_type_definition, right as array_of_const_type_definition);
         else if (left is array_of_named_type_definition)
             CompareInternal(left as array_of_named_type_definition, right as array_of_named_type_definition);
         else if (left is class_definition)
             CompareInternal(left as class_definition, right as class_definition);
         else if (left is diapason)
             CompareInternal(left as diapason, right as diapason);
         else if (left is enum_type_definition)
             CompareInternal(left as enum_type_definition, right as enum_type_definition);
         else if (left is file_type)
             CompareInternal(left as file_type, right as file_type);
         else if (left is file_type_definition)
             CompareInternal(left as file_type_definition, right as file_type_definition);
         else if (left is procedure_header)
             CompareInternal(left as procedure_header, right as procedure_header);
         else if (left is named_type_reference)
             CompareInternal(left as named_type_reference, right as named_type_reference);
         else if (left is ref_type)
             CompareInternal(left as ref_type, right as ref_type);
         else if (left is set_type_definition)
             CompareInternal(left as set_type_definition, right as set_type_definition);
         else if (left is string_num_definition)
             CompareInternal(left as string_num_definition, right as string_num_definition);
         else if (left is template_type_reference)
             CompareInternal(left as template_type_reference, right as template_type_reference);
         else if (left is declaration_specificator)
             CompareInternal(left as declaration_specificator, right as declaration_specificator);
         else if (left is lambda_inferred_type)
             CompareInternal(left as lambda_inferred_type, right as lambda_inferred_type);
         else if (left is no_type_foreach)
             CompareInternal(left as no_type_foreach, right as no_type_foreach);
         else if (left is sequence_type)
             CompareInternal(left as sequence_type, right as sequence_type);
         else if (left is modern_proc_type)
             CompareInternal(left as modern_proc_type, right as modern_proc_type);
         else
             throw new NotImplementedException(left.GetType().ToString());
     }
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:53,代码来源:SyntaxTreeComparer.cs


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