Northwoods.GoWeb Assembly > Northwoods.GoWeb Namespace > GoView Class : GetObjectData Method |
'Declaration <SecurityCriticalAttribute()> Public Overridable Sub GetObjectData( _ ByVal info As SerializationInfo, _ ByVal context As StreamingContext _ )
[SecurityCriticalAttribute()] public virtual void GetObjectData( SerializationInfo info, StreamingContext context )
GoView
, you will need to override LoadView, GetObjectData, and define a deserialization constructor. When you override this method, be sure to call the base method, and make certain that all the same serialized information that you add to info you read again with the same name in your deserialization constructor:
[SecurityCritical] public override void LoadView(GoView saved) { base.LoadView(saved); MyView v = (MyView)saved; myClickCount = v.myClickCount; } protected MyView(SerializationInfo info, StreamingContext context) : base(info, context) { myClickCount = (int)info.GetValue("myClickCount", typeof(int)); } public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); info.AddValue("myClickCount", myClickCount); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2