Inheritance: SDMemberBase
Esempio n. 1
0
 public EventViewModel(SDEvent eve, TypeViewModel parent, ICoreConfigSection sharpDoxConfig)
     : base(eve.Identifier, parent, sharpDoxConfig)
 {
     Text = eve.Name;
     Accessibility = eve.Accessibility;
     Image = string.Format("pack://application:,,,/SharpDox.GUI;component/Resources/Icons/Event_{0}.png", Accessibility);
 }
Esempio n. 2
0
 public EventViewModel(SDEvent eve, TypeViewModel parent, ObservableCollection<string> excludedIdentifiers)
     : base(eve.Identifier, parent, excludedIdentifiers)
 {
     Text = eve.Name;
     Accessibility = eve.Accessibility;
     Image = string.Format("pack://application:,,,/SharpDox.Resources;component/Icons/Event_{0}.png", Accessibility);
 }
Esempio n. 3
0
        private SDEvent GetParsedEvent(IEventSymbol eve)
        {
            var sdEvent = new SDEvent(eve.GetIdentifier())
            {
                Name = eve.Name,
                DeclaringType = _typeRefParser.GetParsedTypeReference(eve.ContainingType),
                Accessibility = eve.DeclaredAccessibility.ToString().ToLower(),
                Documentations = DocumentationParser.ParseDocumentation(eve)
            };

            ParserOptions.SDRepository.AddMember(sdEvent);
            return sdEvent;
        }
Esempio n. 4
0
        private SDEvent GetParsedEvent(IEvent eve)
        {
            var sdEvent = new SDEvent(eve.GetIdentifier())
            {
                Name = eve.Name,
                DeclaringType = _typeParser.GetParsedType(eve.DeclaringType),
                Accessibility = eve.Accessibility.ToString().ToLower(),
                Documentations = _documentationParser.ParseDocumentation(eve)
            };

            _repository.AddMember(sdEvent);
            return sdEvent;
        }
Esempio n. 5
0
        private SDEvent GetParsedEvent(IEventSymbol eve)
        {
            var syntaxReference = eve.DeclaringSyntaxReferences.Any() ? eve.DeclaringSyntaxReferences.Single() : null;
            var sdEvent = new SDEvent(eve.GetIdentifier())
            {
                Name = eve.Name,
                DeclaringType = _typeRefParser.GetParsedTypeReference(eve.ContainingType),
                Accessibility = eve.DeclaredAccessibility.ToString().ToLower(),
                Documentations = DocumentationParser.ParseDocumentation(eve),
                Region = syntaxReference != null ? new SDRegion
                {
                    Start = syntaxReference.Span.Start,
                    StartLine = syntaxReference.SyntaxTree.GetLineSpan(syntaxReference.Span).StartLinePosition.Line + 1,
                    EndLine = syntaxReference.SyntaxTree.GetLineSpan(syntaxReference.Span).EndLinePosition.Line + 1,
                    End = syntaxReference.Span.End,
                    FilePath = syntaxReference.SyntaxTree.FilePath,
                    Filename = Path.GetFileName(syntaxReference.SyntaxTree.FilePath)
                } : null
            };

            ParserOptions.SDRepository.AddMember(sdEvent);
            return sdEvent;
        }