//Serializatoin counstructor. call when Deserialize function called.
 public CBahram_SALContainer(SerializationInfo info, StreamingContext context)
 {
     var1 = (int)info.GetValue("var1",typeof(int));
     var2 = (int)info.GetValue("var2",typeof(int));
     var3 = (int)info.GetValue("var3",typeof(int));
     var4 = (int)info.GetValue("var4",typeof(int));
 }
 // Method called to serialize a Vector3 object
 public void GetObjectData(System.Object obj, SerializationInfo info, StreamingContext context)
 {
     Color c = (Color) obj;
     info.AddValue("r", c.r);
     info.AddValue("g", c.g);
     info.AddValue("b", c.b);
 }
 public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
 {
     info.AddValue("object2PropertiesMappings", this.object2PropertiesMappings);
     info.AddValue("EZR_VERSION", EZR_VERSION);
     info.AddValue("recordingInterval", this.recordingInterval);
     //base.GetObjectData(info, context);
 }
Example #4
0
 void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
 {
     info.AddValue ("SourceID", SourceID, typeof(int));
     info.AddValue ("DestID", DestID, typeof(int));
     info.AddValue ("MessageType", Type, typeof(MessageType));
     info.AddValue ("SerializedContent", SerializedContent, typeof(byte[]));
 }
Example #5
0
 public Resource(SerializationInfo info, StreamingContext context)
     : base(1,(string) info.GetValue("type", typeof(string)), null, (string) info.GetValue("description", typeof(string)), null)
 {
     // Reset the property value using the GetValue method.
     tier = (int) info.GetValue("tier", typeof(int));
     use = (int) info.GetValue ("use", typeof(int));
 }
 //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[]));
 }
Example #7
0
 // Required by the ISerializable class to be properly serialized. This is called automatically
 public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
 {
     // Repeat this for each var defined in the Values section
     info.AddValue("boardWidth", (boardWidth));
     info.AddValue("boardHeight", boardHeight);
     info.AddValue("tiles", tiles);
 }
Example #8
0
		public void GetObjectData (SerializationInfo info, StreamingContext context) {
			info.AddValue ("a", a);
			if (s1 != null)
				info.AddValue ("s1", s1);
			else
				info.AddValue ("s1", "(null)");
		}
 public ProfileSaveData(SerializationInfo aInfo, StreamingContext aContext)
     : base()
 {
     m_Name = (string)aInfo.GetValue("Name", typeof(string));
     m_ProfileName = (string)aInfo.GetValue("ProfileName", typeof(string));
     m_ProgressionLevel = (int)aInfo.GetValue("ProgressionLevel", typeof(int));
 }
Example #10
0
 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)));
 }
Example #11
0
	public void GetObjectData(SerializationInfo info, StreamingContext context) {
		info.AddValue ("count", count);
		info.AddValue ("weaponCount", weapons.Count);
		for (int i = 0; i < weapons.Count; i++) {
			info.AddValue ("weaponCD_" + i, weapons [i].GetCooldown ());
		}
	}
 public SampledStroke(SerializationInfo info, StreamingContext ctxt)
 {
     beginning = info.GetInt32("beginning");
     str = (List<Dot>)info.GetValue("str", typeof(List<Dot>));
     positionX = 0;
     positionY = 0;
 }
