本文整理匯總了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());
}
}