KGy SOFT

GettingFieldEventArgs Class

KGy SOFT Core Libraries Help
Provides arguments for the CustomSerializerSurrogateSelector.GettingField event.
Inheritance Hierarchy

SystemObject
  SystemEventArgs
    System.ComponentModelHandledEventArgs
      KGySoft.Serialization.BinaryGettingFieldEventArgs

Namespace:  KGySoft.Serialization.Binary
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0
Syntax

public class GettingFieldEventArgs : HandledEventArgs

The GettingFieldEventArgs type exposes the following members.

Properties

  NameDescription
Public propertyContext
Gets the context of this serialization.
Public propertyField
Gets the field whose value is about to be stored.
Public propertyHandled
Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
(Inherited from HandledEventArgs.)
Public propertyName
Gets or sets the name of the entry to be stored in the serialization stream.
Setting it to  will cause an ArgumentNullException from SerializationInfo.
To prevent storing any value make sure you set the Handled property to  to omit the default serialization logic.
Public propertyObject
Gets the object that is being serialized.
Public propertySerializationInfo
Gets the SerializationInfo of the of the Object being serialized. If you add the data manually make sure you set the Handled property to  to omit the default serialization logic.
Public propertyType
Gets or sets the Type to be stored in the serialization stream.
Setting  will cause an ArgumentNullException from SerializationInfo.
To prevent storing any value make sure you set the Handled property to  to omit the default serialization logic.
Public propertyValue
Gets or sets the value to be stored in the serialization stream.
To prevent storing any value make sure you set the Handled property to  to omit the default serialization logic.
Top
Methods

  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods

  NameDescription
Public Extension MethodConvert(Type, CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions.)
Public Extension MethodCode exampleConvertTTarget(CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)
Public Extension MethodIn (Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, CultureInfo, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(CultureInfo, TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Top
Remarks

The default value of the Handled property is , if the field is marked by NonSerializedAttribute and the value of IgnoreNonSerializedAttribute property is ; otherwise, .

You can set the Handled property to  to prevent saving the current field, or you can set it to  to force saving even non-serialized fields.

See Also

Reference