Ejemplo n.º 1
0
        //readonly ImmutableDictionary<string, ImmutableArray<ISymbol>> members;

        ViewModelCompleter(SemanticModel model, INamedTypeSymbol type)
        {
            this.model = model;
            this.type  = type;
            bindablePropertyAttributeType = model.Compilation.GetTypeByMetadataName("DevExpress.Mvvm.DataAnnotations.BindablePropertyAttribute");
            asyncCommandAttributeType     = model.Compilation.GetTypeByMetadataName("DevExpress.Mvvm.DataAnnotations.AsyncCommandAttribute");
            commandAttributeType          = model.Compilation.GetTypeByMetadataName("DevExpress.Mvvm.DataAnnotations.CommandAttribute");
            methods = type.AllMethods()
                      .ToLookup(x => x.Name)
                      .ToImmutableDictionary(x => x.Key, x => x.ToImmutableArray());
            taskType = model.Compilation.GetTypeByMetadataName(typeof(Task).FullName);
        }
Ejemplo n.º 2
0
 //readonly ImmutableDictionary<string, ImmutableArray<ISymbol>> members;
 ViewModelCompleter(SemanticModel model, INamedTypeSymbol type)
 {
     this.model = model;
     this.type = type;
     bindablePropertyAttributeType = model.Compilation.GetTypeByMetadataName("DevExpress.Mvvm.DataAnnotations.BindablePropertyAttribute");
     asyncCommandAttributeType = model.Compilation.GetTypeByMetadataName("DevExpress.Mvvm.DataAnnotations.AsyncCommandAttribute");
     commandAttributeType = model.Compilation.GetTypeByMetadataName("DevExpress.Mvvm.DataAnnotations.CommandAttribute");
     methods = type.AllMethods()
         .ToLookup(x => x.Name)
         .ToImmutableDictionary(x => x.Key, x => x.ToImmutableArray());
     taskType = model.Compilation.GetTypeByMetadataName(typeof(Task).FullName);
 }