private static TypeName CreateType(string typeName, string assemblyName, int array, IEnumerable <TypeName> genericArgs = null) { if (null == genericArgs) { genericArgs = new TypeName[0]; } return(TypeName.Create(typeName, assemblyName, genericArgs, array)); }
private static TypeName CreateTypeName(Type type) { var name = type.Namespace + "." + (type.DeclaringType != null?type.DeclaringType.Name + "+":"") + type.Name; return(TypeName.Create(name, type.Assembly.GetName().Name, type.GetGenericArguments().Select(CreateTypeName))); }
private static TypeName CreateTypeName(Type type, IEnumerable <ITypeDescription> genericArgumentTypes) { return(TypeName.Create(type.FullName.Split('[').First(), type.Assembly.GetName().Name, genericArgumentTypes.Select(t => t.TypeName))); }