C# (CSharp) SimpleFramework.Xml.Strategy Namespace

Classes

Name Description
Allocate The Allocate object is used to represent an entity that has not yet been created and needs to be allocated to the the object graph. This is given a map that contains each node in the graph keyed via a unique identifier. When an instance is created and set then it is added to the object graph.
ArrayCycleTest
ArrayCycleTest.ArrayCycleExample
ArrayCycleTest.ElementValue
ArrayCycleTest.Entry
ArrayCycleTest.NestedArrayCycleExample
ArrayCycleTest.TextValue
ArrayCycleTest.Value
ArrayValue The ArrayValue object is a value used for describing arrays for a specified component type object. This provides the component type for the array as well as the length of the array, which allows the deserialization process to build a suitable length array from the criteria taken from the XML element.
ClassToNamespaceVisitor
CommentTest
CommentTest.Comment
CommentTest.CommentExample
CommentTest.CommentVisitor
CycleException The CycleException is thrown when an invalid cycle is found when deserializing an object from an XML document. This usually indicates the either the XML has been edited incorrectly or has been corrupted. Conditions that this exception is thrown are when there is an invalid reference or a duplicate identifier.
CycleStrategyTest
CycleStrategyTest.Entry
CycleTest
CycleTest.CycleExample
CycleTest.Entry
ListCycleTest
ListCycleTest.Entry
ListCycleTest.InlineListExample
ListCycleTest.InlinePrimitiveListExample
ListCycleTest.ListExample
ListCycleTest.NestedListExample
ListCycleTest.Value
Loader The Loader object is used to provide class loading for the strategies. This will attempt to load the class using the thread context class loader, if this loader is set it will be used to load the class. If not then the class will be loaded using the caller class loader. Loading in this way ensures that a custom loader can be provided using the current thread.
ObjectValue The ObjectValue is an implementation of a value that represents a object other than an array. Objects described by this can be instantiated and set in to the internal graph so that they can be later retrieved.
PackageParser
PackageParser.Convert
PrimitiveCycleTest
PrimitiveCycleTest.IntegerReferenceExample
PrimitiveCycleTest.ObjectEntry
PrimitiveCycleTest.PrimitiveCycleEntry
PrimitiveCycleTest.PrimitiveEntry
PrimitiveCycleTest.StringReferenceExample
ReadGraph The ReadGraph object is used to build a graph of the objects that have been deserialized from the XML document. This is required so that cycles in the object graph can be recreated such that the deserialized object is an exact duplicate of the object that was serialized. Objects are stored in the graph using unique keys, which for this implementation are unique strings.
Reference The Reference object represents an object that is used to provide a reference to an already instantiated value. This is what is used if there is a cycle in the object graph. The getValue method of this object will simply return the object instance that was previously created.
TreeStrategyTest
TreeStrategyTest.ChildEntry
TreeStrategyTest.ElementEntry
TreeStrategyTest.EmptyFilter
TreeStrategyTest.GrandChildEntry
TreeStrategyTest.RootEntry
VisitorStrategy The VisitorStrategy object is a simplification of a strategy, which allows manipulation of the serialization process. Typically implementing a Strategy is impractical as it requires the implementation to determine the type a node represents. Instead it is often easier to visit each node that is being serialized or deserialized and manipulate it so that the resulting XML can be customized.

To perform customization in this way a Visitor can be implemented. This can be passed to this strategy which will ensure the visitor is given each XML element as it is either being serialized or deserialized. Such an inversion of control allows the nodes to be manipulated with little effort. By default this used TreeStrategy object as a default strategy to delegate to. However, any strategy can be used.