Example #13
0
 // Required by the ISerializable class to be properly serialized. This is called automatically
 public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
 {
     // Repeat this for each var defined in the Values section
     info.AddValue("foundGem1", (foundGem1));
     info.AddValue("score", score);
     info.AddValue("levelReached", levelReached);
 }
 public void GetObjectData(System.Object obj, SerializationInfo info, StreamingContext context)
 {
     Vector3 v3 = (Vector3)obj;
     info.AddValue("x", v3.x);
     info.AddValue("y", v3.y);
     info.AddValue("z", v3.z);
 }
        public void SerializationInfoEnumerate()
        {
            var value = new Serializable();
            var si = new SerializationInfo(typeof(Serializable), new FormatterConverter());
            var sc = new StreamingContext();
            value.GetObjectData(si, sc);

            int items = 0;
            foreach (SerializationEntry entry in si)
            {
                items++;
                switch (entry.Name)
                {
                    case "int":
                        Assert.Equal(int.MaxValue, (int)entry.Value);
                        Assert.Equal(typeof(int), entry.ObjectType);
                        break;
                    case "string":
                        Assert.Equal("hello", (string)entry.Value);
                        Assert.Equal(typeof(string), entry.ObjectType);
                        break;
                    case "bool":
                        Assert.Equal(true, (bool)entry.Value);
                        Assert.Equal(typeof(bool), entry.ObjectType);
                        break;
                }
            }

            Assert.Equal(si.MemberCount, items);
        }
 private static bool Bug() {
 ObjectManager objmgr1;
 StreamingContext sc1;
 ObjectIDGenerator objid1;
 TestFixup tstfxp1;
 Int64 iRootID;
 Int64 iChildID;
 String strValue;
 MemberInfo[] members;
 Boolean fFirstTime;
 sc1 = new StreamingContext(StreamingContextStates.All);
 tstfxp1 = new TestFixup();
 strValue = "Hello World";
 objid1 = new ObjectIDGenerator();
 iRootID = objid1.GetId(tstfxp1, out fFirstTime);
 iChildID = objid1.GetId(strValue, out fFirstTime);
 members = FormatterServices.GetSerializableMembers(tstfxp1.GetType()); 
 objmgr1 = new ObjectManager(null, sc1);
 objmgr1.RecordFixup(iRootID, members[0], iChildID);
 try {
 objmgr1.RegisterObject(strValue, iChildID);	
 return true;
 } catch(Exception ex){
 Console.WriteLine("Bug:Exception thrown, " + ex);
 return false;
 }
 }
Example #17
0
	protected p4HelperConfig(SerializationInfo info, StreamingContext context) {
		string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
		if ((strSchema != null)) {
			DataSet ds = new DataSet();
			ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
			if ((ds.Tables["skipDirs"] != null)) {
				this.Tables.Add(new skipDirsDataTable(ds.Tables["skipDirs"]));
			}
			if ((ds.Tables["dir"] != null)) {
				this.Tables.Add(new dirDataTable(ds.Tables["dir"]));
			}
			if ((ds.Tables["skipNameParts"] != null)) {
				this.Tables.Add(new skipNamePartsDataTable(ds.Tables["skipNameParts"]));
			}
			if ((ds.Tables["part"] != null)) {
				this.Tables.Add(new partDataTable(ds.Tables["part"]));
			}
			this.DataSetName = ds.DataSetName;
			this.Prefix = ds.Prefix;
			this.Namespace = ds.Namespace;
			this.Locale = ds.Locale;
			this.CaseSensitive = ds.CaseSensitive;
			this.EnforceConstraints = ds.EnforceConstraints;
			this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
			this.InitVars();
		}
		else {
			this.InitClass();
		}
		this.GetSerializationData(info, context);
		System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
		this.Tables.CollectionChanged += schemaChangedHandler;
		this.Relations.CollectionChanged += schemaChangedHandler;
	}
Example #18
0
 //serialization constructor
 protected SerQuaternion(SerializationInfo info,StreamingContext context)
 {
     x = (float)info.GetValue("x",typeof(float));
     y = (float)info.GetValue("y",typeof(float));
     z = (float)info.GetValue("z",typeof(float));
     w = (float)info.GetValue("w",typeof(float));
 }
Example #19
0
 /*[SecurityPermissionAttribute(
             SecurityAction.Demand,
             SerializationFormatter = true)]		*/
 public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
 {
     info.AddValue("x", this.x);
     info.AddValue("y", this.y);
     info.AddValue("z", this.z);
     info.AddValue("w", this.w);
 }
Example #20
0
 public SaveData(SerializationInfo info, StreamingContext ctxt)
 {
     mapName = (string)info.GetValue ("mapName", typeof(string));
     playerLocation = (float[])info.GetValue ("playerLocation", typeof(float[]));
     activeQuests = (List<Quest>)info.GetValue ("activeQuests", typeof(List<Quest>));
     completedQuests = (List<Quest>)info.GetValue ("completedQuests", typeof(List<Quest>));
 }
