コード例 #1
0
ファイル: AbstractMember.cs プロジェクト: zz0813/Reflexil
        public virtual IMember CreateSpecializedMember()
        {
            AbstractMember copy = Clone() as AbstractMember;

            if (copy == null)
            {
                throw new Exception("Clone() must return an AbstractMember instance, or CreateSpecializedMember must also be overridden.");
            }
            copy.genericMember = this;
            return(copy);
        }
コード例 #2
0
            void ReadMember(AbstractMember m)
            {
                // name is already read by the method that calls the member constructor
                m.Modifiers = (ModifierEnum)reader.ReadInt32();
                ReadAttributes(m);
                int interfaceImplCount = reader.ReadUInt16();

                for (int i = 0; i < interfaceImplCount; i++)
                {
                    m.InterfaceImplementations.Add(new ExplicitInterfaceImplementation(ReadType(), ReadString()));
                }
                if (!(m is IMethod))
                {
                    m.ReturnType = ReadType();
                }
            }
			void ReadMember(AbstractMember m)
			{
				// name is already read by the method that calls the member constructor
				m.Modifiers = (ModifierEnum)reader.ReadInt32();
				ReadAttributes(m);
				int interfaceImplCount = reader.ReadUInt16();
				for (int i = 0; i < interfaceImplCount; i++) {
					m.InterfaceImplementations.Add(new ExplicitInterfaceImplementation(ReadType(), ReadString()));
				}
				if (!(m is IMethod)) {
					m.ReturnType = ReadType();
				}
			}