Hide

YetaWF.Core Package Documentation

Display
Print

YetaWF.Core.Serializers.Simple2Formatter Class

Serializes an object to a byte array.

This should only be used with small-ish objects as they're entirely in memory.

This tolerates version changes to a certain extent (new/deleted properties are not a problem).

It's a shame that .Net makes it so hard to get at raw data. There is a significant performance hit to serialization/deserialization. Purists will not like this approach, but this only has to work within the YetaWF framework. Lists and dictionaries could probably be optimized further (this is going to be a never ending task). The use of (cached) reflection is not really helping (except that it's cached). Don't serialize/deserialize if you can avoid it.

Namespace: YetaWF.Core.Serializers
Assembly: YetaWF.Core

Inheritance

Syntax

public class Simple2Formatter;

Constructors

PublicSimple2FormatterConstructor.

Fields

PublicStaticMARKER1(not specified)
PublicStaticMARKER2(not specified)

Methods

PublicDeserializeDeserialize a byte array into an object.
PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicInherited from System.ObjectGetHashCodeServes as the default hash function.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicSerializeSerialize an object.
PublicInherited from System.ObjectToStringReturns a string that represents the current object.

See Also YetaWF.Core Overview