Example #21
0
	// Serialization funciton.
	public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
	{
		// You can use any name/value pair, as long as you read them with the same names
		
		info.AddValue("Health", health);
		info.AddValue("Name", name);
	}
        public void SerializationInfoAddGet()
        {
            var value = new Serializable();
            var si = new SerializationInfo(typeof(Serializable), new FormatterConverter());
            var sc = new StreamingContext();
            value.GetObjectData(si, sc);

            Assert.Equal(typeof(Serializable), si.ObjectType);
            Assert.Equal(typeof(Serializable).FullName, si.FullTypeName);
            Assert.Equal(typeof(Serializable).GetTypeInfo().Assembly.FullName, si.AssemblyName);

            Assert.Equal(15, si.MemberCount);

            Assert.Equal(true, si.GetBoolean("bool"));
            Assert.Equal("hello", si.GetString("string"));
            Assert.Equal('a', si.GetChar("char"));

            Assert.Equal(byte.MaxValue, si.GetByte("byte"));

            Assert.Equal(decimal.MaxValue, si.GetDecimal("decimal"));
            Assert.Equal(double.MaxValue, si.GetDouble("double"));
            Assert.Equal(short.MaxValue, si.GetInt16("short"));
            Assert.Equal(int.MaxValue, si.GetInt32("int"));
            Assert.Equal(long.MaxValue, si.GetInt64("long"));
            Assert.Equal(sbyte.MaxValue, si.GetSByte("sbyte"));
            Assert.Equal(float.MaxValue, si.GetSingle("float"));
            Assert.Equal(ushort.MaxValue, si.GetUInt16("ushort"));
            Assert.Equal(uint.MaxValue, si.GetUInt32("uint"));
            Assert.Equal(ulong.MaxValue, si.GetUInt64("ulong"));
            Assert.Equal(DateTime.MaxValue, si.GetDateTime("datetime"));
        }
 // Required by the ISerializable class to be properly serialized. This is called automatically
 public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
 {
     // Repeat this for each var defined in the Values section
     info.AddValue("ConeUnlocked", (ConeUnlocked));
     info.AddValue("HiScore", HiScore);
     info.AddValue("ExplosivesLeft", ExplosivesLeft);
 }
Example #24
0
 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[]));
 }
Example #25
0
	public TransformationInfo(SerializationInfo info, StreamingContext ctxt)
	{
		Show = (bool)info.GetValue("Show", typeof(bool));
		Transformation = (SpriteAnimation.TransformationType)info.GetValue("Transformation", typeof(SpriteAnimation.TransformationType));
		NormalEasing = (EZAnimation.EASING_TYPE)info.GetValue("NormalEasing", typeof(EZAnimation.EASING_TYPE));
		ReverseEasing = (EZAnimation.EASING_TYPE)info.GetValue("ReverseEasing", typeof(EZAnimation.EASING_TYPE));
		TransformationKeyList = (List<TransformationKeyInfo>)info.GetValue("AnimationKeyList", typeof(List<TransformationKeyInfo>));
	}
Example #26
0
 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[]));
 }
 public void GetObjectData(System.Object obj, SerializationInfo info, StreamingContext context)
 {
     Quaternion q = (Quaternion)obj;
     info.AddValue ("x", q.x);
     info.AddValue ("y", q.y);
     info.AddValue ("z", q.z);
     info.AddValue ("w", q.w);
 }
Example #28
0
 public void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     info.AddValue("position", (sVector3)position);
     info.AddValue("rotation", (sVector3)rotation);
     info.AddValue("weaponMap", weaponMap);
     info.AddValue("augmentationMap", augmentationMap);
     info.AddValue("colors", colors);
 }
 public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
 {
     info.AddValue("ID", ID);
         info.AddValue("posx", s_x);
         info.AddValue("posy", s_y);
         info.AddValue("posz", s_z);
         info.AddValue("time", time);
 }
Example #30
0
	public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
	{	
		info.AddValue("Show", Show);
		info.AddValue("Transformation", Transformation);
		info.AddValue("NormalEasing", NormalEasing);
		info.AddValue("ReverseEasing", ReverseEasing);
		info.AddValue("AnimationKeyList", TransformationKeyList);
	}
