4 [global::__DynamicallyInvokable]
7 private TypeScope scope;
9 private bool generateSerializer;
13 private ElementAccessor accessor;
21 internal ElementAccessor Accessor => accessor;
23 internal TypeScope Scope => scope;
27 [global::__DynamicallyInvokable]
30 [global::__DynamicallyInvokable]
39 [global::__DynamicallyInvokable]
42 [global::__DynamicallyInvokable]
51 [global::__DynamicallyInvokable]
54 [global::__DynamicallyInvokable]
57 return accessor.Namespace;
61 internal bool GenerateSerializer
65 return generateSerializer;
69 generateSerializer = value;
89 internal string Key => key;
91 internal XmlMapping(TypeScope scope, ElementAccessor accessor)
96 internal XmlMapping(TypeScope scope, ElementAccessor accessor,
XmlMappingAccess access)
99 this.accessor = accessor;
100 this.access = access;
101 shallow = (scope ==
null);
106 [global::__DynamicallyInvokable]
112 internal void SetKeyInternal(
string key)
117 internal static string GenerateKey(
Type type, XmlRootAttribute root,
string ns)
121 root = (XmlRootAttribute)XmlAttributes.GetAttr(type, typeof(XmlRootAttribute));
123 return type.
FullName +
":" + ((root ==
null) ?
string.Empty : root.Key) +
":" + ((ns ==
null) ?
string.Empty : ns);
126 internal void CheckShallow()
130 throw new InvalidOperationException(Res.GetString(
"XmlMelformMapping"));
134 internal static bool IsShallow(XmlMapping[] mappings)
136 for (
int i = 0; i < mappings.Length; i++)
138 if (mappings[i] ==
null || mappings[i].shallow)
string Namespace
Gets the namespace of the mapped element.
abstract string FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
XmlMappingAccess
Specifies whether a mapping is read, write, or both.
Supports mappings between .NET Framework types and XML Schema data types.
Read methods are generated.
Represents type declarations: class types, interface types, array types, value types,...
Write methods are generated.
string ElementName
Get the name of the mapped element.
void SetKey(string key)
Sets the key used to look up the mapping.
string XsdElementName
Gets the name of the XSD element of the mapping.