public MemberMetadataInfo(MemberMetadataInfo other)
        {
            Names = other.Names;
            MethodSignature = other.MethodSignature;
            Module = other.Module;
            ArrayTypeInfo = other.ArrayTypeInfo;
            IsTypeDef = other.IsTypeDef;
            IsPrimitiveType = other.IsPrimitiveType;
            Kind = other.Kind;
            IsGenericInstance = other.IsGenericInstance;
            IsEnclosedType = other.IsEnclosedType;
            Name = other.Name;
            Namespace = other.Namespace;
            DefinedInAssembly = other.DefinedInAssembly;

            if (other.ParentType != null)
            {
                ParentType = new MemberMetadataInfo(other.ParentType);
            }

            if (other.GenericTypeArgs != null)
            {
                GenericTypeArgs = other.GenericTypeArgs.Select(o => new MemberMetadataInfo(o)).ToList();
            }
        }
        /// <summary>
        /// Marks all types in a method signature as enclosed.  This does not change any of the inputs; instead it will create a new 
        /// method signature from new parameters and return type
        /// </summary>
        /// <param name="methodSignature"></param>
        /// <returns>MethodSignature with types marked as enclosed</returns>
        public static MethodSignature<MemberMetadataInfo> MakeEnclosedType(this MethodSignature<MemberMetadataInfo> methodSignature)
        {
            var parameters = methodSignature.ParameterTypes
                .Select(p => new MemberMetadataInfo(p) { IsEnclosedType = true })
                .ToImmutableArray();
            var returnType = new MemberMetadataInfo(methodSignature.ReturnType) { IsEnclosedType = true };

            return new MethodSignature<MemberMetadataInfo>(
                methodSignature.Header,
                returnType,
                methodSignature.RequiredParameterCount,
                methodSignature.GenericParameterCount,
                parameters);
        }
        public MemberMetadataInfo(MemberMetadataInfo other1, MemberMetadataInfo other2)
            : this(other1)
        {
            Names.AddRange(other2.Names);
            Names.Add(other2.Name);

            if (other2.Namespace != null)
            {
                Namespace = other2.Namespace;
            }

            if (other2.DefinedInAssembly.HasValue)
            {
                DefinedInAssembly = other2.DefinedInAssembly;
            }
        }
 private MemberDependency CreateMemberDependency(MemberMetadataInfo type)
 {
     return new MemberDependency
     {
         CallingAssembly = CallingAssembly,
         MemberDocId = $"T:{type}",
         DefinedInAssemblyIdentity = type.IsAssemblySet ? _reader.FormatAssemblyInfo(type.DefinedInAssembly) : _currentAssemblyInfo
     };
 }
        private MemberDependency CreateMemberDependency(MemberMetadataInfo type)
        {
            var definedInAssembly = type.DefinedInAssembly.HasValue ? _reader.FormatAssemblyInfo(type.DefinedInAssembly.Value) : _currentAssemblyInfo;

            // Apply heuristic to determine if API is most likely defined in a framework assembly
            if (!_assemblyFilter.IsFrameworkAssembly(definedInAssembly))
            {
                return null;
            }

            return new MemberDependency
            {
                CallingAssembly = CallingAssembly,
                MemberDocId = $"T:{type}",
                DefinedInAssemblyIdentity = definedInAssembly
            };
        }