We need you! We're working hard on the next version of Developer Fusion -
Let us know what you think we should be up to!
-
Expand
Microsoft.Win32
-
Expand
Microsoft.Win32.SafeHandles
-
Expand
System
-
Expand
System.Runtime.Hosting
-
Expand
System.Runtime.InteropServices
-
Expand
System.Runtime.CompilerServices
-
Expand
System.Collections
-
Expand
System.Collections.Generic
-
Expand
System.Collections.ObjectModel
-
Expand
System.Configuration.Assemblies
-
Expand
System.Diagnostics
-
Expand
System.Diagnostics.CodeAnalysis
-
Expand
System.Diagnostics.SymbolStore
-
Expand
System.Globalization
-
Expand
System.IO
-
Expand
System.IO.IsolatedStorage
-
Expand
System.Reflection
-
Expand
System.Reflection.Cache
-
Expand
System.Reflection.Emit
-
Expand
System.Resources
-
Expand
System.Runtime
-
Expand
System.Runtime.InteropServices.Expando
-
Expand
System.Runtime.ConstrainedExecution
-
Expand
System.Runtime.Remoting.Activation
-
Expand
System.Runtime.Remoting.Messaging
-
Expand
System.Runtime.Remoting.Channels
-
Expand
System.Runtime.Remoting.Lifetime
-
Expand
System.Runtime.Remoting
-
Expand
System.Runtime.Remoting.Contexts
-
Expand
System.Runtime.Remoting.Proxies
-
Expand
System.Runtime.Remoting.Metadata
-
Expand
System.Runtime.Remoting.Metadata.W3cXsd2001
-
Expand
System.Runtime.Remoting.Services
-
Expand
System.Runtime.Serialization
-
Expand
System.Runtime.Serialization.Formatters
-
Expand
System.Runtime.Serialization.Formatters.Binary
-
Expand
System.Runtime.Versioning
-
Expand
System.Security
-
Expand
System.Security.Cryptography
-
Expand
System.Security.Cryptography.X509Certificates
-
Expand
System.Security.Permissions
-
Expand
System.Security.Policy
-
Expand
System.Security.Principal
-
Expand
System.Security.Util
-
Expand
System.Text
-
Expand
System.Threading
-
Expand
System.Runtime.Remoting.Channels.Http
-
Expand
System.Runtime.Remoting.Channels.Tcp
-
Expand
System.Runtime.Remoting.MetadataServices
-
Expand
System.Runtime.Serialization.Formatters.Soap.Xml
-
Expand
System.Runtime.Serialization.Formatters.Soap
-
Expand
AssemblyInfo
-
Expand
Attr
-
Expand
AttributeList
-
Expand
AttributeValueEntry
-
Expand
Converter
-
Expand
DottedInfo
-
Expand
HeaderStateEnum
-
Expand
InternalArrayTypeE
-
Expand
InternalElementTypeE
-
Expand
InternalFE
-
Expand
InternalMemberTypeE
-
Expand
InternalMemberValueE
-
Expand
InternalNameSpaceE
-
Expand
InternalObjectPositionE
-
Expand
InternalObjectTypeE
-
Expand
InternalParseStateE
-
Expand
InternalParseTypeE
-
Expand
InternalPrimitiveTypeE
-
Expand
InternalSerializerTypeE
-
Expand
InternalSoapMessage
-
Expand
ISerParser
-
Expand
ITrace
-
Expand
NameCache
-
Expand
NameCacheEntry
-
Expand
NameInfo
-
Expand
ObjectReader
-
Expand
ObjectWriter
-
Expand
ParseRecord
-
Expand
PrimitiveArray
-
Expand
ReadObjectInfo
-
AddMemberSeen()
-
AddParamName(string)
-
AddValue(string, object)
-
Create(Type, ISurrogateSelector, StreamingContext, ObjectManager, SerObjectInfoInit, IFormatterConverter, string)
-
Create(Type, string, Type, ISurrogateSelector, StreamingContext, ObjectManager, SerObjectInfoInit, IFormatterConverter, string)
-
DumpPopulate(MemberInfo, object)
-
DumpPopulateSi()
-
GetMemberInfo(string)
-
GetMemberType(MemberInfo)
-
GetObjectInfo(SerObjectInfoInit)
-
GetType(int)
-
GetType(string)
-
GetTypeAttributeInfo()
-
Init(Type, ISurrogateSelector, StreamingContext, ObjectManager, SerObjectInfoInit, IFormatterConverter, string)
-
Init(Type, string, Type, ISurrogateSelector, StreamingContext, ObjectManager, SerObjectInfoInit, IFormatterConverter, string)
-
InitMemberInfo()
-
InitNoMembers()
-
InitReadConstructor(Type, ISurrogateSelector, StreamingContext, string)
-
InitSiRead(string)
-
InternalInit()
-
ObjectEnd()
-
PopulateObjectMembers()
-
Position(string)
-
PutObjectInfo(SerObjectInfoInit, ReadObjectInfo)
-
ReadObjectInfo()
-
RecordFixup(long, string, long)
-
SetFakeObject()
-
SetVersion(int, int)
-
Expand
SerObjectInfoCache
-
Expand
SerObjectInfoInit
-
Expand
SerStack
-
Expand
SoapAssemblyInfo
-
Expand
SoapAttributeInfo
-
Expand
SoapAttributeType
-
Expand
SoapFormatter
-
Expand
SoapHandler
-
Expand
SoapParser
-
Expand
SoapUtil
-
Expand
SoapWriter
-
Expand
TypeNAssembly
-
Expand
Util
-
Expand
ValueFixup
-
Expand
ValueFixupEnum
-
Expand
WriteObjectInfo
-
Expand
XsdVersion
-
Expand
Microsoft.Tools.Caspol
-
Expand
Microsoft.Tools.Build
-
Expand
Microsoft.CSharp
-
Expand
System.CodeDom
-
Expand
System.CodeDom.Compiler
-
Expand
System.Collections.Specialized
-
Expand
System.ComponentModel
-
Expand
System.ComponentModel.Design
-
Expand
System.ComponentModel.Design.Serialization
-
Expand
System.Configuration
-
Expand
System.Web
-
Expand
System.Configuration.Provider
-
Expand
System.Configuration.Internal
-
Expand
System.Internal
-
Expand
System.Windows.Forms
-
Expand
System.Net
-
Expand
System.Net.Sockets
-
Expand
System.Net.NetworkInformation
-
Expand
System.Net.ComImports
-
Expand
System.Net.Security
-
Expand
System.Net.Cache
-
Expand
System.Net.Configuration
-
Expand
System.Text.RegularExpressions
-
Expand
System.Tools
-
Expand
System.IO.Compression
-
Expand
System.IO.Ports
-
Expand
System.Security.AccessControl
-
Expand
System.Xml
-
Expand
System.Xml.XPath.DataBinding
-
Expand
System.Xml.Schema
-
Expand
System.Xml.Serialization
-
Expand
System.Xml.Serialization.Advanced
-
Expand
System.Xml.Serialization.Configuration
-
Expand
System.Xml.XPath
-
Expand
System.Xml.Xsl
-
Expand
System.Xml.Xsl.IlGen
-
Expand
System.Xml.Xsl.Qil
-
Expand
System.Xml.Xsl.Runtime
-
Expand
System.Xml.Xsl.XPath
-
Expand
System.Xml.Xsl.Xslt
-
Expand
System.Xml.Xsl.XsltOld
-
Expand
System.Xml.Xsl.XsltOld.Debugger
-
Expand
Microsoft.JScript
-
Expand
Microsoft.Vsa
-
Expand
Microsoft.JScript.Vsa
- namespace System.Runtime.Serialization.Formatters.Soap
- {
- using System.Runtime.Remoting;
- using System.Runtime.Remoting.Metadata;
- using System.Runtime.Serialization;
- using System;
- using System.Collections;
- using System.Reflection;
- using System.Diagnostics;
- using System.Globalization;
-
-
-
-
-
-
-
- internal sealed class WriteObjectInfo
- {
- internal int objectInfoId;
-
- internal object obj;
- internal Type objectType;
-
- internal bool isSi = false;
- internal bool isNamed = false;
- internal bool isTyped = false;
-
- internal SerializationInfo si = null;
-
- internal SerObjectInfoCache cache = null;
-
- internal object[] memberData = null;
- internal ISerializationSurrogate serializationSurrogate = null;
- internal ISurrogateSelector surrogateSelector;
- internal IFormatterConverter converter;
-
- internal StreamingContext context;
-
- internal SerObjectInfoInit serObjectInfoInit = null;
-
-
- internal long objectId;
- internal long assemId;
-
- private int lastPosition = 0;
- private SoapAttributeInfo parentMemberAttributeInfo;
- internal bool isArray = false;
- internal SoapAttributeInfo typeAttributeInfo;
- internal WriteObjectInfo arrayElemObjectInfo;
-
-
- internal WriteObjectInfo()
- {
- }
-
- internal void ObjectEnd()
- {
- InternalST.Soap(this, objectInfoId, " objectType ", objectType, " ObjectEnd");
- PutObjectInfo(serObjectInfoInit, this);
- }
-
- private void InternalInit()
- {
- InternalST.Soap(this, objectInfoId, " InternalInit");
- obj = null;
- objectType = null;
- isSi = false;
- isNamed = false;
- isTyped = false;
- si = null;
- cache = null;
- memberData = null;
- isArray = false;
-
-
- objectId = 0;
- assemId = 0;
-
-
- lastPosition = 0;
- typeAttributeInfo = null;
- parentMemberAttributeInfo = null;
- arrayElemObjectInfo = null;
- }
-
- static internal WriteObjectInfo Serialize(object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SoapAttributeInfo attributeInfo, ObjectWriter objectWriter)
- {
- WriteObjectInfo soi = GetObjectInfo(serObjectInfoInit);
-
- soi.InitSerialize(obj, surrogateSelector, context, serObjectInfoInit, converter, attributeInfo, objectWriter);
- return soi;
- }
-
-
- internal void InitSerialize(object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SoapAttributeInfo attributeInfo, ObjectWriter objectWriter)
- {
- InternalST.Soap(this, objectInfoId, " Constructor 1 ", obj);
- this.context = context;
- this.obj = obj;
- this.serObjectInfoInit = serObjectInfoInit;
- this.parentMemberAttributeInfo = attributeInfo;
- this.surrogateSelector = surrogateSelector;
- this.converter = converter;
- ISurrogateSelector surrogateSelectorTemp;
-
- if (RemotingServices.IsTransparentProxy(obj))
- objectType = Converter.typeofMarshalByRefObject;
- else
- objectType = obj.GetType();
-
- if (objectType.IsArray) {
- arrayElemObjectInfo = Serialize(objectType.GetElementType(), surrogateSelector, context, serObjectInfoInit, converter, null);
- typeAttributeInfo = GetTypeAttributeInfo();
- isArray = true;
- InitNoMembers();
- return;
- }
-
- InternalST.Soap(this, objectInfoId, " Constructor 1 trace 2");
-
- typeAttributeInfo = GetTypeAttributeInfo();
-
- objectWriter.ObjectManager.RegisterObject(obj);
- if (surrogateSelector != null && (serializationSurrogate = surrogateSelector.GetSurrogate(objectType, context, out surrogateSelectorTemp)) != null) {
- InternalST.Soap(this, objectInfoId, " Constructor 1 trace 3");
- si = new SerializationInfo(objectType, converter);
- if (!objectType.IsPrimitive)
- serializationSurrogate.GetObjectData(obj, si, context);
- InitSiWrite(objectWriter);
- }
- else if (obj is ISerializable) {
- if (!objectType.IsSerializable) {
- throw new SerializationException(String.Format(CultureInfo.CurrentCulture, SoapUtil.GetResourceString("Serialization_NonSerType"), objectType.FullName, objectType.Module.Assembly.FullName));
- }
- si = new SerializationInfo(objectType, converter);
- ((ISerializable)obj).GetObjectData(si, context);
- InternalST.Soap(this, objectInfoId, " Constructor 1 trace 4 ISerializable " + objectType);
- InitSiWrite(objectWriter);
- }
- else {
- InternalST.Soap(this, objectInfoId, " Constructor 1 trace 5");
- InitMemberInfo();
- }
- }
-
- [Conditional("SER_LOGGING")]
- private void DumpMemberInfo()
- {
- for (int i = 0; i < cache.memberInfos.Length; i++) {
- InternalST.Soap(this, objectInfoId, " Constructor 1 memberInfos data ", cache.memberInfos[i].Name, " ", memberData[i]);
-
- }
- }
-
- static internal WriteObjectInfo Serialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SoapAttributeInfo attributeInfo)
- {
- WriteObjectInfo soi = GetObjectInfo(serObjectInfoInit);
- soi.InitSerialize(objectType, surrogateSelector, context, serObjectInfoInit, converter, attributeInfo);
- return soi;
- }
-
-
- internal void InitSerialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SoapAttributeInfo attributeInfo)
- {
-
- InternalST.Soap(this, objectInfoId, " Constructor 2 ", objectType);
-
- this.objectType = objectType;
- this.context = context;
- this.serObjectInfoInit = serObjectInfoInit;
- this.parentMemberAttributeInfo = attributeInfo;
- this.surrogateSelector = surrogateSelector;
- this.converter = converter;
-
- if (objectType.IsArray) {
- arrayElemObjectInfo = Serialize(objectType.GetElementType(), surrogateSelector, context, serObjectInfoInit, converter, null);
- typeAttributeInfo = GetTypeAttributeInfo();
- InitNoMembers();
- return;
- }
-
- typeAttributeInfo = GetTypeAttributeInfo();
-
- ISurrogateSelector surrogateSelectorTemp = null;
-
- if (surrogateSelector != null)
- serializationSurrogate = surrogateSelector.GetSurrogate(objectType, context, out surrogateSelectorTemp);
-
- if (serializationSurrogate != null) {
- isSi = true;
- }
- else if (objectType == Converter.typeofObject) {
- }
- else if (Converter.typeofISerializable.IsAssignableFrom(objectType))
- isSi = true;
-
- if (isSi) {
- si = new SerializationInfo(objectType, converter);
- cache = new SerObjectInfoCache();
- cache.fullTypeName = si.FullTypeName;
- cache.assemblyString = si.AssemblyName;
- }
- else {
- InitMemberInfo();
- }
-
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitSerialize Exit ", isSi);
- }
-
- private void InitSiWrite(ObjectWriter objectWriter)
- {
- InternalST.Soap(this, objectInfoId, " InitSiWrite Entry ");
-
-
-
- if (si.FullTypeName.Equals("FormatterWrapper")) {
- obj = si.GetValue("__WrappedObject", Converter.typeofObject);
- InitSerialize(obj, surrogateSelector, context, serObjectInfoInit, converter, null, objectWriter);
- }
- else {
-
- SerializationInfoEnumerator siEnum = null;
- isSi = true;
- siEnum = si.GetEnumerator();
- int infoLength = 0;
-
- infoLength = si.MemberCount;
-
- int count = infoLength;
-
-
-
- cache = new SerObjectInfoCache();
- cache.memberNames = new string[count];
- cache.memberTypes = new Type[count];
- memberData = new object[count];
-
- cache.fullTypeName = si.FullTypeName;
- cache.assemblyString = si.AssemblyName;
- siEnum = si.GetEnumerator();
- for (int i = 0; siEnum.MoveNext(); i++) {
- cache.memberNames[i] = siEnum.Name;
- cache.memberTypes[i] = siEnum.ObjectType;
- memberData[i] = siEnum.Value;
- InternalST.Soap(this, objectInfoId + " ", objectType, " InitSiWrite ", cache.memberNames[i], " Type ", cache.memberTypes[i], " data ", memberData[i]);
- }
-
- isNamed = true;
- isTyped = false;
- }
- InternalST.Soap(this, objectInfoId, " InitSiWrite Exit ");
- }
-
- private void InitNoMembers()
- {
- cache = (SerObjectInfoCache)serObjectInfoInit.seenBeforeTable[objectType];
- if (cache == null) {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo new cache");
- cache = new SerObjectInfoCache();
- cache.fullTypeName = objectType.FullName;
- cache.assemblyString = objectType.Module.Assembly.FullName;
- serObjectInfoInit.seenBeforeTable.Add(objectType, cache);
- }
- }
-
- private void InitMemberInfo()
- {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo Entry");
-
- cache = (SerObjectInfoCache)serObjectInfoInit.seenBeforeTable[objectType];
- if (cache == null) {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo new cache");
- cache = new SerObjectInfoCache();
- int count = 0;
-
- if (!objectType.IsByRef) {
- cache.memberInfos = FormatterServices.GetSerializableMembers(objectType, context);
- count = cache.memberInfos.Length;
- }
- cache.memberNames = new string[count];
- cache.memberTypes = new Type[count];
- cache.memberAttributeInfos = new SoapAttributeInfo[count];
-
-
- for (int i = 0; i < count; i++) {
- cache.memberNames[i] = cache.memberInfos[i].Name;
- cache.memberTypes[i] = GetMemberType(cache.memberInfos[i]);
- cache.memberAttributeInfos[i] = Attr.GetMemberAttributeInfo(cache.memberInfos[i], cache.memberNames[i], cache.memberTypes[i]);
- InternalST.Soap(this, objectInfoId, " InitMemberInfo name ", cache.memberNames[i], ", type ", cache.memberTypes[i], ", memberInfoType ", cache.memberInfos[i].GetType());
- }
- cache.fullTypeName = objectType.FullName;
- cache.assemblyString = objectType.Module.Assembly.FullName;
- serObjectInfoInit.seenBeforeTable.Add(objectType, cache);
- }
-
- if (obj != null) {
- memberData = FormatterServices.GetObjectData(obj, cache.memberInfos);
- DumpMemberInfo();
- }
-
- isTyped = true;
- isNamed = true;
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo Exit");
- }
-
-
-
-
- internal string GetTypeFullName()
- {
- InternalST.Soap(this, objectInfoId, " ", objectType, " GetTypeFullName isSi ", isSi, " " + cache.fullTypeName);
- return cache.fullTypeName;
- }
-
- internal string GetAssemblyString()
- {
- string assemblyString = null;
- InternalST.Soap(this, objectInfoId, " ", objectType, " GetAssemblyString Entry isSi ", isSi);
-
- if (arrayElemObjectInfo != null)
- assemblyString = arrayElemObjectInfo.GetAssemblyString();
- else if (IsAttributeNameSpace())
- assemblyString = typeAttributeInfo.m_nameSpace;
- else
- assemblyString = cache.assemblyString;
-
- InternalST.Soap(this, objectInfoId, " ", objectType, " GetAssemblyString Exit ", assemblyString);
- return assemblyString;
- }
-
-
-
-
- internal Type GetMemberType(MemberInfo objMember)
- {
- Type objectType = null;
-
- if (objMember is FieldInfo) {
- objectType = ((FieldInfo)objMember).FieldType;
- InternalST.Soap(this, objectInfoId, " ", "GetMemberType FieldInfo ", objectType);
- }
- else if (objMember is PropertyInfo) {
- objectType = ((PropertyInfo)objMember).PropertyType;
- InternalST.Soap(this, objectInfoId, " ", "GetMemberType PropertyInfo ", objectType);
- }
- else {
- throw new SerializationException(String.Format(CultureInfo.CurrentCulture, SoapUtil.GetResourceString("Serialization_SerMemberInfo"), objMember.GetType()));
- }
-
- return objectType;
- }
-
-
-
- internal void GetMemberInfo(out string[] outMemberNames, out Type[] outMemberTypes, out object[] outMemberData, out SoapAttributeInfo[] outAttributeInfo)
- {
- outMemberNames = cache.memberNames;
- outMemberTypes = cache.memberTypes;
- outMemberData = memberData;
- outAttributeInfo = cache.memberAttributeInfos;
-
- if (isSi) {
- if (!isNamed)
- throw new SerializationException(SoapUtil.GetResourceString("Serialization_ISerializableMemberInfo"));
- }
- }
-
- private static WriteObjectInfo GetObjectInfo(SerObjectInfoInit serObjectInfoInit)
- {
- WriteObjectInfo objectInfo = null;
-
- if (!serObjectInfoInit.oiPool.IsEmpty()) {
- objectInfo = (WriteObjectInfo)serObjectInfoInit.oiPool.Pop();
- objectInfo.InternalInit();
-
- }
- else {
- objectInfo = new WriteObjectInfo();
- objectInfo.objectInfoId = serObjectInfoInit.objectInfoIdCount++;
-
- }
-
- return objectInfo;
- }
-
- private int Position(string name)
- {
- InternalST.Soap(this, objectInfoId, " Position ", lastPosition, " ", name);
- if (cache.memberNames[lastPosition].Equals(name)) {
- return lastPosition;
- }
- else if ((++lastPosition < cache.memberNames.Length) && (cache.memberNames[lastPosition].Equals(name))) {
- return lastPosition;
- }
- else {
-
- InternalST.Soap(this, objectInfoId, " Position miss search for name " + name);
- for (int i = 0; i < cache.memberNames.Length; i++) {
- if (cache.memberNames[i].Equals(name)) {
- lastPosition = i;
- return lastPosition;
- }
- }
-
- throw new SerializationException(String.Format(CultureInfo.CurrentCulture, SoapUtil.GetResourceString("Serialization_Position"), objectType + " " + name));
- }
- }
-
- private static void PutObjectInfo(SerObjectInfoInit serObjectInfoInit, WriteObjectInfo objectInfo)
- {
- serObjectInfoInit.oiPool.Push(objectInfo);
-
- }
-
- internal bool IsInteropNameSpace()
- {
- if (arrayElemObjectInfo != null)
- return arrayElemObjectInfo.IsInteropNameSpace();
-
- if (IsAttributeNameSpace() || IsCallElement())
- return true;
- else
- return false;
- }
-
- internal bool IsCallElement()
- {
-
-
-
- if ((objectType != Converter.typeofObject) && (Converter.typeofIMethodCallMessage.IsAssignableFrom(objectType) && !Converter.typeofIConstructionCallMessage.IsAssignableFrom(objectType)) || (objectType == Converter.typeofReturnMessage) || (objectType == Converter.typeofInternalSoapMessage)) {
- return true;
- }
- else {
- return false;
- }
- }
-
- internal bool IsCustomXmlAttribute()
- {
- if (arrayElemObjectInfo != null)
- return arrayElemObjectInfo.IsCustomXmlAttribute();
-
- if ((typeAttributeInfo != null) && ((typeAttributeInfo.m_attributeType & SoapAttributeType.XmlAttribute) != 0))
- return true;
- else
- return false;
- }
-
- internal bool IsCustomXmlElement()
- {
- if (arrayElemObjectInfo != null)
- return arrayElemObjectInfo.IsCustomXmlElement();
-
- if ((typeAttributeInfo != null) && ((typeAttributeInfo.m_attributeType & SoapAttributeType.XmlElement) != 0))
- return true;
- else
- return false;
- }
-
- internal bool IsAttributeNameSpace()
- {
- if (arrayElemObjectInfo != null)
- return arrayElemObjectInfo.IsAttributeNameSpace();
-
- if ((typeAttributeInfo != null) && (typeAttributeInfo.m_nameSpace != null))
- return true;
- else
- return false;
- }
-
-
- private SoapAttributeInfo GetTypeAttributeInfo()
- {
- if (arrayElemObjectInfo != null)
- return arrayElemObjectInfo.GetTypeAttributeInfo();
-
- SoapAttributeInfo attributeInfo = null;
- if (parentMemberAttributeInfo != null)
- attributeInfo = parentMemberAttributeInfo;
- else
- attributeInfo = new SoapAttributeInfo();
-
- Attr.ProcessTypeAttribute(objectType, attributeInfo);
-
- attributeInfo.Dump("type " + objectType);
- return attributeInfo;
- }
-
-
-
-
- internal bool IsEmbeddedAttribute(string name)
- {
- InternalST.Soap(this, objectInfoId, " ", objectType, " IsEmbedded Entry ", name);
-
- if (arrayElemObjectInfo != null)
- return arrayElemObjectInfo.IsEmbeddedAttribute(name);
-
- bool isEmbedded = false;
- if (cache.memberAttributeInfos != null && cache.memberAttributeInfos.Length > 0) {
- SoapAttributeInfo attributeInfo = cache.memberAttributeInfos[Position(name)];
- isEmbedded = attributeInfo.IsEmbedded();
- }
- InternalST.Soap(this, objectInfoId, " ", objectType, " IsEmbedded Exit ", isEmbedded);
- return isEmbedded;
- }
- }
-
-
- internal sealed class ReadObjectInfo
- {
- internal int objectInfoId;
-
- internal object obj;
- internal Type objectType;
-
-
- internal ObjectManager objectManager;
-
- internal int count;
-
- internal bool isSi = false;
- internal bool isNamed = false;
- internal bool isTyped = false;
-
- internal SerializationInfo si = null;
-
- internal SerObjectInfoCache cache = null;
-
- internal string[] wireMemberNames = null;
- internal Type[] wireMemberTypes = null;
- internal object[] memberData = null;
- internal string[] memberNames = null;
-
- private int lastPosition = 0;
-
- internal ISurrogateSelector surrogateSelector = null;
- internal ISerializationSurrogate serializationSurrogate = null;
-
- internal StreamingContext context;
-
-
-
- internal ArrayList memberTypesList;
-
- internal SerObjectInfoInit serObjectInfoInit = null;
-
- internal IFormatterConverter formatterConverter;
-
-
- internal bool bfake = false;
- internal bool bSoapFault = false;
- internal ArrayList paramNameList;
-
- private int majorVersion = 0;
- private int minorVersion = 0;
- internal SoapAttributeInfo typeAttributeInfo;
- private ReadObjectInfo arrayElemObjectInfo;
- private int numberMembersSeen = 0;
-
- internal ReadObjectInfo()
- {
- }
-
- internal void ObjectEnd()
- {
- InternalST.Soap(this, objectInfoId, " objectType ", objectType, " ObjectEnd");
- PutObjectInfo(serObjectInfoInit, this);
- }
-
- private void InternalInit()
- {
- InternalST.Soap(this, objectInfoId, " objectType ", objectType, " InternalInit");
- obj = null;
- objectType = null;
- count = 0;
- isSi = false;
- isNamed = false;
- isTyped = false;
- si = null;
- wireMemberNames = null;
- wireMemberTypes = null;
- cache = null;
- lastPosition = 0;
- numberMembersSeen = 0;
-
- bfake = false;
- bSoapFault = false;
- majorVersion = 0;
- minorVersion = 0;
- typeAttributeInfo = null;
- arrayElemObjectInfo = null;
-
-
-
-
- if (memberTypesList != null) {
- memberTypesList.Clear();
- }
-
- }
-
- static internal ReadObjectInfo Create(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, ObjectManager objectManager, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, string assemblyName)
- {
- ReadObjectInfo soi = GetObjectInfo(serObjectInfoInit);
- soi.Init(objectType, surrogateSelector, context, objectManager, serObjectInfoInit, converter, assemblyName);
- return soi;
- }
-
-
-
- internal void Init(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, ObjectManager objectManager, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, string assemblyName)
- {
-
- InternalST.Soap(this, objectInfoId, " Constructor 3 ", objectType);
-
- this.objectType = objectType;
- this.objectManager = objectManager;
- this.context = context;
- this.serObjectInfoInit = serObjectInfoInit;
- this.formatterConverter = converter;
-
- InitReadConstructor(objectType, surrogateSelector, context, assemblyName);
- }
-
- static internal ReadObjectInfo Create(Type objectType, string[] memberNames, Type[] memberTypes, ISurrogateSelector surrogateSelector, StreamingContext context, ObjectManager objectManager, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, string assemblyName)
- {
- ReadObjectInfo soi = GetObjectInfo(serObjectInfoInit);
- soi.Init(objectType, memberNames, memberTypes, surrogateSelector, context, objectManager, serObjectInfoInit, converter, assemblyName);
- return soi;
- }
-
-
- internal void Init(Type objectType, string[] memberNames, Type[] memberTypes, ISurrogateSelector surrogateSelector, StreamingContext context, ObjectManager objectManager, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, string assemblyName)
- {
- InternalST.Soap(this, objectInfoId, " Constructor 5 ", objectType);
- this.objectType = objectType;
- this.objectManager = objectManager;
- this.wireMemberNames = memberNames;
- this.wireMemberTypes = memberTypes;
- this.context = context;
- this.serObjectInfoInit = serObjectInfoInit;
- this.formatterConverter = converter;
- if (memberNames != null)
- isNamed = true;
- if (memberTypes != null)
- isTyped = true;
-
- InitReadConstructor(objectType, surrogateSelector, context, assemblyName);
- }
-
- private void InitReadConstructor(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, string assemblyName)
- {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitReadConstructor Entry ", objectType);
-
- if (objectType.IsArray) {
- arrayElemObjectInfo = Create(objectType.GetElementType(), surrogateSelector, context, objectManager, serObjectInfoInit, formatterConverter, assemblyName);
- typeAttributeInfo = GetTypeAttributeInfo();
- InitNoMembers();
- return;
- }
-
- ISurrogateSelector surrogateSelectorTemp = null;
-
- if (surrogateSelector != null)
- serializationSurrogate = surrogateSelector.GetSurrogate(objectType, context, out surrogateSelectorTemp);
-
- if (serializationSurrogate != null) {
- isSi = true;
- }
- else if (objectType == Converter.typeofObject) {
- }
- else if (Converter.typeofISerializable.IsAssignableFrom(objectType))
- isSi = true;
-
- if (isSi) {
- si = new SerializationInfo(objectType, formatterConverter);
- InitSiRead(assemblyName);
- }
- else {
- InitMemberInfo();
- }
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitReadConstructor Exit ", isSi);
- }
-
- private void InitSiRead(string assemblyName)
- {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo new cache");
- if (assemblyName != null) {
-
-
- si.AssemblyName = assemblyName;
- }
- cache = new SerObjectInfoCache();
- cache.fullTypeName = si.FullTypeName;
- cache.assemblyString = si.AssemblyName;
-
-
- cache.memberNames = wireMemberNames;
- cache.memberTypes = wireMemberTypes;
-
- if (memberTypesList != null) {
- memberTypesList = new ArrayList(20);
- }
-
-
- if (wireMemberNames != null && wireMemberTypes != null)
- isTyped = true;
- }
-
- private void InitNoMembers()
- {
- cache = (SerObjectInfoCache)serObjectInfoInit.seenBeforeTable[objectType];
- if (cache == null) {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo new cache");
- cache = new SerObjectInfoCache();
- cache.fullTypeName = objectType.FullName;
- cache.assemblyString = objectType.Module.Assembly.FullName;
- serObjectInfoInit.seenBeforeTable.Add(objectType, cache);
- }
- }
-
- private void InitMemberInfo()
- {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo Entry");
-
- cache = (SerObjectInfoCache)serObjectInfoInit.seenBeforeTable[objectType];
- if (cache == null) {
- InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo new cache");
- cache = new SerObjectInfoCache();
- cache.memberInfos = FormatterServices.GetSerializableMembers(objectType, context);
- count = cache.memberInfos.Length;
- cache.memberNames = new string[count];
- cache.memberTypes = new Type[count];
- cache.memberAttributeInfos = new SoapAttributeInfo[count];
-
-
- for (int i = 0; i < count; i++) {
- cache.memberNames[i] = cache.memberInfos[i].Name;
- cache.memberTypes[i] = GetMemberType(cache.memberInfos[i]);
- cache.memberAttributeInfos[i] = Attr.GetMemberAttributeInfo(cache.memberInfos[i], cache.memberNames[i], cache.memberTypes[i]);
- InternalST.Soap(this, objectInfoId, " InitMemberInfo name ", cache.memberNames[i], ", type ", cache.me