本文整理汇总了C#中ISemanticResolver.AddClrResolvedType方法的典型用法代码示例。如果您正苦于以下问题:C# ISemanticResolver.AddClrResolvedType方法的具体用法?C# ISemanticResolver.AddClrResolvedType怎么用?C# ISemanticResolver.AddClrResolvedType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISemanticResolver
的用法示例。
在下文中一共展示了ISemanticResolver.AddClrResolvedType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateCLRType
// Requires that all of our base types have been resolved.
void CreateCLRType(
ISemanticResolver s,
ICLRtypeProvider provider)
{
// Should have already resolved as a blue type
Debug.Assert(this.Symbol != null);
BeginCheckCycle(s);
// Now that all of our dependent classes have their clr type set,
// we can go ahead and set ours.
// Note that a derived class may have already set ours, so we have
// to check
if (Symbol.CLRType == null)
{
// Get the clr type and then update the symbol engine
this.Symbol.SetCLRType(provider);
s.AddClrResolvedType(this.Symbol);
}
Debug.Assert(this.Symbol.CLRType != null);
// Nested classes
foreach(TypeDeclBase t in this.m_alNestedTypes)
{
t.ResolveTypesAsCLR(s, provider);
}
EndCheckCycle();
}
示例2: ResolveTypesAsCLR
public override void ResolveTypesAsCLR(
ISemanticResolver s,
ICLRtypeProvider provider
)
{
if (m_symbol.CLRType != null)
return;
m_symbol.SetCLRType(provider); // enum
s.AddClrResolvedType(this.Symbol);
}