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


C# SerializationInfo.GetInt32方法代码示例

本文整理汇总了C#中SerializationInfo.GetInt32方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetInt32方法的具体用法?C# SerializationInfo.GetInt32怎么用?C# SerializationInfo.GetInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SerializationInfo的用法示例。


在下文中一共展示了SerializationInfo.GetInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CChair_SALContainer

 //Serializatoin counstructor. call when Deserialize function called.
 private CChair_SALContainer(SerializationInfo info, StreamingContext context)
     : base(info,context)
 {
     var1 = info.GetInt32("var1");
     var2 = info.GetInt32("var2");
     str1 = (string[])info.GetValue("str1",typeof(string[]));
 }
开发者ID:AidinMolavy,项目名称:GrayMan-Prototype,代码行数:8,代码来源:CChair_SALContainer.cs

示例2: Message

 public Message(SerializationInfo info, StreamingContext context)
 {
     SourceID = info.GetInt32 ("SourceID");
     DestID = info.GetInt32 ("DestID");
     Type = (MessageType)info.GetByte ("MessageType");
     SerializedContent = (byte[])info.GetValue ("SerializedContent", typeof(byte[]));
 }
开发者ID:Samaed,项目名称:ChickenDodge,代码行数:7,代码来源:Message.cs

示例3: CUBEGridInfo

 public CUBEGridInfo(SerializationInfo info, StreamingContext context)
 {
     position = (sVector3)info.GetValue("position", typeof(sVector3));
     rotation = (sVector3)info.GetValue("rotation", typeof(sVector3));
     weaponMap = info.GetInt32("weaponMap");
     augmentationMap = info.GetInt32("augmentationMap");
     colors = (int[])info.GetValue("colors", typeof(int[]));
 }
开发者ID:syeager,项目名称:Space-CUBEs,代码行数:8,代码来源:CUBEGridInfo.cs

示例4: GameplayMessage

 public GameplayMessage(SerializationInfo info, StreamingContext context)
 {
     Message = (MessageValue)info.GetByte ("Message");
     PlayerID = info.GetInt32 ("PlayerID");
     MoveDelta = new Vector2((float)info.GetValue("x",typeof(float)),(float)info.GetValue("y",typeof(float)));
     OldPosition = new Vector3((float)info.GetValue("xloc", typeof(float)), (float)info.GetValue("yloc", typeof(float)), (float)info.GetValue("zloc", typeof(float)));
 }
开发者ID:Samaed,项目名称:ChickenDodge,代码行数:7,代码来源:GameplayMessage.cs

示例5: SampledStroke

 public SampledStroke(SerializationInfo info, StreamingContext ctxt)
 {
     beginning = info.GetInt32("beginning");
     str = (List<Dot>)info.GetValue("str", typeof(List<Dot>));
     positionX = 0;
     positionY = 0;
 }
开发者ID:TheAaltoWindrawTeam,项目名称:AaltoWindraw,代码行数:7,代码来源:SampledStroke.cs

示例6: RuntimeException

 /// <summary>
 /// Initializes a new instance of the RuntimeException class
 /// using data serialized via
 /// <see cref="ISerializable"/>
 /// </summary>
 /// <param name="info"> serialization information </param>
 /// <param name="context"> streaming context </param>
 /// <returns> constructed object </returns>
 protected RuntimeException(SerializationInfo info,
                    StreamingContext context)
         : base(info, context)
 {
     _errorId = info.GetString("ErrorId");
     _errorCategory = (ErrorCategory)info.GetInt32("ErrorCategory");
 }
开发者ID:40a,项目名称:PowerShell,代码行数:15,代码来源:RuntimeException.cs

