System.CodeDom.Compiler.CodeDomProvider.GetTypeOutput C# (CSharp) Method

GetTypeOutput() public method

public GetTypeOutput ( CodeTypeReference type ) : string
type CodeTypeReference
return string
        public virtual string GetTypeOutput(CodeTypeReference type) =>
            CreateGeneratorHelper().GetTypeOutput(type);

Usage Example

Esempio n. 1
0
        private ViewLocationResult CreateViewLocationWithModel(Type expectedType, CodeDomProvider provider, string modelDirective)
        {
            var codeTypeRef = new CodeTypeReference(expectedType);
            var modelType = provider.GetTypeOutput(codeTypeRef);

            var modelTypeCode = BuildCodeExtractingModelType(provider);

            var view = string.Format("@{0} {1}\n\n@{2}", modelDirective, modelType, modelTypeCode);

            return new ViewLocationResult(
                string.Empty,
                string.Empty,
                string.Concat(provider.FileExtension, "html"),
                () => new StringReader(view)
                );
        }
All Usage Examples Of System.CodeDom.Compiler.CodeDomProvider::GetTypeOutput