Ejemplo n.º 1
0
        private string GetMethodSignature()
        {
            var methodElement = DataHelpers.GetElement(Archive, Data.PrimaryLocation);

            if (methodElement.Element(SRC.Block) != null)
            {
                methodElement.Element(SRC.Block).Remove();
            }
            return(methodElement.ToSource().Trim());
        }
Ejemplo n.º 2
0
        public MethodDefinition(ISrcMLArchive archive, MethodData data, MethodCall fromCall)
        {
            this.Archive    = archive;
            this.SourceCall = fromCall;
            this.Data       = data;

            this.isValid = false;

            this.Location = data.PrimaryLocation;
            this.FullName = Data.GetFullName();
            this.Id       = DataHelpers.GetLocation(Location);
            this.Path     = Location.SourceFileName;

            this.Signature = GetMethodSignature();
        }
Ejemplo n.º 3
0
        public MethodCall(ISrcMLArchive archive, CallData data)
        {
            this.Archive = archive;
            this.Data    = data;

            this.firstMatchIsValid = false;
            this.hasMatches        = false;
            this.hasNoMatches      = false;
            this.isExternal        = false;

            this.Location = data.Location;
            this.FullName = data.ParentScope.GetParentScopesAndSelf <INamedScope>().First().GetFullName();
            this.Id       = DataHelpers.GetLocation(data.Location);
            this.Path     = this.Location.SourceFileName;

            this.numberOfValidMatches = 0;
            this.SourceCode           = GetSourceCode();
            PossibleMatches           = new ObservableCollection <MethodDefinition>(GetMatches());
            StartMonitoringDefinitions();
        }
Ejemplo n.º 4
0
        private string GetSourceCode()
        {
            var element = DataHelpers.GetElement(Archive, Data.Location);

            return(element.ToSource());
        }