Пример #1
0
        /// <summary>
        /// Initializes an uninitialized indirect type specialization.
        /// </summary>
        /// <param name="instance">The instance to initialize.</param>
        /// <returns>The instance.</returns>
        private static IndirectTypeSpecialization InitializeInstance(IndirectTypeSpecialization instance)
        {
            instance.qualName = instance.Declaration.Name.Qualify(
                instance.ParentType.FullName);
            instance.genericParameterCache = new Lazy <IReadOnlyList <IGenericParameter> >(
                instance.CreateGenericParameters);

            instance.Initialize();

            return(instance);
        }
Пример #2
0
        private IReadOnlyList <IType> CreateNestedTypes()
        {
            var nestedTypeDecls = Declaration.NestedTypes;
            var results         = new IType[nestedTypeDecls.Count];

            for (int i = 0; i < results.Length; i++)
            {
                results[i] = IndirectTypeSpecialization.Create(nestedTypeDecls[i], this);
            }
            return(results);
        }