Example #31
0
 protected MissingComponentException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
 }
Example #32
0
 protected MissingReferenceException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
 }
Example #33
0
 private void OnDeserializing(StreamingContext context)
 {
     _errors = new Dictionary <string, string>();
 }
 /// <summary>
 /// New error in the search for information by reflection.
 /// </summary>
 /// <param name="info">Serialization info.</param>
 /// <param name="context">Streaming context.</param>
 protected ReflectionEntityGateCoreException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
 }
 public TypeRegistrationException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
 }
Example #36
0
 private void OnDeserialized(StreamingContext streamingContext)
 {
 }
 protected RemoteMailboxLoadBalanceTransientException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
 }
Example #38
0
 private IdentityClaimsMissingOrInvalidException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
 }
Example #39
0
 private void OnDeserializedMethod(StreamingContext context)
 {
     m_propertyLock = new object();
 }
Example #40
0
		/// <summary>Private CTor for deserialization</summary>
		/// <param name="info"></param>
		/// <param name="context"></param>
		protected ProductDescriptionEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}
 protected BadImageFormatException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _fileName = info.GetString("BadImageFormat_FileName");
     _fusionLog = info.GetString("BadImageFormat_FusionLog");
 }
Example #42
0
 public EntregaControleException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
 }
        }                                                                                                 // 0x0000000180A708E0-0x0000000180A70970

        // Methods
        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
        }                                                                                               // 0x0000000180A70680-0x0000000180A70770
Example #44
0
 public IllegalOperandsException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
 }
Example #45
0
 public WindowsVersionDetectException(SerializationInfo info, StreamingContext context)
 {
 }
Example #46
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinqException"/> class
 /// with serialized data.
 /// </summary>
 /// <param name="info">The object that holds the serialized object data.</param>
 /// <param name="context">The contextual information about the source or destination.</param>
 /// <remarks>
 /// This constructor is called during deserialization to
 /// reconstitute the exception object transmitted over a stream.
 /// </remarks>
 protected LinqException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
 }
 internal void OnSerializedMethod(StreamingContext context)
 {
     SerializableStrokeList = null;
 }
Example #48
0
 /// <summary>
 /// Initializes a new instance of the EventSourceException class with serialized data.
 /// </summary>
 protected EventSourceException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
 }
 public override void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     base.GetObjectData(info, context);
 }
Example #50
0
 public PropertyBag(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
 }
Example #51
0
 private void OnSerializing(StreamingContext streamingContext)
 {
 }
 public override void GetObjectData
     (SerializationInfo info, StreamingContext context)
 {
     info.AddValue <Expression>("l", l);
     info.AddValue <Expression>("r", r);
 }
 public ConcatExpression(SerializationInfo info, StreamingContext context)
 {
     l = info.GetValue <Expression>("l");
     r = info.GetValue <Expression>("r");
 }
 public override void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     base.GetObjectData(info, context);
     info.AddValue("BadImageFormat_FileName", _fileName, typeof(string));
     info.AddValue("BadImageFormat_FusionLog", _fusionLog, typeof(string));
 }
Example #55
0
 /// <inheritdoc />
 public override void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     base.GetObjectData(info, context);
     info.AddValue(nameof(this.EventId), this.EventId);
 }
        }                                                                                            // 0x0000000180A70770-0x0000000180A70880

        internal TypeInitializationException(SerializationInfo info, StreamingContext context)
        {
        }                                                                                                 // 0x0000000180A708E0-0x0000000180A70970
Example #57
0
 object IObjectReference.GetRealObject(StreamingContext context)
 {
     return(FromKind(Kind));
 }
Example #58
0
 /// <summary>
 /// Initializes a new instance of the OrchestrationException class with serialized data.
 /// </summary>
 /// <param name="info">The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.</param>
 /// <param name="context">The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.</param>
 protected OrchestrationException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.EventId = info.GetInt32(nameof(this.EventId));
 }
Example #59
0
 protected RocketPackDefinitionCompilerException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
 }
Example #60
0
 public CustomSerializableException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
 }