public static QualifiedProperty CreateProperty(CodeAnalyzer codeAnalyzer, IPropertySymbol propertySymbol, string propertyName)
 {
     return(new QualifiedProperty(
                CreateType(codeAnalyzer, propertySymbol.Type),
                propertyName,
                propertySymbol.GetMethod != null && propertySymbol.GetMethod.DeclaredAccessibility == Accessibility.Public,
                propertySymbol.SetMethod != null && propertySymbol.SetMethod.DeclaredAccessibility == Accessibility.Public,
                propertySymbol));
 }
 public static QualifiedType CreateType(CodeAnalyzer codeAnalyzer, ITypeSymbol typeSymbol)
 {
     return(new QualifiedType(
                codeAnalyzer.GetAssemblyAliases(typeSymbol)?.FirstOrDefault() ?? QualifiedType.GlobalAlias,
                typeSymbol.ContainingAssembly.ToString(),
                typeSymbol.ContainingNamespace.ToString(),
                typeSymbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat),
                typeSymbol));
 }
示例#3
0
 public BindingModeResolver(
     Lazy <IReadOnlyDictionary <string, IReadOnlyCollection <string> > > defaultOneWayBindingProperties,
     CodeAnalyzer codeAnalyzer,
     XamlPlatform xamlPlatform)
 {
     this.defaultOneWayBindingProperties = defaultOneWayBindingProperties;
     this.codeAnalyzer = codeAnalyzer;
     this.xamlPlatform = xamlPlatform;
 }
 public static QualifiedField CreateField(CodeAnalyzer codeAnalyzer, string fieldName, IFieldSymbol fieldSymbol)
 {
     return(new QualifiedField(CreateType(codeAnalyzer, fieldSymbol.Type), fieldName, fieldSymbol));
 }
示例#5
0
 public ReadOnlyDependencyPropertyToNotificationEventResolver(CodeAnalyzer codeAnalyzer, Lazy <IReadOnlyDictionary <string, IReadOnlyDictionary <string, ReadOnlyDependencyPropertyToNotificationEvent> > > readOnlyDependencyPropertyToNotificationEvents)
 {
     this.codeAnalyzer = codeAnalyzer;
     this.readOnlyDependencyPropertyToNotificationEvents = readOnlyDependencyPropertyToNotificationEvents;
 }
示例#6
0
 public TypeResolver(CodeAnalyzer codeAnalyzer)
 {
     this.codeAnalyzer = codeAnalyzer;
 }