Exemplo n.º 1
0
        public static MemberInfo[] GetSerializableMembers(Type type, StreamingContext context)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }
            if (!(type is RuntimeType))
            {
                throw new SerializationException(Environment.GetResourceString("Serialization_InvalidType", new object[]
                {
                    type.ToString()
                }));
            }
            MemberHolder key = new MemberHolder(type, context);

            return(FormatterServices.m_MemberInfoTable.GetOrAdd(key, (MemberHolder _) => FormatterServices.InternalGetSerializableMembers((RuntimeType)type)));
        }