internal static ReadObjectInfo Create(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, ObjectManager objectManager, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, string assemblyName) { ReadObjectInfo objectInfo = GetObjectInfo(serObjectInfoInit); objectInfo.Init(objectType, surrogateSelector, context, objectManager, serObjectInfoInit, converter, assemblyName); return(objectInfo); }
private void InternalInit() { this.obj = null; this.objectType = null; this.count = 0; this.isSi = false; this.isNamed = false; this.isTyped = false; this.si = null; this.wireMemberNames = null; this.wireMemberTypes = null; this.cache = null; this.lastPosition = 0; this.numberMembersSeen = 0; this.bfake = false; this.bSoapFault = false; this.majorVersion = 0; this.minorVersion = 0; this.typeAttributeInfo = null; this.arrayElemObjectInfo = null; if (this.memberTypesList != null) { this.memberTypesList.Clear(); } }
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; // Si Read if (memberTypesList != null) { memberTypesList.Clear(); } }
private void InitReadConstructor(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, string assemblyName) { if (objectType.IsArray) { this.arrayElemObjectInfo = Create(objectType.GetElementType(), surrogateSelector, context, this.objectManager, this.serObjectInfoInit, this.formatterConverter, assemblyName); this.typeAttributeInfo = this.GetTypeAttributeInfo(); this.InitNoMembers(); } else { ISurrogateSelector selector = null; if (surrogateSelector != null) { this.serializationSurrogate = surrogateSelector.GetSurrogate(objectType, context, out selector); } if (this.serializationSurrogate != null) { this.isSi = true; } else if (!(objectType == Converter.typeofObject) && Converter.typeofISerializable.IsAssignableFrom(objectType)) { this.isSi = true; } if (this.isSi) { this.si = new SerializationInfo(objectType, this.formatterConverter); this.InitSiRead(assemblyName); } else { this.InitMemberInfo(); } } }
internal static 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 ValueFixup(object memberObject, string memberName, ReadObjectInfo objectInfo) { this.valueFixupEnum = ValueFixupEnum.Member; this.memberObject = memberObject; this.memberName = memberName; this.objectInfo = objectInfo; }
internal ValueFixup(Object memberObject, String memberName, ReadObjectInfo objectInfo) { InternalST.Soap(this, "Member Constructor ", memberObject); valueFixupEnum = ValueFixupEnum.Member; this.memberObject = memberObject; this.memberName = memberName; this.objectInfo = objectInfo; }
internal void Init() { this.PRparseTypeEnum = InternalParseTypeE.Empty; this.PRobjectTypeEnum = InternalObjectTypeE.Empty; this.PRarrayTypeEnum = InternalArrayTypeE.Empty; this.PRmemberTypeEnum = InternalMemberTypeE.Empty; this.PRmemberValueEnum = InternalMemberValueE.Empty; this.PRobjectPositionEnum = InternalObjectPositionE.Empty; this.PRname = null; this.PRnameXmlKey = null; this.PRxmlNameSpace = null; this.PRisParsed = false; this.PRisProcessAttributes = false; this.PRvalue = null; this.PRkeyDt = null; this.PRdtType = null; this.PRassemblyName = null; this.PRdtTypeCode = InternalPrimitiveTypeE.Invalid; this.PRisEnum = false; this.PRobjectId = 0L; this.PRidRef = 0L; this.PRarrayElementTypeString = null; this.PRarrayElementType = null; this.PRisArrayVariant = false; this.PRarrayElementTypeCode = InternalPrimitiveTypeE.Invalid; this.PRprimitiveArrayTypeString = null; this.PRrank = 0; this.PRlengthA = null; this.PRpositionA = null; this.PRlowerBoundA = null; this.PRupperBoundA = null; this.PRindexMap = null; this.PRmemberIndex = 0; this.PRlinearlength = 0; this.PRrectangularMap = null; this.PRisLowerBound = false; this.PRtopId = 0L; this.PRheaderId = 0L; this.PRisHeaderRoot = false; this.PRisAttributesProcessed = false; this.PRisMustUnderstand = false; this.PRparseStateEnum = InternalParseStateE.Initial; this.PRisWaitingForNestedObject = false; this.PRisValueTypeFixup = false; this.PRnewObj = null; this.PRobjectA = null; this.PRprimitiveArray = null; this.PRobjectInfo = null; this.PRisRegistered = false; this.PRisXmlAttribute = false; }
private static ReadObjectInfo GetObjectInfo(SerObjectInfoInit serObjectInfoInit) { ReadObjectInfo info = null; if (!serObjectInfoInit.oiPool.IsEmpty()) { info = (ReadObjectInfo)serObjectInfoInit.oiPool.Pop(); info.InternalInit(); return(info); } return(new ReadObjectInfo { objectInfoId = serObjectInfoInit.objectInfoIdCount++ }); }
private static ReadObjectInfo GetObjectInfo(SerObjectInfoInit serObjectInfoInit) { ReadObjectInfo objectInfo = null; if (!serObjectInfoInit.oiPool.IsEmpty()) { objectInfo = (ReadObjectInfo)serObjectInfoInit.oiPool.Pop(); objectInfo.InternalInit(); //InternalST.Soap( "GetObjectInfo",objectInfo.objectInfoId," GetObjectInfo from pool"); } else { objectInfo = new ReadObjectInfo(); objectInfo.objectInfoId = serObjectInfoInit.objectInfoIdCount++; //InternalST.Soap( "GetObjectInfo",objectInfo.objectInfoId," GetObjectInfo new not from pool"); } return(objectInfo); }
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); }
internal ValueFixup(Object memberObject, String memberName, ReadObjectInfo objectInfo) { InternalST.Soap(this, "Member Constructor ",memberObject); valueFixupEnum = ValueFixupEnum.Member; this.memberObject = memberObject; this.memberName = memberName; this.objectInfo = objectInfo; }
// Initialize ParseRecord. Called when reusing. internal void Init() { // Enums PRparseTypeEnum = InternalParseTypeE.Empty; PRobjectTypeEnum = InternalObjectTypeE.Empty; PRarrayTypeEnum = InternalArrayTypeE.Empty; PRmemberTypeEnum = InternalMemberTypeE.Empty; PRmemberValueEnum = InternalMemberValueE.Empty; PRobjectPositionEnum = InternalObjectPositionE.Empty; // Object PRname = null; PRnameXmlKey = null; PRxmlNameSpace = null; PRisParsed = false; PRisProcessAttributes = false; // Value PRvalue = null; // dt attribute PRkeyDt = null; PRdtType = null; PRassemblyName = null; PRdtTypeCode = InternalPrimitiveTypeE.Invalid; PRisEnum = false; // Object ID PRobjectId = 0; // Reference ID PRidRef = 0; // Array // Array Element Type PRarrayElementTypeString = null; PRarrayElementType = null; PRisArrayVariant = false; PRarrayElementTypeCode = InternalPrimitiveTypeE.Invalid; // Array Primitive Element type PRprimitiveArrayTypeString = null; // Parsed array information PRrank = 0; PRlengthA = null; PRpositionA = null; PRlowerBoundA = null; PRupperBoundA = null; // Array map for placing array elements in array PRindexMap = null; PRmemberIndex = 0; PRlinearlength = 0; PRrectangularMap = null; PRisLowerBound = false; // SerializedStreamHeader information PRtopId = 0; PRheaderId = 0; PRisHeaderRoot = false; PRisAttributesProcessed = false; // Parsed HeaderMember Information PRisMustUnderstand = false; // Parse State PRparseStateEnum = InternalParseStateE.Initial; PRisWaitingForNestedObject = false; // ValueType Fixup needed PRisValueTypeFixup = false; PRnewObj = null; PRobjectA = null; PRprimitiveArray = null; PRobjectInfo = null; PRisRegistered = false; PRisXmlAttribute = false; }
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 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; // Si Read if (memberTypesList != null) { memberTypesList.Clear(); } }
private static void PutObjectInfo(SerObjectInfoInit serObjectInfoInit, ReadObjectInfo objectInfo) { serObjectInfoInit.oiPool.Push(objectInfo); //InternalST.Soap( "PutObjectInfo",objectInfo.objectInfoId," PutObjectInfo to pool"); }
private static ReadObjectInfo GetObjectInfo(SerObjectInfoInit serObjectInfoInit) { ReadObjectInfo objectInfo = null; if (!serObjectInfoInit.oiPool.IsEmpty()) { objectInfo = (ReadObjectInfo)serObjectInfoInit.oiPool.Pop(); objectInfo.InternalInit(); //InternalST.Soap( "GetObjectInfo",objectInfo.objectInfoId," GetObjectInfo from pool"); } else { objectInfo = new ReadObjectInfo(); objectInfo.objectInfoId = serObjectInfoInit.objectInfoIdCount++; //InternalST.Soap( "GetObjectInfo",objectInfo.objectInfoId," GetObjectInfo new not from pool"); } return objectInfo; }
private static void PutObjectInfo(SerObjectInfoInit serObjectInfoInit, ReadObjectInfo objectInfo) { serObjectInfoInit.oiPool.Push(objectInfo); }