Class XamlSerializer
Inheritance
Namespace: Telerik.Windows.Documents.Xaml
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public class XamlSerializer : Object
Constructors
XamlSerializer()
Declaration
public XamlSerializer()
Fields
AttachedProperties
Declaration
protected Dictionary<Type, List<XamlSerializer.AttachedProperty>> AttachedProperties
Field Value
System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.List<XamlSerializer.AttachedProperty>>
|
BuiltIn
Declaration
protected static readonly TypeConverter BuiltIn
Field Value
System.ComponentModel.TypeConverter
|
DiscoveredTypes
Declaration
protected HashSet<Type> DiscoveredTypes
Field Value
System.Collections.Generic.HashSet<System.Type>
|
PropEquals
Declaration
protected static readonly IEqualityComparer<PropertyInfo> PropEquals
Field Value
System.Collections.Generic.IEqualityComparer<System.Reflection.PropertyInfo>
|
PropertiesToSkip
Declaration
protected HashSet<PropertyInfo> PropertiesToSkip
Field Value
System.Collections.Generic.HashSet<System.Reflection.PropertyInfo>
|
RefEquals
Declaration
protected static readonly IEqualityComparer<object> RefEquals
Field Value
System.Collections.Generic.IEqualityComparer<System.Object>
|
TypeConverters
Declaration
protected IDictionary<Type, TypeConverter> TypeConverters
Field Value
System.Collections.Generic.IDictionary<System.Type, System.ComponentModel.TypeConverter>
|
XamlNamespace
Declaration
public const string XamlNamespace = "http://schemas.microsoft.com/winfx/2006/xaml"
Field Value
System.String
|
Methods
CanWriteObject(Object, HashSet<Object>)
Declaration
protected virtual bool CanWriteObject(object obj, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
Returns
System.Boolean
|
CanWriteProperty(PropertyInfo)
Declaration
protected bool CanWriteProperty(PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo
propertyInfo
|
Returns
System.Boolean
|
DiscoverAttachedProperties(Assembly)
Declaration
public void DiscoverAttachedProperties(Assembly asm)
Parameters
System.Reflection.Assembly
asm
|
DiscoverAttachedProperties(Type)
Declaration
public void DiscoverAttachedProperties(Type type)
Parameters
System.Type
type
|
GetAttachedOrder(XamlSerializer.AttachedProperty)
Declaration
protected virtual string GetAttachedOrder(XamlSerializer.AttachedProperty attachedProperty)
Parameters
XamlSerializer.AttachedProperty
attachedProperty
|
Returns
System.String
|
GetAttachedProperties(Type)
Declaration
protected IEnumerable<XamlSerializer.AttachedProperty> GetAttachedProperties(Type type)
Parameters
System.Type
type
|
Returns
System.Collections.Generic.IEnumerable<XamlSerializer.AttachedProperty>
|
GetContentProperty(Object)
Declaration
protected PropertyInfo GetContentProperty(object obj)
Parameters
System.Object
obj
|
Returns
System.Reflection.PropertyInfo
|
GetNamespace(Type, IDictionary<String, String>)
Declaration
protected string GetNamespace(Type type, IDictionary<string, string> prefixMappings)
Parameters
System.Type
type
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
Returns
System.String
|
GetPrefix(String, IDictionary<String, String>, XmlWriter)
Declaration
protected virtual string GetPrefix(string ns, IDictionary<string, string> prefixMappings, XmlWriter writer)
Parameters
System.String
ns
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Xml.XmlWriter
writer
|
Returns
System.String
|
GetPropertyGetter(PropertyInfo)
Declaration
protected static Func<object, object> GetPropertyGetter(PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo
propertyInfo
|
Returns
System.Func<System.Object, System.Object>
|
GetPropertyOrder(PropertyInfo)
Declaration
protected virtual string GetPropertyOrder(PropertyInfo prop)
Parameters
System.Reflection.PropertyInfo
prop
|
Returns
System.String
|
GetTypeConverter(MemberInfo)
Declaration
protected TypeConverter GetTypeConverter(MemberInfo memberInfo)
Parameters
System.Reflection.MemberInfo
memberInfo
|
Returns
System.ComponentModel.TypeConverter
|
GetXmlWriter(StringBuilder)
Declaration
protected virtual XmlWriter GetXmlWriter(StringBuilder output)
Parameters
System.Text.StringBuilder
output
|
Returns
System.Xml.XmlWriter
|
IsDictionary(Type)
Declaration
protected static bool IsDictionary(Type type)
Parameters
System.Type
type
|
Returns
System.Boolean
|
IsInlinable(Object, Object, MemberInfo, HashSet<Object>)
Declaration
protected virtual bool IsInlinable(object obj, object propValue, MemberInfo memberInfo, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Object
propValue
|
System.Reflection.MemberInfo
memberInfo
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
Returns
System.Boolean
|
IsInlineAttachedProperty(Object, Object, MethodInfo, HashSet<Object>)
Declaration
protected bool IsInlineAttachedProperty(object obj, object propValue, MethodInfo methodInfo, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Object
propValue
|
System.Reflection.MethodInfo
methodInfo
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
Returns
System.Boolean
|
IsInlineProperty(Object, Object, PropertyInfo, HashSet<Object>)
Declaration
protected bool IsInlineProperty(object obj, object propValue, PropertyInfo prop, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Object
propValue
|
System.Reflection.PropertyInfo
prop
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
Returns
System.Boolean
|
IsList(Type)
Declaration
protected static bool IsList(Type type)
Parameters
System.Type
type
|
Returns
System.Boolean
|
IsUnique(Object, HashSet<Object>)
Declaration
protected bool IsUnique(object obj, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
Returns
System.Boolean
|
PostSerialize(Object, ref String)
Declaration
protected virtual void PostSerialize(object obj, ref string value)
Parameters
System.Object
obj
|
System.String
value
|
PreSerialize(Object, Dictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void PreSerialize(object obj, Dictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Collections.Generic.Dictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
RegisterAttachedProperty(MethodInfo, MethodInfo)
Declaration
public bool RegisterAttachedProperty(MethodInfo getter, MethodInfo setter)
Parameters
System.Reflection.MethodInfo
getter
|
System.Reflection.MethodInfo
setter
|
Returns
System.Boolean
|
ShouldSerialize(Object, Object, PropertyInfo)
Declaration
protected virtual bool ShouldSerialize(object obj, object propValue, PropertyInfo prop)
Parameters
System.Object
obj
|
System.Object
propValue
|
System.Reflection.PropertyInfo
prop
|
Returns
System.Boolean
|
VisitAfterAttributes(Object, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitAfterAttributes(object obj, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitAfterBeginElement(Object, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitAfterBeginElement(object obj, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitAlternateContent(Object, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitAlternateContent(object obj, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitAttachedProperty(Object, Object, String, MethodInfo, MethodInfo, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitAttachedProperty(object obj, object propValue, string propertyName, MethodInfo getter, MethodInfo setter, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Object
propValue
|
System.String
propertyName
|
System.Reflection.MethodInfo
getter
|
System.Reflection.MethodInfo
setter
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitBeforeEndElement(Object, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitBeforeEndElement(object obj, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitCollectionContents(IEnumerable, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitCollectionContents(IEnumerable collection, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Collections.IEnumerable
collection
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitDictionaryContents(IDictionary, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitDictionaryContents(IDictionary dictionary, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Collections.IDictionary
dictionary
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitKey(Object, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitKey(object key, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
key
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitObject(Object, XmlWriter, IDictionary<String, String>, HashSet<Object>, Boolean, Object)
Declaration
protected virtual void VisitObject(object obj, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects, bool isRoot = false, object key = null)
Parameters
System.Object
obj
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
System.Boolean
isRoot
|
System.Object
key
|
VisitProperty(Object, Object, PropertyInfo, Boolean, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitProperty(object obj, object propValue, PropertyInfo prop, bool isContentProperty, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Object
propValue
|
System.Reflection.PropertyInfo
prop
|
System.Boolean
isContentProperty
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|
VisitRootAttribute(Object, XmlWriter, IDictionary<String, String>, HashSet<Object>)
Declaration
protected virtual void VisitRootAttribute(object obj, XmlWriter writer, IDictionary<string, string> prefixMappings, HashSet<object> cycleCheckObjects)
Parameters
System.Object
obj
|
System.Xml.XmlWriter
writer
|
System.Collections.Generic.IDictionary<System.String, System.String>
prefixMappings
|
System.Collections.Generic.HashSet<System.Object>
cycleCheckObjects
|