예제 #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;
 }
예제 #3
0
 public ITypeSymbol GetTypeSymbol(QualifiedType qualifiedType)
 {
     return(qualifiedType.TypeSymbol ?? this.Compilation.GetTypeByMetadataName(qualifiedType.ToNamespaceQualifiedType()));
 }
예제 #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());
        }