本文整理汇总了C#中ITypeMapper.MapType方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeMapper.MapType方法的具体用法?C# ITypeMapper.MapType怎么用?C# ITypeMapper.MapType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypeMapper
的用法示例。
在下文中一共展示了ITypeMapper.MapType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetReturnType
public override Type GetReturnType(ITypeMapper typeMapper) => typeMapper.MapType(typeof(float));
示例2: Initialize
void Initialize(ITypeMapper typeMapper)
{
if (_initialized) return;
_initialized = true;
// TODO: proper checking as in specification
if (_ifTrue.GetReturnType(typeMapper) != _ifFalse.GetReturnType(typeMapper))
throw new ArgumentException(Properties.Messages.ErrInvalidConditionalVariants);
if (_cond.GetReturnType(typeMapper) != typeMapper.MapType(typeof(bool))) _cond = _cond.IsTrue();
}
示例3: GetReturnType
public override Type GetReturnType(ITypeMapper typeMapper) => typeMapper.MapType(_value.GetType());
示例4: InvokeEquals
public ContextualOperand InvokeEquals(Operand right, ITypeMapper typeMapper)
{
Operand left = this;
var args = new Operand[] { left, right };
return OperandExtensions.SetLeakedState(new ContextualOperand(new Invocation(typeMapper.TypeInfo.FindMethod(typeMapper.MapType(typeof(object)), "Equals", args, true), null, args), typeMapper), true);
}
示例5: GetReturnType
public override Type GetReturnType(ITypeMapper typeMapper) => typeMapper.MapType(typeof(System.Type));
示例6: GetReturnType
public override Type GetReturnType(ITypeMapper typeMapper)
{
return typeMapper.MapType(_type);
}
示例7: GetReturnType
public override Type GetReturnType(ITypeMapper typeMapper) => typeMapper.MapType(typeof(string));
示例8: GetReturnType
public override Type GetReturnType(ITypeMapper typeMapper) => typeMapper.MapType(typeof(decimal));
示例9: GetReturnType
public override Type GetReturnType(ITypeMapper typeMapper) => typeMapper.MapType(_t);