Ejemplo n.º 1
0
 public QualifiedProperty(QualifiedType type, string name, bool hasGetter, bool hasSetter)
     : this(type, name, hasGetter, hasSetter, null)
 {
 }
 public QualifiedField(QualifiedType type, string name, IFieldSymbol fieldSymbol)
 {
     this.Type        = type;
     this.FieldSymbol = fieldSymbol;
     this.Name        = name;
 }
Ejemplo n.º 3
0
 public ITypeSymbol GetTypeSymbol(QualifiedType qualifiedType)
 {
     return(qualifiedType.TypeSymbol ?? this.Compilation.GetTypeByMetadataName(qualifiedType.ToNamespaceQualifiedType()));
 }
Ejemplo n.º 4
0
        public Result.IfSuccess <ReadOnlyDependencyPropertyToNotificationEvent> Resolve(QualifiedType qualifiedType, string propertyName)
        {
            var typeSymbol = this.codeAnalyzer.GetTypeSymbol(qualifiedType);

            while (typeSymbol != null)
            {
                if (this.readOnlyDependencyPropertyToNotificationEvents.Value.TryGetValue($"{typeSymbol.ContainingAssembly.Name}|{typeSymbol.ToDisplayString()}", out var assemblyType))
                {
                    if (assemblyType.TryGetValue(propertyName, out var value))
                    {
                        return(Result.Success(value));
                    }
                }

                typeSymbol = typeSymbol.BaseType;
            }

            return(Result.Error());
        }