當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。