Exemple #1
0
        public ParameterizedTypeName(FlyweightFactory factory, TypeName parentTypeName, TypeInfo typeInfo)
        {
            Parent   = parentTypeName;
            CoreName = GetCoreName(typeInfo.Name);

            var parameterized = parentTypeName as ParameterizedTypeName;

            if (parameterized != null)
            {
                GenericTypeArgumentNames = factory.GetTypeNames(typeInfo.GenericTypeParameters, parameterized.GenericTypeArgumentNames.Length);
            }
            else
            {
                GenericTypeArgumentNames = factory.GetTypeNames(typeInfo.GenericTypeParameters);
            }

            TypeFullName = typeInfo.FullName;
        }
Exemple #2
0
        public ParameterizedTypeName(FlyweightFactory factory, TypeInfo typeInfo)
        {
            Parent   = factory.GetNamespaceName(typeInfo.Namespace);
            CoreName = GetCoreName(typeInfo.Name);

            GenericTypeArgumentNames = factory.GetTypeNames(typeInfo.GenericTypeParameters);

            TypeFullName = typeInfo.FullName;
        }
Exemple #3
0
        public ParameterizedTypeName(FlyweightFactory factory, TypeName parentTypeName, Type type)
        {
            Parent   = parentTypeName;
            CoreName = GetCoreName(type.Name);

            var parameterized = parentTypeName as ParameterizedTypeName;

            if (parameterized != null)
            {
                GenericTypeArgumentNames = factory.GetTypeNames(type.GenericTypeArguments, parameterized.GenericTypeArgumentNames.Length);
            }
            else
            {
                GenericTypeArgumentNames = factory.GetTypeNames(type.GenericTypeArguments);
            }

            IsConstructed = true;

            TypeFullName = type.FullName;
        }
Exemple #4
0
        public ParameterizedTypeName(FlyweightFactory factory, Type type)
        {
            Parent   = factory.GetNamespaceName(type.Namespace);
            CoreName = GetCoreName(type.Name);

            GenericTypeArgumentNames = factory.GetTypeNames(type.GenericTypeArguments);

            IsConstructed = true;

            TypeFullName = type.FullName;
        }