本文整理汇总了C#中FireSpider.ConvertSetting类的典型用法代码示例。如果您正苦于以下问题:C# ConvertSetting类的具体用法?C# ConvertSetting怎么用?C# ConvertSetting使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConvertSetting类属于FireSpider命名空间,在下文中一共展示了ConvertSetting类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToSingle
//����ͨ��//
public override float ToSingle(object value, ConvertSetting convertSetting)
{
return convertSetting.Converter.ToSingle(ToBinary(value, convertSetting));
}
示例2: FromChar
//测试通过//
public override object FromChar(char value, ConvertSetting convertSetting)
{
return Convert.ToInt32(value);
}
示例3: FromDecimal
//测试通过//
public override object FromDecimal(decimal value, ConvertSetting convertSetting)
{
return (int)value;
}
示例4: FromUInt64
//测试通过//
public override object FromUInt64(ulong value, ConvertSetting convertSetting)
{
return (int)value;
}
示例5: ToGuid
public override Guid ToGuid(object value, ConvertSetting convertSetting)
{
if (value == null) return Guid.Empty;
return convertSetting.Converter.ToGuid(convertSetting.Converter.GetBytes((int)value));
}
示例6: FromGuid
//测试通过//
public override object FromGuid(Guid value, ConvertSetting convertSetting)
{
return convertSetting.Converter.ToInt32(value.ToByteArray());
}
示例7: FromObject
public override object FromObject(object value, ConvertSetting convertSetting)
{
return Convert.ToInt32(value);
}
示例8: FromBoolean
//����ͨ��////δ����//
public override object FromBoolean(bool value, ConvertSetting convertSetting)
{
return FromBinary(convertSetting.Converter.GetBytes(value), 0, convertSetting);
}
示例9: FromDateTime
//测试通过//
public override object FromDateTime(DateTime value, ConvertSetting convertSetting)
{
return (sbyte)value.ToBinary();
}
示例10: ToUInt64
//����ͨ��//
public override ulong ToUInt64(object value, ConvertSetting convertSetting)
{
return convertSetting.Converter.ToUInt64(ToBinary(value, convertSetting));
}
示例11: FromBinary
//����ͨ��//
public override object FromBinary(byte[] value, int offset, ConvertSetting convertSetting)
{
return convertSetting.Converter.SafeToGuid(value, Guid.Empty);
}
示例12: ToUInt32
//����ͨ��//
public override uint ToUInt32(object value, ConvertSetting convertSetting)
{
return convertSetting.Converter.ToUInt32(ToBinary(value, convertSetting));
}
示例13: ToUInt16
//����ͨ��//
public override ushort ToUInt16(object value, ConvertSetting convertSetting)
{
return convertSetting.Converter.ToUInt16(ToBinary(value, convertSetting));
}
示例14: ToString
//����ͨ��//
public override string ToString(object value, ConvertSetting convertSetting)
{
return value.ToString();
}
示例15: FromByte
//测试通过//
public override object FromByte(byte value, ConvertSetting convertSetting)
{
return (sbyte)value;
}