本文整理汇总了C#中System.Runtime.Serialization.SerializationInfo.GetInt32方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetInt32方法的具体用法?C# SerializationInfo.GetInt32怎么用?C# SerializationInfo.GetInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Runtime.Serialization.SerializationInfo
的用法示例。
在下文中一共展示了SerializationInfo.GetInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DocumentException
protected DocumentException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Line = info.GetInt32(nameof(Line));
Column = info.GetInt32(nameof(Column));
File = info.GetString(nameof(File));
}
示例2: SyntaxErrorException
/// <summary>
/// TODO
/// </summary>
protected SyntaxErrorException(SerializationInfo info, StreamingContext context)
: base(info.GetString("Message"))
{
Line = info.GetInt32("Line");
Column = info.GetInt32("Column");
_expression = info.GetString("Expression");
}
示例3: VideoFile
private VideoFile(SerializationInfo info, DeserializeInfo di)
: this(di.Server, di.Info, di.Type)
{
actors = info.GetValue("a", typeof(string[])) as string[];
description = info.GetString("de");
director = info.GetString("di");
genre = info.GetString("g");
title = info.GetString("t");
try {
width = info.GetInt32("w");
height = info.GetInt32("h");
}
catch (Exception) {
}
var ts = info.GetInt64("du");
if (ts > 0) {
duration = new TimeSpan(ts);
}
try {
bookmark = info.GetInt64("b");
}
catch (Exception) {
bookmark = 0;
}
try {
subTitle = info.GetValue("st", typeof(Subtitle)) as Subtitle;
}
catch (Exception) {
subTitle = null;
}
initialized = true;
}
示例4: GameStateMachine
GameStateMachine(SerializationInfo info, StreamingContext unused)
{
MinTurns = info.GetInt32 ("MinTurns");
MaxTurns = info.GetInt32 ("MaxTurns");
MaxTurnsThisLevel = info.GetInt32 ("maxTurnsThisLevel");
NumTurnsThisLevel = info.GetInt32 ("numTurnsThisLevel");
}
示例5: AudioConfig
public AudioConfig(SerializationInfo serializationInfo_0, StreamingContext streamingContext_0)
{
int @int = serializationInfo_0.GetInt32("Format.Rate");
int int2 = serializationInfo_0.GetInt32("Format.Bits");
int int3 = serializationInfo_0.GetInt32("Format.Channels");
this.m_Format = new WaveFormat(@int, int2, int3);
}
示例6: EMParsingErrorException
protected EMParsingErrorException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Path = info.GetString("Path");
Line = info.GetInt32("Line");
Column = info.GetInt32("Column");
}
示例7: XmlException
protected XmlException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
HResult = unchecked((int)0x80131940);
lineNumber = info.GetInt32("lineNumber");
linePosition = info.GetInt32("linePosition");
}
示例8: ImageProcessingResult
public ImageProcessingResult(SerializationInfo info, StreamingContext context)
{
Key = info.GetString("Key");
Result = (ResultType)info.GetInt32("Result");
ZoomLevel = info.GetInt32("ZoomLevel");
TileSize = info.GetInt32("TileSize");
}
示例9: InvalidSqlException
protected InvalidSqlException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Input = info.GetString(InputNameKey);
Row = info.GetInt32(RowNameKey);
Column = info.GetInt32(ColumnNameKey);
}
示例10: Block
public Block(SerializationInfo info, StreamingContext context)
{
// built-in value
_bits = info.GetUInt32("built-int");
// cutom bits
_customBits = new uint[info.GetUInt16("cBitCount")];
int length = _customBits.Length;
for (int i = 0; i < length; i++)
{
_customBits[i] = info.GetUInt32("cBit" + i);
}
// custom floats
length = info.GetUInt16("cFloatCount");
_customFloats = new ConcurrentDictionary<int, float>(3, length * 2);
for (int i = 0; i < length; i++)
{
_customFloats[info.GetInt32("cFloatKey" + i)] = info.GetSingle("cFloatValue" + i);
}
// custom strings
length = info.GetUInt16("cStringCount");
_customStrings = new ConcurrentDictionary<int, string>(3, length * 2);
for (int i = 0; i < length; i++)
{
_customStrings[info.GetInt32("cStringKey" + i)] = info.GetString("cStringValue" + i);
}
}
示例11: AudioWriterConfig
/// <summary>
/// A constructor with this signature must be implemented by descendants.
/// <see cref="System.Runtime.Serialization.ISerializable"/> for more information
/// </summary>
/// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> where is the serialized data.</param>
/// <param name="context">The source (see <see cref="System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
protected AudioWriterConfig(SerializationInfo info, StreamingContext context)
{
int rate = info.GetInt32("Format.Rate");
int bits = info.GetInt32("Format.Bits");
int channels = info.GetInt32("Format.Channels");
m_Format = new WaveFormat(rate, bits, channels);
}
示例12: UnitySerializationHolder
internal UnitySerializationHolder(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException("info");
}
this.m_unityType = info.GetInt32("UnityType");
if (this.m_unityType != 3)
{
if (this.m_unityType == 7)
{
this.m_declaringMethod = info.GetValue("DeclaringMethod", typeof(MethodBase)) as MethodBase;
this.m_declaringType = info.GetValue("DeclaringType", typeof(Type)) as Type;
this.m_genericParameterPosition = info.GetInt32("GenericParameterPosition");
this.m_elementTypes = info.GetValue("ElementTypes", typeof(int[])) as int[];
}
else
{
if (this.m_unityType == 8)
{
this.m_instantiation = info.GetValue("GenericArguments", typeof(Type[])) as Type[];
this.m_elementTypes = info.GetValue("ElementTypes", typeof(int[])) as int[];
}
this.m_data = info.GetString("Data");
this.m_assemblyName = info.GetString("AssemblyName");
}
}
}
示例13: Key
private Key(SerializationInfo info, StreamingContext context)
{
KeyDownStrokes = new List<KeyStroke>();
KeyUpStrokes = new List<KeyStroke>();
//int version = info.GetInt32("Version");
Name = info.GetString("keyName");
InfoWindowsKeys = info.GetString("InfoWindowsKeys");
int totalKeyDown = info.GetInt32("TotalKeyDown");
for (int i = 0; i < totalKeyDown; i++)
{
var ks = new KeyStroke();
ks.code = info.GetUInt16("kd_c_" + i);
ks.information = info.GetUInt32("kd_i_" + i);
ks.state = (Keyboard.States)info.GetUInt16("kd_s_" + i);
KeyDownStrokes.Add(ks);
}
int totalKeyUp = info.GetInt32("TotalKeyUp");
for (int i = 0; i < totalKeyUp; i++)
{
var ks = new KeyStroke();
ks.code = info.GetUInt16("ku_c_" + i);
ks.information = info.GetUInt32("ku_i_" + i);
ks.state = (Keyboard.States)info.GetUInt16("ku_s_" + i);
KeyUpStrokes.Add(ks);
}
}
示例14: CmdLineException
protected CmdLineException(SerializationInfo s, StreamingContext c) : base(s, c) {
this.errorCode = (CmdLineError)s.GetInt32("ErrorCode");
this.context = s.GetString("Context");
int lcid = s.GetInt32("LCID");
if (lcid != LOCALE_USER_DEFAULT)
this.culture = new CultureInfo(lcid);
}
示例15: NewPortCommand
protected NewPortCommand(SerializationInfo info, StreamingContext context)
: base(info, context)
{
_entityId = MathIdentifier.Parse(info.GetString("entityId"));
_inputCnt = info.GetInt32("inputCount");
_busCnt = info.GetInt32("busCount");
}