GetMemberAttributeInfo() static private method

static private GetMemberAttributeInfo ( MemberInfo memberInfo, String name, Type type ) : SoapAttributeInfo
memberInfo System.Reflection.MemberInfo
name String
type System.Type
return SoapAttributeInfo
Exemplo n.º 1
0
        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];

                // Calculate new arrays
                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);
            }
            memberData  = new Object[cache.memberNames.Length];
            memberNames = new String[cache.memberNames.Length];

            isTyped = true;
            isNamed = true;
            InternalST.Soap(this, objectInfoId, " ", objectType, " InitMemberInfo Exit");
        }
Exemplo n.º 2
0
 private void InitMemberInfo()
 {
     this.cache = (SerObjectInfoCache)this.serObjectInfoInit.seenBeforeTable[this.objectType];
     if (this.cache == null)
     {
         this.cache                      = new SerObjectInfoCache();
         this.cache.memberInfos          = FormatterServices.GetSerializableMembers(this.objectType, this.context);
         this.count                      = this.cache.memberInfos.Length;
         this.cache.memberNames          = new string[this.count];
         this.cache.memberTypes          = new Type[this.count];
         this.cache.memberAttributeInfos = new SoapAttributeInfo[this.count];
         for (int i = 0; i < this.count; i++)
         {
             this.cache.memberNames[i]          = this.cache.memberInfos[i].Name;
             this.cache.memberTypes[i]          = this.GetMemberType(this.cache.memberInfos[i]);
             this.cache.memberAttributeInfos[i] = Attr.GetMemberAttributeInfo(this.cache.memberInfos[i], this.cache.memberNames[i], this.cache.memberTypes[i]);
         }
         this.cache.fullTypeName   = this.objectType.FullName;
         this.cache.assemblyString = this.objectType.Module.Assembly.FullName;
         this.serObjectInfoInit.seenBeforeTable.Add(this.objectType, this.cache);
     }
     this.memberData  = new object[this.cache.memberNames.Length];
     this.memberNames = new string[this.cache.memberNames.Length];
     this.isTyped     = true;
     this.isNamed     = true;
 }