ICSharpCode.ILSpy.CSharpLanguage.TypeToString C# (CSharp) Méthode

TypeToString() private méthode

private TypeToString ( ConvertTypeOptions options, TypeReference type, ICustomAttributeProvider typeAttributes = null ) : string
options ConvertTypeOptions
type Mono.Cecil.TypeReference
typeAttributes ICustomAttributeProvider
Résultat string
		string TypeToString(ConvertTypeOptions options, TypeReference type, ICustomAttributeProvider typeAttributes = null)
		{
			AstType astType = AstBuilder.ConvertType(type, typeAttributes, options);

			StringWriter w = new StringWriter();
			if (type.IsByReference) {
				ParameterDefinition pd = typeAttributes as ParameterDefinition;
				if (pd != null && (!pd.IsIn && pd.IsOut))
					w.Write("out ");
				else
					w.Write("ref ");

				if (astType is ComposedType && ((ComposedType)astType).PointerRank > 0)
					((ComposedType)astType).PointerRank--;
			}

			astType.AcceptVisitor(new CSharpOutputVisitor(w, FormattingOptionsFactory.CreateAllman()));
			return w.ToString();
		}

Same methods

CSharpLanguage::TypeToString ( TypeReference type, bool includeNamespace, ICustomAttributeProvider typeAttributes = null ) : string