本文整理汇总了C#中InternalPrimitiveTypeE类的典型用法代码示例。如果您正苦于以下问题:C# InternalPrimitiveTypeE类的具体用法?C# InternalPrimitiveTypeE怎么用?C# InternalPrimitiveTypeE使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InternalPrimitiveTypeE类属于命名空间,在下文中一共展示了InternalPrimitiveTypeE类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Init
internal void Init(InternalPrimitiveTypeE code, Array array)
{
this.code = code;
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
this.booleanA = (bool[]) array;
return;
case InternalPrimitiveTypeE.Byte:
case InternalPrimitiveTypeE.Currency:
case InternalPrimitiveTypeE.Decimal:
case InternalPrimitiveTypeE.TimeSpan:
case InternalPrimitiveTypeE.DateTime:
break;
case InternalPrimitiveTypeE.Char:
this.charA = (char[]) array;
return;
case InternalPrimitiveTypeE.Double:
this.doubleA = (double[]) array;
return;
case InternalPrimitiveTypeE.Int16:
this.int16A = (short[]) array;
return;
case InternalPrimitiveTypeE.Int32:
this.int32A = (int[]) array;
return;
case InternalPrimitiveTypeE.Int64:
this.int64A = (long[]) array;
return;
case InternalPrimitiveTypeE.SByte:
this.sbyteA = (sbyte[]) array;
return;
case InternalPrimitiveTypeE.Single:
this.singleA = (float[]) array;
return;
case InternalPrimitiveTypeE.UInt16:
this.uint16A = (ushort[]) array;
return;
case InternalPrimitiveTypeE.UInt32:
this.uint32A = (uint[]) array;
return;
case InternalPrimitiveTypeE.UInt64:
this.uint64A = (ulong[]) array;
break;
default:
return;
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:60,代码来源:PrimitiveArray.cs
示例2: CreatePrimitiveArray
internal static Array CreatePrimitiveArray(InternalPrimitiveTypeE code, int length)
{
Array array = null;
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
return new bool[length];
case InternalPrimitiveTypeE.Byte:
return new byte[length];
case InternalPrimitiveTypeE.Char:
return new char[length];
case InternalPrimitiveTypeE.Currency:
return array;
case InternalPrimitiveTypeE.Decimal:
return new decimal[length];
case InternalPrimitiveTypeE.Double:
return new double[length];
case InternalPrimitiveTypeE.Int16:
return new short[length];
case InternalPrimitiveTypeE.Int32:
return new int[length];
case InternalPrimitiveTypeE.Int64:
return new long[length];
case InternalPrimitiveTypeE.SByte:
return new sbyte[length];
case InternalPrimitiveTypeE.Single:
return new float[length];
case InternalPrimitiveTypeE.TimeSpan:
return new TimeSpan[length];
case InternalPrimitiveTypeE.DateTime:
return new DateTime[length];
case InternalPrimitiveTypeE.UInt16:
return new ushort[length];
case InternalPrimitiveTypeE.UInt32:
return new uint[length];
case InternalPrimitiveTypeE.UInt64:
return new ulong[length];
}
return array;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:55,代码来源:Converter.cs
示例3: Init
internal void Init()
{
this.NIFullName = null;
this.NIobjectId = 0L;
this.NIassemId = 0L;
this.NIprimitiveTypeEnum = InternalPrimitiveTypeE.Invalid;
this.NItype = null;
this.NIisSealed = false;
this.NItransmitTypeOnObject = false;
this.NItransmitTypeOnMember = false;
this.NIisParentTypeOnObject = false;
this.NIisArray = false;
this.NIisArrayItem = false;
this.NIarrayEnum = InternalArrayTypeE.Empty;
this.NIsealedStatusChecked = false;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:NameInfo.cs
示例4: Init
internal void Init()
{
this.PRparseTypeEnum = InternalParseTypeE.Empty;
this.PRobjectTypeEnum = InternalObjectTypeE.Empty;
this.PRarrayTypeEnum = InternalArrayTypeE.Empty;
this.PRmemberTypeEnum = InternalMemberTypeE.Empty;
this.PRmemberValueEnum = InternalMemberValueE.Empty;
this.PRobjectPositionEnum = InternalObjectPositionE.Empty;
this.PRname = null;
this.PRvalue = null;
this.PRkeyDt = null;
this.PRdtType = null;
this.PRdtTypeCode = InternalPrimitiveTypeE.Invalid;
this.PRisEnum = false;
this.PRobjectId = 0L;
this.PRidRef = 0L;
this.PRarrayElementTypeString = null;
this.PRarrayElementType = null;
this.PRisArrayVariant = false;
this.PRarrayElementTypeCode = InternalPrimitiveTypeE.Invalid;
this.PRrank = 0;
this.PRlengthA = null;
this.PRpositionA = null;
this.PRlowerBoundA = null;
this.PRupperBoundA = null;
this.PRindexMap = null;
this.PRmemberIndex = 0;
this.PRlinearlength = 0;
this.PRrectangularMap = null;
this.PRisLowerBound = false;
this.PRtopId = 0L;
this.PRheaderId = 0L;
this.PRisValueTypeFixup = false;
this.PRnewObj = null;
this.PRobjectA = null;
this.PRprimitiveArray = null;
this.PRobjectInfo = null;
this.PRisRegistered = false;
this.PRmemberData = null;
this.PRsi = null;
this.PRnullCount = 0;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:42,代码来源:ParseRecord.cs
示例5: IsWriteAsByteArray
internal static bool IsWriteAsByteArray(InternalPrimitiveTypeE code)
{
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
case InternalPrimitiveTypeE.Char:
case InternalPrimitiveTypeE.Byte:
case InternalPrimitiveTypeE.Double:
case InternalPrimitiveTypeE.Int16:
case InternalPrimitiveTypeE.Int32:
case InternalPrimitiveTypeE.Int64:
case InternalPrimitiveTypeE.SByte:
case InternalPrimitiveTypeE.Single:
case InternalPrimitiveTypeE.UInt16:
case InternalPrimitiveTypeE.UInt32:
case InternalPrimitiveTypeE.UInt64:
return true;
default:
return false;
}
}
开发者ID:Corillian,项目名称:corefx,代码行数:21,代码来源:Converter.cs
示例6: IsWriteAsByteArray
internal static bool IsWriteAsByteArray(InternalPrimitiveTypeE code)
{
bool isWrite = false;
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
case InternalPrimitiveTypeE.Char:
case InternalPrimitiveTypeE.Byte:
case InternalPrimitiveTypeE.Double:
case InternalPrimitiveTypeE.Int16:
case InternalPrimitiveTypeE.Int32:
case InternalPrimitiveTypeE.Int64:
case InternalPrimitiveTypeE.SByte:
case InternalPrimitiveTypeE.Single:
case InternalPrimitiveTypeE.UInt16:
case InternalPrimitiveTypeE.UInt32:
case InternalPrimitiveTypeE.UInt64:
isWrite = true;
break;
}
return isWrite;
}
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:23,代码来源:BinaryConverter.cs
示例7: Init
internal void Init()
{
this.NInameSpaceEnum = InternalNameSpaceE.None;
this.NIname = null;
this.NIobjectId = 0L;
this.NIassemId = 0L;
this.NIprimitiveTypeEnum = InternalPrimitiveTypeE.Invalid;
this.NItype = null;
this.NIisSealed = false;
this.NItransmitTypeOnObject = false;
this.NItransmitTypeOnMember = false;
this.NIisParentTypeOnObject = false;
this.NIisMustUnderstand = false;
this.NInamespace = null;
this.NIheaderPrefix = null;
this.NIitemName = null;
this.NIisArray = false;
this.NIisArrayItem = false;
this.NIisTopLevelObject = false;
this.NIisNestedObject = false;
this.NIisHeader = false;
this.NIisRemoteRecord = false;
this.NIattributeInfo = null;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:24,代码来源:NameInfo.cs
示例8: InitCodeA
private static void InitCodeA()
{
var codeATemp = new InternalPrimitiveTypeE[19];
codeATemp[(int)TypeCode.Empty] = InternalPrimitiveTypeE.Invalid;
codeATemp[(int)TypeCode.Object] = InternalPrimitiveTypeE.Invalid;
codeATemp[2] = InternalPrimitiveTypeE.Invalid; // TODO: Change 2 to (int)TypeCode.DBNull when it's available
codeATemp[(int)TypeCode.Boolean] = InternalPrimitiveTypeE.Boolean;
codeATemp[(int)TypeCode.Char] = InternalPrimitiveTypeE.Char;
codeATemp[(int)TypeCode.SByte] = InternalPrimitiveTypeE.SByte;
codeATemp[(int)TypeCode.Byte] = InternalPrimitiveTypeE.Byte;
codeATemp[(int)TypeCode.Int16] = InternalPrimitiveTypeE.Int16;
codeATemp[(int)TypeCode.UInt16] = InternalPrimitiveTypeE.UInt16;
codeATemp[(int)TypeCode.Int32] = InternalPrimitiveTypeE.Int32;
codeATemp[(int)TypeCode.UInt32] = InternalPrimitiveTypeE.UInt32;
codeATemp[(int)TypeCode.Int64] = InternalPrimitiveTypeE.Int64;
codeATemp[(int)TypeCode.UInt64] = InternalPrimitiveTypeE.UInt64;
codeATemp[(int)TypeCode.Single] = InternalPrimitiveTypeE.Single;
codeATemp[(int)TypeCode.Double] = InternalPrimitiveTypeE.Double;
codeATemp[(int)TypeCode.Decimal] = InternalPrimitiveTypeE.Decimal;
codeATemp[(int)TypeCode.DateTime] = InternalPrimitiveTypeE.DateTime;
codeATemp[17] = InternalPrimitiveTypeE.Invalid;
codeATemp[(int)TypeCode.String] = InternalPrimitiveTypeE.Invalid;
s_codeA = codeATemp;
}
开发者ID:Corillian,项目名称:corefx,代码行数:24,代码来源:Converter.cs
示例9: ToComType
internal static string ToComType(InternalPrimitiveTypeE code)
{
if (s_valueA == null)
{
InitValueA();
}
return s_valueA[(int)code];
}
开发者ID:Corillian,项目名称:corefx,代码行数:8,代码来源:Converter.cs
示例10: GetNameSpaceEnum
internal static InternalNameSpaceE GetNameSpaceEnum(InternalPrimitiveTypeE code, Type type, WriteObjectInfo objectInfo, out string typeName)
{
InternalNameSpaceE nameSpaceEnum = InternalNameSpaceE.None;
typeName = null;
if (code != InternalPrimitiveTypeE.Invalid)
{
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
case InternalPrimitiveTypeE.Char:
case InternalPrimitiveTypeE.Byte:
case InternalPrimitiveTypeE.Double:
case InternalPrimitiveTypeE.Int16:
case InternalPrimitiveTypeE.Int32:
case InternalPrimitiveTypeE.Int64:
case InternalPrimitiveTypeE.SByte:
case InternalPrimitiveTypeE.Single:
case InternalPrimitiveTypeE.UInt16:
case InternalPrimitiveTypeE.UInt32:
case InternalPrimitiveTypeE.UInt64:
case InternalPrimitiveTypeE.DateTime:
case InternalPrimitiveTypeE.TimeSpan:
nameSpaceEnum = InternalNameSpaceE.XdrPrimitive;
typeName = "System." + ToComType(code);
break;
case InternalPrimitiveTypeE.Decimal:
nameSpaceEnum = InternalNameSpaceE.UrtSystem;
typeName = "System." + ToComType(code);
break;
}
}
if ((nameSpaceEnum == InternalNameSpaceE.None) && type != null)
{
if (ReferenceEquals(type, s_typeofString))
{
nameSpaceEnum = InternalNameSpaceE.XdrString;
}
else
{
if (objectInfo == null)
{
typeName = type.FullName;
nameSpaceEnum = type.GetTypeInfo().Assembly == s_urtAssembly ? InternalNameSpaceE.UrtSystem : InternalNameSpaceE.UrtUser;
}
else
{
typeName = objectInfo.GetTypeFullName();
nameSpaceEnum = objectInfo.GetAssemblyString().Equals(s_urtAssemblyString) ? InternalNameSpaceE.UrtSystem : InternalNameSpaceE.UrtUser;
}
}
}
return nameSpaceEnum;
}
开发者ID:Corillian,项目名称:corefx,代码行数:57,代码来源:Converter.cs
示例11: ReadValue
// ReadValue from stream using InternalPrimitiveTypeE code
internal Object ReadValue(InternalPrimitiveTypeE code)
{
SerTrace.Log( this, "ReadValue ",((Enum)code).ToString());
Object var = null;
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
var = ReadBoolean();
break;
case InternalPrimitiveTypeE.Byte:
var = ReadByte();
break;
case InternalPrimitiveTypeE.Char:
var = ReadChar();
break;
case InternalPrimitiveTypeE.Double:
var = ReadDouble();
break;
case InternalPrimitiveTypeE.Int16:
var = ReadInt16();
break;
case InternalPrimitiveTypeE.Int32:
var = ReadInt32();
break;
case InternalPrimitiveTypeE.Int64:
var = ReadInt64();
break;
case InternalPrimitiveTypeE.SByte:
var = ReadSByte();
break;
case InternalPrimitiveTypeE.Single:
var = ReadSingle();
break;
case InternalPrimitiveTypeE.UInt16:
var = ReadUInt16();
break;
case InternalPrimitiveTypeE.UInt32:
var = ReadUInt32();
break;
case InternalPrimitiveTypeE.UInt64:
var = ReadUInt64();
break;
case InternalPrimitiveTypeE.Decimal:
var = ReadDecimal();
break;
case InternalPrimitiveTypeE.TimeSpan:
var = ReadTimeSpan();
break;
case InternalPrimitiveTypeE.DateTime:
var = ReadDateTime();
break;
default:
throw new SerializationException(Environment.GetResourceString("Serialization_TypeCode",((Enum)code).ToString()));
}
SerTrace.Log( "ReadValue Exit ",var);
return var;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:59,代码来源:binaryparser.cs
示例12: PrimitiveArray
internal PrimitiveArray(InternalPrimitiveTypeE code, Array array)
{
_code = code;
switch (code)
{
case InternalPrimitiveTypeE.Boolean: _booleanA = (bool[])array; break;
case InternalPrimitiveTypeE.Char: _charA = (char[])array; break;
case InternalPrimitiveTypeE.Double: _doubleA = (double[])array; break;
case InternalPrimitiveTypeE.Int16: _int16A = (short[])array; break;
case InternalPrimitiveTypeE.Int32: _int32A = (int[])array; break;
case InternalPrimitiveTypeE.Int64: _int64A = (long[])array; break;
case InternalPrimitiveTypeE.SByte: _sbyteA = (sbyte[])array; break;
case InternalPrimitiveTypeE.Single: _singleA = (float[])array; break;
case InternalPrimitiveTypeE.UInt16: _uint16A = (ushort[])array; break;
case InternalPrimitiveTypeE.UInt32: _uint32A = (uint[])array; break;
case InternalPrimitiveTypeE.UInt64: _uint64A = (ulong[])array; break;
}
}
开发者ID:alessandromontividiu03,项目名称:corefx,代码行数:18,代码来源:BinaryUtilClasses.cs
示例13: TypeToNameInfo
// Transforms a type to the serialized string form. URT Primitive types are converted to XMLData Types
private NameInfo TypeToNameInfo(Type type, WriteObjectInfo objectInfo, InternalPrimitiveTypeE code, NameInfo nameInfo)
{
InternalST.Soap( this, "TypeToNameInfo Entry type ",type,", objectInfo ",objectInfo,", code ", ((Enum)code).ToString());
if (nameInfo == null)
nameInfo = GetNameInfo();
else
nameInfo.Init();
nameInfo.NIisSealed = type.IsSealed;
String typeName = null;
nameInfo.NInameSpaceEnum = Converter.GetNameSpaceEnum(code, type, objectInfo, out typeName);
nameInfo.NIprimitiveTypeEnum = code;
nameInfo.NItype = type;
nameInfo.NIname = typeName;
if (objectInfo != null)
{
nameInfo.NIattributeInfo = objectInfo.typeAttributeInfo;
nameInfo.NIassemId = objectInfo.assemId;
}
switch (nameInfo.NInameSpaceEnum)
{
case InternalNameSpaceE.XdrPrimitive:
break;
case InternalNameSpaceE.XdrString:
nameInfo.NIname = "string";
break;
case InternalNameSpaceE.UrtSystem:
break;
case InternalNameSpaceE.UrtUser:
//if (type.FullName.StartsWith("System."))
if (type.Module.Assembly == Converter.urtAssembly)
{
// The type name could be an ISerializable
// But the type returned (typeName) could be a fake
// type
}
else
{
if (objectInfo == null)
{
InternalST.Soap( this, "TypeToNameInfo ObjectInfo is null 2 ",type);
}
}
break;
}
InternalST.Soap( this, "TypeToNameInfo Exit ",type, " typeName "+nameInfo.NIname);
return nameInfo;
}
开发者ID:ArildF,项目名称:masters,代码行数:52,代码来源:soapobjectwriter.cs
示例14: TypeLength
internal static int TypeLength(InternalPrimitiveTypeE code)
{
int length = 0;
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
length = 1;
break;
case InternalPrimitiveTypeE.Char:
length = 2;
break;
case InternalPrimitiveTypeE.Byte:
length = 1;
break;
case InternalPrimitiveTypeE.Double:
length = 8;
break;
case InternalPrimitiveTypeE.Int16:
length = 2;
break;
case InternalPrimitiveTypeE.Int32:
length = 4;
break;
case InternalPrimitiveTypeE.Int64:
length = 8;
break;
case InternalPrimitiveTypeE.SByte:
length = 1;
break;
case InternalPrimitiveTypeE.Single:
length = 4;
break;
case InternalPrimitiveTypeE.UInt16:
length = 2;
break;
case InternalPrimitiveTypeE.UInt32:
length = 4;
break;
case InternalPrimitiveTypeE.UInt64:
length = 8;
break;
}
return length;
}
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:45,代码来源:BinaryConverter.cs
示例15: FromString
// Translates a string into an Object
internal static Object FromString(String value, InternalPrimitiveTypeE code)
{
Object var;
SerTrace.Log( "Converter", "FromString Entry ",value," " , ((Enum)code).ToString());
// InternalPrimitiveTypeE needs to be a primitive type
Contract.Assert((code != InternalPrimitiveTypeE.Invalid), "[Converter.FromString]!InternalPrimitiveTypeE.Invalid ");
if (code != InternalPrimitiveTypeE.Invalid)
var = Convert.ChangeType(value, ToTypeCode(code), CultureInfo.InvariantCulture);
else
var = value;
SerTrace.Log( "Converter", "FromString Exit "+((var == null)?"null":var+" var type "+((var==null)?"<null>":var.GetType().ToString())));
return var;
}
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:14,代码来源:BinaryConverter.cs
示例16: ToCode
internal InternalPrimitiveTypeE ToCode(Type type)
{
if (Object.ReferenceEquals(previousType, type))
{
return previousCode;
}
else
{
InternalPrimitiveTypeE code = Converter.ToCode(type);
if (code != InternalPrimitiveTypeE.Invalid)
{
previousType = type;
previousCode = code;
}
return code;
}
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:17,代码来源:BinaryObjectWriter.cs
示例17: Init
internal void Init()
{
_fullName = null;
_objectId = 0;
_assemId = 0;
_primitiveTypeEnum = InternalPrimitiveTypeE.Invalid;
_type = null;
_isSealed = false;
_transmitTypeOnObject = false;
_transmitTypeOnMember = false;
_isParentTypeOnObject = false;
_isArray = false;
_isArrayItem = false;
_arrayEnum = InternalArrayTypeE.Empty;
_sealedStatusChecked = false;
}
开发者ID:alessandromontividiu03,项目名称:corefx,代码行数:16,代码来源:BinaryUtilClasses.cs
示例18: ReadValue
// ReadValue from stream using InternalPrimitiveTypeE code
internal object ReadValue(InternalPrimitiveTypeE code)
{
object var = null;
switch (code)
{
case InternalPrimitiveTypeE.Boolean: var = ReadBoolean(); break;
case InternalPrimitiveTypeE.Byte: var = ReadByte(); break;
case InternalPrimitiveTypeE.Char: var = ReadChar(); break;
case InternalPrimitiveTypeE.Double: var = ReadDouble(); break;
case InternalPrimitiveTypeE.Int16: var = ReadInt16(); break;
case InternalPrimitiveTypeE.Int32: var = ReadInt32(); break;
case InternalPrimitiveTypeE.Int64: var = ReadInt64(); break;
case InternalPrimitiveTypeE.SByte: var = ReadSByte(); break;
case InternalPrimitiveTypeE.Single: var = ReadSingle(); break;
case InternalPrimitiveTypeE.UInt16: var = ReadUInt16(); break;
case InternalPrimitiveTypeE.UInt32: var = ReadUInt32(); break;
case InternalPrimitiveTypeE.UInt64: var = ReadUInt64(); break;
case InternalPrimitiveTypeE.Decimal: var = ReadDecimal(); break;
case InternalPrimitiveTypeE.TimeSpan: var = ReadTimeSpan(); break;
case InternalPrimitiveTypeE.DateTime: var = ReadDateTime(); break;
default: throw new SerializationException(SR.Format(SR.Serialization_TypeCode, code.ToString()));
}
return var;
}
开发者ID:geoffkizer,项目名称:corefx,代码行数:25,代码来源:BinaryParser.cs
示例19: WriteValue
internal void WriteValue(InternalPrimitiveTypeE code, object value)
{
switch (code)
{
case InternalPrimitiveTypeE.Boolean:
this.WriteBoolean(Convert.ToBoolean(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Byte:
this.WriteByte(Convert.ToByte(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Char:
this.WriteChar(Convert.ToChar(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Decimal:
this.WriteDecimal(Convert.ToDecimal(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Double:
this.WriteDouble(Convert.ToDouble(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Int16:
this.WriteInt16(Convert.ToInt16(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Int32:
this.WriteInt32(Convert.ToInt32(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Int64:
this.WriteInt64(Convert.ToInt64(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.SByte:
this.WriteSByte(Convert.ToSByte(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.Single:
this.WriteSingle(Convert.ToSingle(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.TimeSpan:
this.WriteTimeSpan((TimeSpan) value);
return;
case InternalPrimitiveTypeE.DateTime:
this.WriteDateTime((DateTime) value);
return;
case InternalPrimitiveTypeE.UInt16:
this.WriteUInt16(Convert.ToUInt16(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.UInt32:
this.WriteUInt32(Convert.ToUInt32(value, CultureInfo.InvariantCulture));
return;
case InternalPrimitiveTypeE.UInt64:
this.WriteUInt64(Convert.ToUInt64(value, CultureInfo.InvariantCulture));
return;
}
throw new SerializationException(Environment.GetResourceString("Serialization_TypeCode", new object[] { code.ToString() }));
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:66,代码来源:__BinaryWriter.cs
示例20: ToArrayType
internal static Type ToArrayType(InternalPrimitiveTypeE code)
{
if (s_arrayTypeA == null)
{
InitArrayTypeA();
}
return s_arrayTypeA[(int)code];
}
开发者ID:Corillian,项目名称:corefx,代码行数:8,代码来源:Converter.cs
注:本文中的InternalPrimitiveTypeE类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论