本文整理汇总了C#中PredefinedType类的典型用法代码示例。如果您正苦于以下问题:C# PredefinedType类的具体用法?C# PredefinedType怎么用?C# PredefinedType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PredefinedType类属于命名空间,在下文中一共展示了PredefinedType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnaOpSig
public UnaOpSig(PredefinedType pt, UnaOpMask grfuom, int cuosSkip, PfnBindUnaOp pfn, UnaOpFuncKind fnkind)
{
this.pt = pt;
this.grfuom = grfuom;
this.cuosSkip = cuosSkip;
this.pfn = pfn;
this.fnkind = fnkind;
}
示例2: InitializePredefinedType
internal static AggregateSymbol InitializePredefinedType(AggregateSymbol sym, PredefinedType pt)
{
sym.SetPredefined(true);
sym.SetPredefType(pt);
sym.SetSkipUDOps(pt <= PredefinedType.PT_ENUM && pt != PredefinedType.PT_INTPTR && pt != PredefinedType.PT_UINTPTR && pt != PredefinedType.PT_TYPE);
return sym;
}
示例3: BinOpSig
public BinOpSig(PredefinedType pt1, PredefinedType pt2,
BinOpMask mask, int cbosSkip, PfnBindBinOp pfn, OpSigFlags grfos, BinOpFuncKind fnkind)
{
this.pt1 = pt1;
this.pt2 = pt2;
this.mask = mask;
this.cbosSkip = cbosSkip;
this.pfn = pfn;
this.grfos = grfos;
this.fnkind = fnkind;
}
示例4: DelayLoadPredefSym
// We want to delay load the predef syms as needed.
private AggregateSymbol DelayLoadPredefSym(PredefinedType pt)
{
CType type = _runtimeBinderSymbolTable.GetCTypeFromType(PredefinedTypeFacts.GetAssociatedSystemType(pt));
AggregateSymbol sym = type.getAggregate();
// If we failed to load this thing, we have problems.
if (sym == null)
{
return null;
}
return PredefinedTypes.InitializePredefinedType(sym, pt);
}
示例5: PredefinedTypeInfo
internal PredefinedTypeInfo(PredefinedType type, Type associatedSystemType, string name, bool required, int arity, bool inMscorlib)
: this(type, associatedSystemType, name, required, arity, AggKindEnum.Class, FUNDTYPE.FT_REF, inMscorlib)
{
}
示例6: isPredefAgg
public bool isPredefAgg(PredefinedType pt)
{
return _isPredefined && (PredefinedType)_iPredef == pt;
}
示例7: CheckSingleType
private static bool CheckSingleType(PredefinedType predefinedType, IPsiModule psiModule, IType type, ITypeConversionRule conversionRule, IType typeInDeclaration)
{
if (!type.IsGenericOrNonIEnumerable())
{
if (!type.IsSubtypeOf(predefinedType.Array))
return true;
IDeclaredType scalarType = type.GetScalarType();
return scalarType != null && scalarType.IsImplicitlyConvertibleTo(typeInDeclaration, conversionRule);
}
IDeclaredType ienumerableOf = CollectionTypeUtil.CreateIEnumerableOf(psiModule, typeInDeclaration);
return ienumerableOf == null || type.IsImplicitlyConvertibleTo(ienumerableOf, conversionRule);
}
示例8: GenerateParamsArray
protected virtual EXPRARRINIT GenerateParamsArray(EXPR args, PredefinedType pt)
{
int parameterCount = ExpressionIterator.Count(args);
AggregateType paramsArrayElementType = GetSymbolLoader().GetOptPredefTypeErr(pt, true);
ArrayType paramsArrayType = GetSymbolLoader().GetTypeManager().GetArray(paramsArrayElementType, 1);
EXPRCONSTANT paramsArrayArg = GetExprFactory().CreateIntegerConstant(parameterCount);
EXPRARRINIT arrayInit = GetExprFactory().CreateArrayInit(EXPRFLAG.EXF_CANTBENULL, paramsArrayType, args, paramsArrayArg, null);
arrayInit.dimSize = parameterCount;
arrayInit.dimSizes = new int[] { arrayInit.dimSize }; // CLEANUP: Why isn't this done by the factory?
return arrayInit;
}
示例9: GetOptPredefAgg
private AggregateSymbol GetOptPredefAgg(PredefinedType pt)
{
return GetSymbolLoader().GetOptPredefAgg(pt);
}
示例10: isPredefType
public bool isPredefType(PredefinedType pt)
{
if (IsAggregateType())
return AsAggregateType().getAggregate().IsPredefined() && AsAggregateType().getAggregate().GetPredefType() == pt;
return (IsVoidType() && pt == PredefinedType.PT_VOID);
}
示例11: TryGetPredefinedType
public bool TryGetPredefinedType(SyntaxToken token, out PredefinedType type)
{
throw new NotImplementedException();
}
示例12: isRequired
public static bool isRequired(PredefinedType pt)
{
return PredefinedTypeFacts.IsRequired(pt);
}
示例13: GetFullName
public static string GetFullName(PredefinedType pt)
{
return PredefinedTypeFacts.GetName(pt);
}
示例14: GetOptPredefAgg
public AggregateSymbol GetOptPredefAgg(PredefinedType pt)
{
if (_predefSyms[(int)pt] == null)
{
// Delay load this thing.
_predefSyms[(int)pt] = DelayLoadPredefSym(pt);
}
Debug.Assert(_predefSyms != null);
return _predefSyms[(int)pt];
}
示例15: GetReqPredefAgg
public AggregateSymbol GetReqPredefAgg(PredefinedType pt)
{
if (!PredefinedTypeFacts.IsRequired(pt)) throw Error.InternalCompilerError();
if (_predefSyms[(int)pt] == null)
{
// Delay load this thing.
_predefSyms[(int)pt] = DelayLoadPredefSym(pt);
}
return _predefSyms[(int)pt];
}