Beispiel #1
0
        public override ISourceElement Locate()
        {
            var typeNode = new TypeNodeLocator(_root, _syntax.Type).Locate() as TypeNode;

            if (typeNode == null)
            {
                throw new SourceLinkLocateException($"Could not Locate TypeNode: { _syntax.Type }");
            }

            return(typeNode.GetMembers(_syntax.Identifier.Identifier)
                   .OfType <FieldMember>().Single(x => TypeStructureComparer.CompareTypes(x.Identifier, _syntax.Identifier)));
        }
Beispiel #2
0
        public override ISourceElement Locate()
        {
            var typeNode = new TypeNodeLocator(_root, _syntax.Type).Locate() as TypeNode;

            if (typeNode == null)
            {
                throw new SourceLinkLocateException($"Could not Locate TypeNode: { _syntax.Type }");
            }

            // TODO: Fix this to work with explicitly implemented properties!
            return(typeNode.GetMembers(_syntax.Identifier.Identifier)
                   .OfType <PropertyMember>()
                   .Single(x => TypeStructureComparer.CompareTypes(x.Identifier, _syntax.Identifier)));
        }
 private bool ParameterIsEqual(Parameter eParam, Parameter iParam)
 {
     return(iParam.HasModifier == eParam.HasModifier &&
            TypeStructureComparer.CompareTypes(iParam.Type, eParam.Type));
 }