示例#1
0
 internal DependencyObjectType()
     : base("System.Windows.DependencyObject")
 {
     this.GetValue        = new QualifiedMethod(this, "GetValue");
     this.SetValue        = new QualifiedMethod(this, "SetValue");
     this.SetCurrentValue = new QualifiedMethod(this, "SetCurrentValue");
 }
示例#2
0
 private static bool TryGetCall(InvocationExpressionSyntax invocation, QualifiedMethod qualifiedMethod, int expectedArgs, SemanticModel semanticModel, CancellationToken cancellationToken, out IMethodSymbol method)
 {
     method = null;
     return(invocation.ArgumentList is ArgumentListSyntax argumentList &&
            argumentList.Arguments.Count == expectedArgs &&
            semanticModel.TryGetSymbol(invocation, qualifiedMethod, cancellationToken, out method));
 }
示例#3
0
        internal DependencyPropertyType()
            : base("System.Windows.DependencyProperty")
        {
            this.Register                 = new QualifiedMethod(this, nameof(this.Register));
            this.RegisterReadOnly         = new QualifiedMethod(this, nameof(this.RegisterReadOnly));
            this.RegisterAttached         = new QualifiedMethod(this, nameof(this.RegisterAttached));
            this.RegisterAttachedReadOnly = new QualifiedMethod(this, nameof(this.RegisterAttachedReadOnly));

            this.AddOwner         = new QualifiedMethod(this, nameof(this.AddOwner));
            this.OverrideMetadata = new QualifiedMethod(this, nameof(this.OverrideMetadata));
        }
示例#4
0
        private static bool TryGetCall(InvocationExpressionSyntax invocation, QualifiedMethod qualifiedMethod, int expectedArgs, SemanticModel semanticModel, CancellationToken cancellationToken, out IMethodSymbol method)
        {
            method = null;
            if (invocation == null ||
                invocation.ArgumentList == null ||
                invocation.ArgumentList.Arguments.Count != expectedArgs)
            {
                return(false);
            }

            return(semanticModel.TryGetSymbol(invocation, qualifiedMethod, cancellationToken, out method));
        }
示例#5
0
 internal EventManagerType()
     : base("System.Windows.EventManager")
 {
     this.RegisterClassHandler = new QualifiedMethod(this, nameof(this.RegisterClassHandler));
     this.RegisterRoutedEvent  = new QualifiedMethod(this, nameof(this.RegisterRoutedEvent));
 }
示例#6
0
 private static bool TryGetCall(InvocationExpressionSyntax invocation, QualifiedMethod qualifiedMethod, SemanticModel semanticModel, CancellationToken cancellationToken, [NotNullWhen(true)] out IMethodSymbol?method)
 {
     method = null;
     return(invocation is { ArgumentList : { Arguments : { } arguments } } &&
示例#7
0
 internal ObjectType()
     : base("System.Object", "object")
 {
     this.Equals          = new QualifiedMethod(this, nameof(this.Equals));
     this.ReferenceEquals = new QualifiedMethod(this, nameof(this.ReferenceEquals));
 }