当前位置: 首页>>代码示例>>C#>>正文


C# SerializationInfo.GetInt32方法代码示例

本文整理汇总了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));
 }
开发者ID:dotnet,项目名称:docfx,代码行数:7,代码来源:DocumentException.cs

示例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");
 }
开发者ID:kog,项目名称:Solenoid-Expressions,代码行数:10,代码来源:SyntaxErrorException.cs

示例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;
 }
开发者ID:vitska,项目名称:simpleDLNA,代码行数:32,代码来源:VideoFile.cs

示例4: GameStateMachine

 GameStateMachine(SerializationInfo info, StreamingContext unused)
 {
     MinTurns = info.GetInt32 ("MinTurns");
     MaxTurns = info.GetInt32 ("MaxTurns");
     MaxTurnsThisLevel = info.GetInt32 ("maxTurnsThisLevel");
     NumTurnsThisLevel = info.GetInt32 ("numTurnsThisLevel");
 }
开发者ID:nicole8862,项目名称:unity3d-dupe7,代码行数:7,代码来源:GameStateMachine.cs

示例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);
 }
开发者ID:ExileLord,项目名称:Open-GHTCP,代码行数:7,代码来源:AudioConfig.cs

示例6: EMParsingErrorException

 protected EMParsingErrorException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     Path = info.GetString("Path");
     Line = info.GetInt32("Line");
     Column = info.GetInt32("Column");
 }
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:7,代码来源:EMParsingErrorException.cs

示例7: XmlException

	protected XmlException(SerializationInfo info, StreamingContext context)
		: base(info, context)
		{
			HResult = unchecked((int)0x80131940);
			lineNumber = info.GetInt32("lineNumber");
			linePosition = info.GetInt32("linePosition");
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:XmlException.cs

示例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");
 }
开发者ID:trevorpower,项目名称:tadmap,代码行数:7,代码来源:ImageProcessingResult.cs

示例9: InvalidSqlException

 protected InvalidSqlException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     Input = info.GetString(InputNameKey);
     Row = info.GetInt32(RowNameKey);
     Column = info.GetInt32(ColumnNameKey);
 }
开发者ID:realistschuckle,项目名称:sqlcop,代码行数:7,代码来源:InvalidSqlException.cs

示例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);
            }
        }
开发者ID:renezaal,项目名称:dfLike,代码行数:28,代码来源:Block.cs

示例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);
 }
开发者ID:pclancy,项目名称:yeti,代码行数:13,代码来源:AudioWriterConfig.cs

示例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");
         }
     }
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:28,代码来源:UnitySerializationHolder.cs

示例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);
            }

        }
开发者ID:thitiboy,项目名称:low-level-sendkeys,代码行数:34,代码来源:Key.cs

示例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);
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:7,代码来源:cmdlineexception.cs

示例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");
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:NewPortCommand.cs


注:本文中的System.Runtime.Serialization.SerializationInfo.GetInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。