示例7: ConfigurationException

	protected ConfigurationException(SerializationInfo info,
									 StreamingContext context)
			: base(info, context)
			{
				HResult = unchecked((int)0x80131902);
				this.filename = info.GetString("filename");
				this.line = info.GetInt32("line");
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:ConfigurationException.cs

示例8: GetHResult

	// Extract the HResult from an exception object.  We have to
	// do it this way because HResult is "protected".
	public static int GetHResult(Exception e)
			{
				SerializationInfo info =
					new SerializationInfo(typeof(Exception),
										  new FormatterConverter());
				StreamingContext context = new StreamingContext();
				e.GetObjectData(info, context);
				return info.GetInt32("HResult");
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:11,代码来源:ExceptionTester.cs

示例9: ConfigurationErrorsException

 protected ConfigurationErrorsException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     string filename = info.GetString("firstFilename");
     int line = info.GetInt32("firstLine");
     this.Init(filename, line);
     int num2 = info.GetInt32("count");
     if (num2 != 0)
     {
         this._errors = new ConfigurationException[num2];
         for (int i = 0; i < num2; i++)
         {
             string str2 = i.ToString(CultureInfo.InvariantCulture);
             Type type = Type.GetType(info.GetString(str2 + "_errors_type"), true);
             if ((type != typeof(ConfigurationException)) && (type != typeof(ConfigurationErrorsException)))
             {
                 throw ExceptionUtil.UnexpectedError("ConfigurationErrorsException");
             }
             this._errors[i] = (ConfigurationException) info.GetValue(str2 + "_errors", type);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:21,代码来源:ConfigurationErrorsException.cs

示例10: DeserializeDataSetSchema

 private void DeserializeDataSetSchema(SerializationInfo info, StreamingContext context, SerializationFormat remotingFormat, System.Data.SchemaSerializationMode schemaSerializationMode)
 {
     if (remotingFormat != SerializationFormat.Xml)
     {
         if (schemaSerializationMode == System.Data.SchemaSerializationMode.IncludeSchema)
         {
             this.DeserializeDataSetProperties(info, context);
             int num4 = info.GetInt32("DataSet.Tables.Count");
             for (int i = 0; i < num4; i++)
             {
                 byte[] buffer = (byte[]) info.GetValue(string.Format(CultureInfo.InvariantCulture, "DataSet.Tables_{0}", new object[] { i }), typeof(byte[]));
                 MemoryStream serializationStream = new MemoryStream(buffer) {
                     Position = 0L
                 };
                 BinaryFormatter formatter = new BinaryFormatter(null, new StreamingContext(context.State, false));
                 DataTable table = (DataTable) formatter.Deserialize(serializationStream);
                 this.Tables.Add(table);
             }
             for (int j = 0; j < num4; j++)
             {
                 this.Tables[j].DeserializeConstraints(info, context, j, true);
             }
             this.DeserializeRelations(info, context);
             for (int k = 0; k < num4; k++)
             {
                 this.Tables[k].DeserializeExpressionColumns(info, context, k);
             }
         }
         else
         {
             this.DeserializeDataSetProperties(info, context);
         }
     }
     else
     {
         string s = (string) info.GetValue("XmlSchema", typeof(string));
         if (s != null)
         {
             this.ReadXmlSchema(new XmlTextReader(new StringReader(s)), true);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:42,代码来源:DataSet.cs

示例11: PhpException

		/// <summary>
		/// Initializes a new instance of the PhpException class with serialized data. This constructor is used
		/// when an exception is thrown in a remotely called method. Such an exceptions needs to be serialized,
		/// transferred back to the caller and then rethrown using this constructor.
		/// </summary>
		/// <param name="info">The SerializationInfo that holds the serialized object data about the exception 
		/// being thrown.</param>
		/// <param name="context">The StreamingContext that contains contextual information about the source or 
		/// destination.</param>
		protected PhpException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
			this.error = (PhpError)info.GetValue("error", typeof(PhpError));
			this.info = new ErrorStackInfo(
			  (string)info.GetString("file"),
              (string)info.GetString("caller"),
              (int)info.GetInt32("line"),
			  (int)info.GetInt32("column"),
			  (bool)info.GetBoolean("libraryCaller"));
		}
开发者ID:jdluzen,项目名称:Phalanger,代码行数:20,代码来源:Errors.cs

示例12: HttpException

 /// <devdoc>
 ///    <para> Contructor used for derialization.</para>
 /// </devdoc>
 protected HttpException(SerializationInfo info, StreamingContext context)
    :base(info, context) {
    _httpCode = info.GetInt32("_httpCode");
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:HttpException.cs

示例13: HttpParseException

  private HttpParseException(SerializationInfo info, StreamingContext context)
     :base(info, context) {
      _virtualPath = (VirtualPath)info.GetValue("_virtualPath", typeof(VirtualPath));
     _line = info.GetInt32("_line");
     _parserErrors = (ParserErrorCollection)info.GetValue("_parserErrors", typeof(ParserErrorCollection));
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:6,代码来源:HttpException.cs

示例14: V_I

	private V_I(SerializationInfo info, StreamingContext context){
		i = info.GetInt32("IntValue");
	}
开发者ID:ArildF,项目名称:masters,代码行数:3,代码来源:co8648soapformatter.cs

示例15: DeserializeDataSetSchema

        //      Deserialize schema.
        private void DeserializeDataSetSchema(SerializationInfo info, StreamingContext context, SerializationFormat remotingFormat, SchemaSerializationMode schemaSerializationMode) {
            if (remotingFormat != SerializationFormat.Xml) {
                if (schemaSerializationMode == SchemaSerializationMode.IncludeSchema) {
                    //DataSet public state properties
                    DeserializeDataSetProperties(info, context);

                    //Tables Count
                    int tableCount = info.GetInt32("DataSet.Tables.Count");

                    //Tables, Columns, Rows
                    for (int i = 0; i < tableCount; i++) {
                        Byte[] buffer = (Byte[])info.GetValue(String.Format(CultureInfo.InvariantCulture, "DataSet.Tables_{0}", i), typeof(Byte[]));
                        MemoryStream memStream = new MemoryStream(buffer);
                        memStream.Position = 0;
                        BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false));
                        DataTable dt = (DataTable)bf.Deserialize(memStream);
                        Tables.Add(dt);
                    }

                    //Constraints
                    for (int i = 0; i < tableCount; i++) {
                        Tables[i].DeserializeConstraints(info, context,  /* table index */i,  /* serialize all constraints */ true); //
                    }

                    //Relations
                    DeserializeRelations(info, context);

                    //Expression Columns
                    for (int i = 0; i < tableCount; i++) {
                        Tables[i].DeserializeExpressionColumns(info, context, i);
                    }
                } else {
                    //DeSerialize DataSet public properties.[Locale, CaseSensitive and EnforceConstraints]
                    DeserializeDataSetProperties(info, context);
                }
            } else {
                string strSchema = (String)info.GetValue(KEY_XMLSCHEMA, typeof(System.String));

                if (strSchema != null) {
                    this.ReadXmlSchema(new XmlTextReader(new StringReader(strSchema)), true);
                }
            }
        }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:44,代码来源:DataSet.cs


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