public static TypeMember Resolve <TClrType>( this IClrTypeResolver resolver, ImperativeCodeModel codeModel, int distance) { return(resolver.Resolve(typeof(TClrType), codeModel, distance)); }
protected CodeContextBase(ImperativeCodeModel codeModel, IClrTypeResolver typeResolver, LanguageInfo language) { _previousContext = Current.Value; Current.Value = this; this.CodeModel = codeModel; this.ClrTypeResolver = typeResolver; this.Language = language; }
public CodeModelBuilder(IEnumerable <Compilation> knownCompilations) { _codeModel = new ImperativeCodeModel(); _compilations = WithReferencedCompilations(knownCompilations.ToArray()).ToImmutableArray(); _compilationBySyntaxTree = _compilations .SelectMany( compilation => compilation.SyntaxTrees .Select(tree => new KeyValuePair <SyntaxTree, Compilation>(tree, compilation))) .ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value); }
public CodeReaderContext(ImperativeCodeModel codeModel, IClrTypeResolver clrTypeResolver, LanguageInfo language) : base(codeModel, clrTypeResolver, language) { }
public static TypeMember CloseType(this ImperativeCodeModel model, Type openType, params TypeMember[] typeArguments) { return(model.Get <TypeMember>(openType).MakeGenericType(typeArguments)); }
public static TypeMember Type <TClrType>(this ImperativeCodeModel model) { return(model.Get <TypeMember>(typeof(TClrType))); }