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
public class Simple2Formatter;
Simple2Formatter | Constructor. |
MARKER1 | (not specified) | |
MARKER2 | (not specified) |
Deserialize | Deserialize a byte array into an object. | |
Equals | Determines whether the specified object is equal to the current object. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. | |
GetHashCode | Serves as the default hash function. | |
GetType | Gets the Type of the current instance. | |
MemberwiseClone | Creates a shallow copy of the current Object. | |
ReferenceEquals | Determines whether the specified Object instances are the same instance. | |
Serialize | Serialize an object. | |
ToString | Returns a string that represents the current object. |
See Also YetaWF.Core Overview
Documentation Feedback
© 2024 - Softel vdm, Inc. - YetaWF.com